Skip to content

Commit

Permalink
feat(ci): enable log tests only on main branch with tags pushed
Browse files Browse the repository at this point in the history
  • Loading branch information
stephenctw committed Aug 22, 2023
1 parent cc48712 commit 852eabc
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 14 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/test-logs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Test logs and proofs
on:
push:
branches:
- main
tags:
- '*'
env:
UARCH_LOG_TEST_VERSION: v0.15.1
jobs:
test:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
token: ${{ secrets.CI_TOKEN }}
- uses: awalsh128/cache-apt-pkgs-action@latest
with:
packages: gpp
version: 2.27

- name: Download uarch test log files
uses: Legion2/[email protected]
with:
repository: ${{ github.repository_owner }}/machine-emulator
tag: ${{ env.UARCH_LOG_TEST_VERSION }}
file: uarch-riscv-tests-json-logs-${{ env.UARCH_LOG_TEST_VERSION }}.tar.gz
token: ${{ secrets.CI_TOKEN }}

- name: Untar uarch test logs
run: mkdir -p test/uarch-log && tar -xzf uarch-riscv-tests-json-logs-${UARCH_LOG_TEST_VERSION}.tar.gz -C test/uarch-log

- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly

- name: Run replay tests
run: make test-replay
18 changes: 4 additions & 14 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ name: Test
on: [push]
env:
UARCH_BIN_TEST_VERSION: v0.29.0
UARCH_LOG_TEST_VERSION: v0.15.1
jobs:
test:
runs-on: ubuntu-22.04
Expand All @@ -24,24 +23,15 @@ jobs:
file: machine-tests-${{ env.UARCH_BIN_TEST_VERSION }}.tar.gz
token: ${{ secrets.CI_TOKEN }}

- name: Download uarch test log files
uses: Legion2/[email protected]
with:
repository: ${{ github.repository_owner }}/machine-emulator
tag: ${{ env.UARCH_LOG_TEST_VERSION }}
file: uarch-riscv-tests-json-logs-${{ env.UARCH_LOG_TEST_VERSION }}.tar.gz
token: ${{ secrets.CI_TOKEN }}

- name: Untar uarch test bins
run: mkdir -p test/uarch-bin && tar -xzf machine-tests-${UARCH_BIN_TEST_VERSION}.tar.gz -C test/uarch-bin && rm test/uarch-bin/*.dump

- name: Untar uarch test logs
run: mkdir -p test/uarch-log && tar -xzf uarch-riscv-tests-json-logs-${UARCH_LOG_TEST_VERSION}.tar.gz -C test/uarch-log

- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly

- name: Run all tests
run: make test-all
- name: Run mock and production tests
run: |
make test-mock
make test-prod

0 comments on commit 852eabc

Please sign in to comment.