Fix: typo #9
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: Test openperf | |
on: | |
push: | |
workflow_dispatch: | |
env: | |
AM_HOME: "${{ github.workspace }}/abstract-machine" | |
NEMU_HOME: "${{ github.workspace }}/nemu" | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
max-parallel: 4 | |
matrix: | |
test_size: ["test", "ref"] | |
arch: ["native", "riscv32-nemu"] | |
steps: | |
- uses: nixbuild/nix-quick-install-action@v27 | |
- uses: cachix/cachix-action@v14 | |
with: | |
name: ysyx | |
authToken: '${{ secrets.CACHIX_SIGNING_KEY }}' | |
- name: Checkout Main Repo (openperf) | |
id: checkout-openperf | |
uses: actions/checkout@v4 | |
with: | |
path: openperf | |
- name: Checkout Nemu Repo | |
id: checkout-nemu | |
if: ${{ contains(matrix.arch, 'nemu') }} | |
uses: actions/checkout@v4 | |
with: | |
token: '${{ secrets.DEPLOY_KEY }}' | |
repository: xinyangli/openperf-nemu | |
path: nemu | |
- name: Checkout Abstract Machine Repo | |
id: checkout-am | |
uses: actions/checkout@v4 | |
with: | |
token: '${{ secrets.DEPLOY_KEY }}' | |
repository: xinyangli/openperf-abstract-machine | |
path: abstract-machine | |
- name: Prepare devshell | |
run: | | |
mkdir -p /tmp/env | |
nix develop --no-use-registries --profile /tmp/env/openperf-env-${{ matrix.arch }} ./openperf#${{ matrix.arch }} | |
- name: Cache common libraries | |
uses: actions/cache@v4 | |
with: | |
key: openperf-common-${{ matrix.arch }}-${{ hashFiles('**/*.nix') }}-${{ steps.checkout-openperf.outputs.commit }}-${{ steps.checkout-am.outputs.commit }} | |
path: openperf/src/common | |
- name: Generate config if target platform is nemu | |
if: ${{ contains(matrix.arch, 'nemu') }} | |
run: | | |
nix develop --no-use-registries /tmp/env/openperf-env-${{ matrix.arch }} --impure --command make -C $NEMU_HOME ARCH=riscv32-nemu openperf_${{ matrix.arch }}_defconfig | |
- name: Build common libraries | |
run: | | |
nix develop --no-use-registries /tmp/env/openperf-env-${{ matrix.arch }} --impure --command make -C openperf ARCH=${{ matrix.arch }} ALL=dummy run | |
- name: Run openperf benchmark | |
working-directory: openperf | |
run: | | |
nix develop --no-use-registries /tmp/env/openperf-env-${{ matrix.arch }} --impure --command make ARCH=${{ matrix.arch }} mainargs=${{ matrix.test_size }} run | |