Daily Tests #52
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
--- | |
# This workflow runs all of the long tests within main.py, extra tests in nightly.sh, and unittests | |
name: Daily Tests | |
on: | |
# Runs every day from 7AM UTC | |
schedule: | |
- cron: 0 7 * * * | |
# Allows us to manually start workflow for testing | |
workflow_dispatch: | |
jobs: | |
name-artifacts: | |
runs-on: ubuntu-latest | |
outputs: | |
build-name: ${{ steps.artifact-name.outputs.name }} | |
steps: | |
- uses: actions/checkout@v4 | |
- id: artifact-name | |
run: echo "name=$(date +"%Y-%m-%d_%H.%M.%S-")" >> $GITHUB_OUTPUT | |
build-gem5: | |
strategy: | |
fail-fast: false | |
matrix: | |
# NULL is in quotes since it is considered a keyword in yaml files | |
image: [ALL, ALL_CHI, ARM, ALL_MSI, ALL_MESI_Two_Level, 'NULL', NULL_MI_example, RISCV, VEGA_X86] | |
# this allows us to pass additional command line parameters | |
# the default is to add -j $(nproc), but some images | |
# require more specifications when built | |
include: | |
- setconfig-option: '' | |
- isa-option: '' | |
- image: ALL_CHI | |
setconfig-option: RUBY_PROTOCOL_CHI=y | |
isa-option: ALL | |
- image: ALL_MSI | |
setconfig-option: RUBY_PROTOCOL_MSI=y | |
isa-option: ALL | |
- image: ALL_MESI_Two_Level | |
setconfig-option: RUBY_PROTOCOL_MESI_TWO_LEVEL=y | |
isa-option: ALL | |
- image: NULL_MI_example | |
setconfig-option: RUBY_PROTOCOL_MI_EXAMPLE=y | |
isa-option: 'NULL' | |
runs-on: [self-hosted, linux, x64] | |
needs: name-artifacts | |
container: ghcr.io/gem5/ubuntu-24.04_all-dependencies:latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
# Scheduled workflows run on the default branch by default. We | |
# therefore need to explicitly checkout the develop branch. | |
ref: develop | |
- name: defconfig gem5 | |
if: ${{ matrix.setconfig-option != '' }} | |
run: scons defconfig build/${{ matrix.image }} build_opts/${{ matrix.isa-option }} | |
- name: setconfig gem5 | |
if: ${{ matrix.setconfig-option != '' }} | |
run: scons setconfig build/${{ matrix.image }} ${{ matrix.setconfig-option }} | |
- name: Build gem5 | |
run: scons build/${{ matrix.image }}/gem5.opt -j $(nproc) | |
- uses: actions/[email protected] | |
with: | |
name: ${{ needs.name-artifacts.outputs.build-name }}${{ matrix.image }} | |
path: '*build/${{ matrix.image }}/gem5.opt' | |
retention-days: 1 | |
- run: echo "This job's status is ${{ job.status }}." | |
# The actions/upload-artifact@v4 action has a special "merge" sub action | |
# which allows for the merging of multiple artifacts into a single one. | |
# This is otherwise not possible as artifacts are immutable after creation | |
# in v4. We createa a merged artifact here as we want to download all the | |
# gem5 build artifacts when running the long tests. | |
merge-gem5-build-artifacts: | |
runs-on: [self-hosted, linux, x64] | |
container: ghcr.io/gem5/ubuntu-24.04_all-dependencies:latest | |
needs: [build-gem5, name-artifacts] | |
steps: | |
- name: Merge gem5 build artifacts | |
uses: actions/upload-artifact/merge@v4 | |
with: | |
name: ${{needs.name-artifacts.outputs.build-name}} | |
pattern: ${{needs.name-artifacts.outputs.build-name}}* | |
retention-days: 1 | |
compression-level: 9 | |
# this builds both unittests.fast and unittests.debug | |
unittests-fast-debug: | |
strategy: | |
matrix: | |
type: [fast, debug] | |
runs-on: [self-hosted, linux, x64] | |
container: ghcr.io/gem5/ubuntu-24.04_all-dependencies:latest | |
timeout-minutes: 60 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
# Scheduled workflows run on the default branch by default. We | |
# therefore need to explicitly checkout the develop branch. | |
ref: develop | |
- name: ALL/unittests.${{ matrix.type }} UnitTests | |
run: scons build/ALL/unittests.${{ matrix.type }} -j $(nproc) | |
# start running all of the long tests | |
testlib-long-tests: | |
strategy: | |
fail-fast: false | |
matrix: | |
test-type: [arm_boot_tests, fs, gpu, insttest_se, learning_gem5, m5threads_test_atomic, memory, multi_isa, replacement_policies, riscv_boot_tests, | |
stdlib, x86_boot_tests] | |
runs-on: [self-hosted, linux, x64] | |
container: ghcr.io/gem5/ubuntu-24.04_all-dependencies:latest | |
needs: [name-artifacts, merge-gem5-build-artifacts] | |
timeout-minutes: 1440 # 24 hours for entire matrix to run | |
steps: | |
- name: Clean runner | |
run: rm -rf ./* || true rm -rf ./.??* || true rm -rf ~/.cache || true | |
- uses: actions/checkout@v4 | |
with: | |
# Scheduled workflows run on the default branch by default. We | |
# therefore need to explicitly checkout the develop branch. | |
ref: develop | |
# download all artifacts for each test. Thoguh this is inelegant, | |
# it's simpler than figuring otu which long tests requires which | |
# binary. | |
- uses: actions/[email protected] | |
with: | |
name: ${{needs.name-artifacts.outputs.build-name}} | |
# The upload/download GitHub actions do not preserve the executable | |
# bit of the files. We need to set the executable bit for the | |
# gem5.opt binaries we've just downloaded. | |
- run: find build -name "gem5.opt" | xargs chmod u+x | |
# run test | |
- name: long ${{ matrix.test-type }} tests | |
working-directory: ${{ github.workspace }}/tests | |
run: ./main.py run gem5/${{ matrix.test-type }} --length=long --skip-build -vv -t $(nproc) | |
- name: upload results | |
if: success() || failure() | |
uses: actions/[email protected] | |
env: | |
MY_STEP_VAR: ${{ matrix.test-type }}_COMMIT.${{github.sha}}_RUN.${{github.run_id}}_ATTEMPT.${{github.run_attempt}} | |
with: | |
name: ${{ env.MY_STEP_VAR }} | |
path: tests/testing-results | |
retention-days: 7 | |
- run: echo "This job's status is ${{ job.status }}." | |
# split library example tests into runs based on Suite UID | |
# so that they don't hog the runners for too long | |
testlib-long-gem5_library_example_tests: | |
runs-on: [self-hosted, linux, x64] | |
strategy: | |
fail-fast: false | |
matrix: | |
test-type: [gem5-library-example-x86-ubuntu-run-ALL-x86_64-opt, gem5-library-example-riscv-ubuntu-run-ALL-x86_64-opt, lupv-example-ALL-x86_64-opt, | |
gem5-library-example-arm-ubuntu-run-test-ALL-x86_64-opt, gem5-library-example-riscvmatched-hello-ALL-x86_64-opt] | |
container: ghcr.io/gem5/ubuntu-24.04_all-dependencies:latest | |
needs: [name-artifacts, build-gem5] | |
timeout-minutes: 1440 # 24 hours | |
steps: | |
- name: Clean runner | |
run: rm -rf ./* || true rm -rf ./.??* || true rm -rf ~/.cache || true | |
- uses: actions/checkout@v4 | |
with: | |
# Scheduled workflows run on the default branch by default. We | |
# therefore need to explicitly checkout the develop branch. | |
ref: develop | |
- uses: actions/[email protected] | |
with: | |
name: ${{needs.name-artifacts.outputs.build-name}}ALL | |
- run: chmod u+x build/ALL/gem5.opt | |
- name: long ${{ matrix.test-type }} gem5_library_example_tests | |
working-directory: ${{ github.workspace }}/tests | |
run: ./main.py run --uid SuiteUID:tests/gem5/gem5_library_example_tests/test_gem5_library_examples.py:test-${{ matrix.test-type }} --length=long | |
--skip-build -vv | |
- name: upload results | |
if: success() || failure() | |
uses: actions/[email protected] | |
env: | |
MY_STEP_VAR: ${{ matrix.test-type }}_COMMIT.${{github.sha}}_RUN.${{github.run_id}}_ATTEMPT.${{github.run_attempt}} | |
with: | |
name: ${{ env.MY_STEP_VAR }} | |
path: tests/testing-results | |
retention-days: 7 | |
- run: echo "This job's status is ${{ job.status }}." | |
# This runs the SST-gem5 integration compilation and tests it with | |
# ext/sst/sst/example.py. | |
sst-test: | |
runs-on: [self-hosted, linux, x64] | |
container: ghcr.io/gem5/sst-env:latest | |
timeout-minutes: 180 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
# Scheduled workflows run on the default branch by default. We | |
# therefore need to explicitly checkout the develop branch. | |
ref: develop | |
- name: Build RISCV/libgem5_opt.so with SST | |
run: scons build/RISCV/libgem5_opt.so --without-tcmalloc --duplicate-sources --ignore-style -j $(nproc) | |
- name: Makefile ext/sst | |
working-directory: ${{ github.workspace }}/ext/sst | |
run: mv Makefile.linux Makefile | |
- name: Compile ext/sst | |
working-directory: ${{ github.workspace }}/ext/sst | |
run: make -j $(nproc) | |
- name: Run SST test | |
working-directory: ${{ github.workspace }}/ext/sst | |
run: sst --add-lib-path=./ sst/example.py | |
# This runs the gem5 within SystemC ingration and runs a simple hello-world | |
# simulation with it. | |
systemc-test: | |
runs-on: [self-hosted, linux, x64] | |
container: ghcr.io/gem5/systemc-env:latest | |
timeout-minutes: 180 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
# Scheduled workflows run on the default branch by default. We | |
# therefore need to explicitly checkout the develop branch. | |
ref: develop | |
- name: Build ARM/gem5.opt | |
run: scons build/ARM/gem5.opt --ignore-style --duplicate-sources -j$(nproc) | |
- name: disable systemc | |
run: scons setconfig build/ARM --ignore-style USE_SYSTEMC=n | |
- name: Build ARM/libgem5_opt.so | |
run: scons build/ARM/libgem5_opt.so --with-cxx-config --without-python --without-tcmalloc -j$(nproc) --duplicate-sources | |
- name: Compile gem5 withing SystemC | |
working-directory: ${{ github.workspace }}/util/systemc/gem5_within_systemc | |
run: make | |
- name: Run gem5 within SystemC test | |
run: ./build/ARM/gem5.opt configs/deprecated/example/se.py -c tests/test-progs/hello/bin/arm/linux/hello | |
- name: Continue gem5 within SystemC test | |
run: LD_LIBRARY_PATH=build/ARM/:/opt/systemc/lib-linux64/ ./util/systemc/gem5_within_systemc/gem5.opt.sc m5out/config.ini | |
# Runs the gem5 Nighyly GPU tests. | |
gpu-tests: | |
runs-on: [self-hosted, linux, x64] | |
container: ghcr.io/gem5/gcn-gpu:latest | |
timeout-minutes: 720 # 12 hours | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
# Scheduled workflows run on the default branch by default. We | |
# therefore need to explicitly checkout the develop branch. | |
ref: develop | |
- name: Compile build/VEGA_X86/gem5.opt | |
run: scons build/VEGA_X86/gem5.opt -j $(nproc) | |
- name: Get Square test-prog from gem5-resources | |
run: build/VEGA_X86/gem5.opt util/obtain-resource.py square-gpu-test -p square | |
- name: Run Square test with VEGA_X86/gem5.opt (SE mode) | |
run: | | |
mkdir -p tests/testing-results | |
./build/VEGA_X86/gem5.opt configs/example/apu_se.py --reg-alloc-policy=dynamic -n3 -c square | |
- name: Get allSyncPrims-1kernel from gem5-resources | |
run: build/VEGA_X86/gem5.opt util/obtain-resource.py allSyncPrims-1kernel -p allSyncPrims-1kernel | |
- name: Run allSyncPrims-1kernel sleepMutex test with VEGA_X86/gem5.opt (SE mode) | |
run: ./build/VEGA_X86/gem5.opt configs/example/apu_se.py --reg-alloc-policy=dynamic -n3 -c allSyncPrims-1kernel --options="sleepMutex 10 16 | |
4" | |
- name: Run allSyncPrims-1kernel lfTreeBarrUsing test with VEGA_X86/gem5.opt (SE mode) | |
run: ./build/VEGA_X86/gem5.opt configs/example/apu_se.py --reg-alloc-policy=dynamic -n3 -c allSyncPrims-1kernel --options="lfTreeBarrUniq | |
10 16 4" | |
daily-tests: | |
# The dummy job is used to indicate whether the daily tests have | |
# passed or not. This can be used as status check for pull requests. | |
# I.e., if we want to stop pull requests from being merged if the | |
# daily tests are failing we can add this job as a required status | |
# check. | |
runs-on: ubuntu-latest | |
needs: | |
- unittests-fast-debug | |
- testlib-long-tests | |
- testlib-long-gem5_library_example_tests | |
- sst-test | |
- systemc-test | |
- gpu-tests | |
steps: | |
- run: echo "This daily tests have passed." |