Skip to content

Commit

Permalink
Merge branch 'master' into ibex_fi_tests
Browse files Browse the repository at this point in the history
  • Loading branch information
nasahlpa committed Jul 2, 2024
2 parents 3eecbe0 + e2b721d commit dba64e3
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 48 deletions.
58 changes: 11 additions & 47 deletions .github/workflows/private-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,59 +16,23 @@ on:
- "*"

permissions:
statuses: write
contents: write # For repository dispatch

jobs:
trigger:
name: Trigger Private CI
runs-on: ubuntu-latest
steps:
# Find a merge commit. We cannot use merge_commit_sha from context directly because
# mergeability check is asynchronous to pull_request_target trigger..
- name: Find the merge commit
id: merge
if: github.event_name == 'pull_request_target'
uses: actions/github-script@v7
with:
script: |
for (let i = 0; i <= 5; i++) {
const { data: pr } = await github.rest.pulls.get({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: context.issue.number,
});
if (i != 5 && pr.mergeable == null) {
console.log("Mergeability check in progress");
await new Promise(r => setTimeout(r, 2000));
continue;
}
if (pr.mergeable) {
core.setOutput('merge_sha', pr.merge_commit_sha);
} else {
core.setFailed('Pull request is not mergeable');
}
break;
}
# Create pending statuses to block merge group and give indication before jobs are picked up.
- name: Create pending statuses
- name: Trigger Private CI
run: |
gh api --method POST \
PAYLOAD='"target":"${{ github.repository_owner }}/lowrisc-private-ci/master/ibex-private-ci.yml","sha":"${{ github.event.pull_request.head.sha || github.sha }}"'
if ${{ github.event_name == 'pull_request_target' }}; then
PAYLOAD+=',"pull_request":${{ github.event.pull_request.number }}'
fi
curl -fL \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${{ github.token }}" \
-H "X-GitHub-Api-Version: 2022-11-28" \
/repos/${{ github.repository }}/statuses/${{ github.event.pull_request.head.sha || github.sha }} \
-f state='pending' \
-f context='Ibex Private CI' \
-f description='Queued'
env:
GITHUB_TOKEN: ${{ github.token }}

- name: Trigger Private CI
run: |
gh workflow run ibex-private-ci.yml --repo lowRISC/lowrisc-private-ci \
-f ref="${{ github.event.pull_request.head.sha || github.sha }}" \
-f sha="${{ steps.merge.outputs.merge_sha || github.sha }}"
env:
GITHUB_TOKEN: ${{ secrets.LOWRISC_PRIVATE_CI_PAT }}
https://api.github.com/repos/${{ github.repository }}/dispatches \
-d '{"event_type":"cross-repo-ci","client_payload":{'"$PAYLOAD"'}}'
2 changes: 1 addition & 1 deletion dv/uvm/core_ibex/tests/core_ibex_test_lib.sv
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ class core_ibex_ram_intg_test extends core_ibex_base_test;
`DV_CHECK_STD_RANDOMIZE_WITH_FATAL(bit_idx, bit_idx < 4;)

glitch_val = orig_val;
glitch_val[bit_idx] = ~glitch_val[bit_idx];
glitch_val ^= 1 << bit_idx;

// Disable TB assertion for alerts.
`DV_ASSERT_CTRL_REQ("tb_no_alerts_triggered", 1'b0)
Expand Down

0 comments on commit dba64e3

Please sign in to comment.