Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trivial Change PR #1

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
3 changes: 2 additions & 1 deletion .github/workflows/metrics-regress.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ name: metrics-regress
on:
push:
branches: [ master ]
pull_request:
pull_request_target:
branches: [ master ]

# If you fork this repository, you must create a new Metrics project for your fork
Expand All @@ -22,5 +22,6 @@ jobs:
METRICS_CI_TOKEN: ${{ secrets.METRICS_CI_TOKEN }}
METRICS_REGRESSION_NAME: riscv-dv_regression
METRICS_PROJECT_ID: ${{ secrets.METRICS_PROJECT_ID }}
PR_NUMBER: ${{ github.event.pull_request.number }}
shell: bash

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,5 @@ qrun.log
riscv_dv.egg-info
pygen/pygen_src/test/out/*
!.gitkeep
*.trivialChange

4 changes: 2 additions & 2 deletions .metrics.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"variables": {
"DSIM" : "${DSIM_HOME}/bin/dsim",
"DSIM_LIB_PATH" : "${DSIM_HOME}/uvm-1.2/src/dpi",
"RISCV_GCC" : "${RISCV_TOOLCHAIN}/bin/riscv-none-embed-gcc",
"RISCV_OBJCOPY" : "${RISCV_TOOLCHAIN}/bin/riscv-none-embed-objcopy",
"RISCV_GCC" : "${RISCV_TOOLCHAIN}/bin/riscv32-unknown-elf-gcc",
"RISCV_OBJCOPY" : "${RISCV_TOOLCHAIN}/bin/riscv32-unknown-elf-objcopy",
"OVPSIM_PATH" : "/customer-tools/riscv-ovpsim/bin/Linux64"
},
"builds": {
Expand Down
12 changes: 9 additions & 3 deletions scripts/metrics-regress.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def make_http_request( req_type, endpoint, params=None ):
args = parser.parse_args()

## Server
server = 'chipsalliance.metrics.ca:443'
server = 'nightly.metrics.ca:443'

## API Endpoints
postRegression = '/api/v1/projects/'+args.projectId+'/regressionRuns'
Expand All @@ -39,7 +39,13 @@ def make_http_request( req_type, endpoint, params=None ):
## Start regression
reqParams = {}
reqParams['regressionName'] = args.regressionName
reqParams['branch'] = str(os.environ['GITHUB_REF'])

# Determine the git reference to pass to Metrics. For PRs, the reference
# is of the format /refs/pull/<PR-number>/merge
if str(os.environ['GITHUB_EVENT_NAME']) is 'pull_request_target':
reqParams['branch'] = '/refs/pull/' + str(os.environ['PR_NUMBER']) + '/merge'
else:
reqParams['branch'] = str(os.environ['GITHUB_REF'])
params = json.dumps(reqParams)

response, regressionData = make_http_request('POST', postRegression, params)
Expand Down Expand Up @@ -97,7 +103,7 @@ def make_http_request( req_type, endpoint, params=None ):
# print('Code (block): ' + str(math.trunc(regressionData['lineCoverage']*100) /100))
#print('\n')

print('Full results at: https://chipsalliance.metrics.ca/' + args.projectId + \
print('Full results at: https://nightly.metrics.ca/' + args.projectId + \
'/results/regressionRuns/' + regressionRunId)

## Set the exit code to be used by github action
Expand Down
1 change: 1 addition & 0 deletions testFile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
blah blah