merge vcs run and verilator run to keep change in sync #1381
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Compile Wave Trace | |
on: | |
pull_request: | |
types: | |
- opened | |
- synchronize | |
- reopened | |
- ready_for_review | |
- labeled | |
env: | |
USER: runner | |
# Cancel the current workflow when new commit pushed | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number }} | |
cancel-in-progress: true | |
jobs: | |
gen-test-plan-for-t1emu: | |
if: '! github.event.pull_request.draft' | |
name: "[T1EMU] Generate test plan" | |
runs-on: [self-hosted, linux, nixos] | |
outputs: | |
testplan: ${{ steps.get-all-configs.outputs.out }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.event.pull_request.head.sha }} | |
- id: "get-all-configs" | |
run: echo "out=$(nix run .#ci-helper -- generateTestPlan --top t1emu)" > $GITHUB_OUTPUT | |
build-t1emu-vcs-emulators: | |
name: "[T1EMU] Build VCS trace emulators" | |
needs: [gen-test-plan-for-t1emu] | |
runs-on: [self-hosted, linux, nixos, BIGRAM] | |
strategy: | |
fail-fast: false | |
matrix: ${{ fromJSON(needs.gen-test-plan-for-t1emu.outputs.testplan) }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.event.pull_request.head.sha }} | |
- name: "Build T1Emu vcs emulator" | |
run: | | |
nix build '.#t1.${{ matrix.config }}.t1emu.vcs-emu-trace' --impure --no-link --cores 64 | |
nix build '.#t1.${{ matrix.config }}.t1emu.run.mlir.hello.vcs-emu-trace' --impure | |
if [[ ! -r ./result/mlir.hello.fsdb ]]; then | |
echo "FAIL: fsdb not found" >&2 | |
exit 1 | |
fi | |
gen-test-plan-for-t1rocketemu: | |
if: '! github.event.pull_request.draft' | |
name: "[T1ROCKETEMU] Generate test plan" | |
runs-on: [self-hosted, linux, nixos] | |
outputs: | |
testplan: ${{ steps.get-all-configs.outputs.out }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.event.pull_request.head.sha }} | |
- id: "get-all-configs" | |
run: echo "out=$(nix run .#ci-helper -- generateTestPlan --top t1rocketemu)" > $GITHUB_OUTPUT | |
build-t1rocketemu-vcs-emulators: | |
name: "[T1RocketEMU] Build VCS trace emulators" | |
needs: [gen-test-plan-for-t1rocketemu] | |
runs-on: [self-hosted, linux, nixos, BIGRAM] | |
strategy: | |
fail-fast: false | |
matrix: ${{ fromJSON(needs.gen-test-plan-for-t1rocketemu.outputs.testplan) }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.event.pull_request.head.sha }} | |
- name: "Build T1RocketEmu vcs emulator" | |
run: | | |
nix build '.#t1.${{ matrix.config }}.t1rocketemu.vcs-emu-trace' --impure --no-link --cores 64 | |
nix build '.#t1.${{ matrix.config }}.t1rocketemu.run.mlir.hello.vcs-emu-trace' --impure | |
if [[ ! -r ./result/mlir.hello.fsdb ]]; then | |
echo "FAIL: fsdb not found" >&2 | |
exit 1 | |
fi | |
gen-test-plan-for-verilator-t1emu: | |
if: '! github.event.pull_request.draft' | |
name: "[T1EMU] Generate test plan" | |
runs-on: [self-hosted, linux, nixos] | |
outputs: | |
testplan: ${{ steps.get-all-configs.outputs.out }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.event.pull_request.head.sha }} | |
- id: "get-all-configs" | |
run: echo "out=$(nix run .#ci-helper -- generateTestPlan --caseDir verilator --top t1emu)" > $GITHUB_OUTPUT | |
build-t1emu-verilator-emulators: | |
name: "[T1EMU] Build verilator trace emulators" | |
needs: [gen-test-plan-for-t1emu] | |
runs-on: [self-hosted, linux, nixos, BIGRAM] | |
strategy: | |
fail-fast: false | |
matrix: ${{ fromJSON(needs.gen-test-plan-for-verilator-t1emu.outputs.testplan) }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.event.pull_request.head.sha }} | |
- name: "Build T1Emu verilator emulator" | |
run: | | |
nix build '.#t1.${{ matrix.config }}.t1emu.verilator-emu-trace' --impure --no-link --cores 64 | |
nix build '.#t1.${{ matrix.config }}.t1emu.run.mlir.hello.verilator-emu-trace' --impure | |
if [[ ! -r ./result/wave.fst ]]; then | |
echo "FAIL: waveform not found" >&2 | |
exit 1 | |
fi | |
gen-test-plan-for-verilator-t1rocketemu: | |
if: '! github.event.pull_request.draft' | |
name: "[T1ROCKETEMU] Generate test plan" | |
runs-on: [self-hosted, linux, nixos] | |
outputs: | |
testplan: ${{ steps.get-all-configs.outputs.out }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.event.pull_request.head.sha }} | |
- id: "get-all-configs" | |
run: echo "out=$(nix run .#ci-helper -- generateTestPlan --top t1rocketemu)" > $GITHUB_OUTPUT | |
build-t1rocketemu-verilator-emulators: | |
name: "[T1RocketEmu] Build verilator trace emulators" | |
needs: [gen-test-plan-for-t1rocketemu] | |
runs-on: [self-hosted, linux, nixos, BIGRAM] | |
strategy: | |
fail-fast: false | |
matrix: ${{ fromJSON(needs.gen-test-plan-for-t1rocketemu.outputs.testplan) }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.event.pull_request.head.sha }} | |
- name: "Build T1RocketEmu verilator emulator" | |
run: | | |
nix build '.#t1.${{ matrix.config }}.t1rocketemu.verilator-emu-trace' --impure --no-link --cores 64 | |
nix build '.#t1.${{ matrix.config }}.t1rocketemu.run.mlir.hello.verilator-emu-trace' --impure | |
if [[ ! -r ./result/wave.fst ]]; then | |
echo "FAIL: waveform not found" >&2 | |
exit 1 | |
fi |