diff --git a/.github/workflows/ci-tests.yaml b/.github/workflows/ci-tests.yaml index 309fefce2a..16c096dc9a 100644 --- a/.github/workflows/ci-tests.yaml +++ b/.github/workflows/ci-tests.yaml @@ -8,9 +8,18 @@ on: types: [opened, reopened, edited] jobs: + pre-commit: + # runs on github hosted runner + runs-on: ubuntu-22.04 + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-python@v3 + - uses: pre-commit/action@v3.0.0 + build-gem5: runs-on: [self-hosted, linux, x64, build] container: gcr.io/gem5-test/ubuntu-22.04_all-dependencies:latest + needs: pre-commit # only runs if pre-commit passes outputs: artifactname: ${{ steps.name.outputs.test }} steps: @@ -29,8 +38,8 @@ jobs: unittests-all-opt: runs-on: [self-hosted, linux, x64, run] - container: - image: gcr.io/gem5-test/ubuntu-22.04_all-dependencies:latest + container: gcr.io/gem5-test/ubuntu-22.04_all-dependencies:latest + needs: pre-commit # only runs if pre-commit passes timeout-minutes: 60 steps: - uses: actions/checkout@v3 @@ -42,7 +51,7 @@ jobs: testlib-quick: runs-on: [self-hosted, linux, x64, run] container: gcr.io/gem5-test/ubuntu-22.04_all-dependencies:latest - needs: build-gem5 + needs: [pre-commit, build-gem5] timeout-minutes: 360 # 6 hours steps: - uses: actions/checkout@v3 diff --git a/.github/workflows/compiler-tests.yaml b/.github/workflows/compiler-tests.yaml index 300f9eba36..e7e9cd2424 100644 --- a/.github/workflows/compiler-tests.yaml +++ b/.github/workflows/compiler-tests.yaml @@ -18,7 +18,7 @@ jobs: opts: [.opt, .fast] runs-on: [self-hosted, linux, x64, run] container: gcr.io/gem5-test/${{ matrix.image }}:latest - timeout-minutes: 2880 # 48 hours + timeout-minutes: 240 # 4 hours steps: - uses: actions/checkout@v3 with: @@ -26,7 +26,7 @@ jobs: # therefore need to explicitly checkout the develop branch. ref: develop - name: Compile build/ALL/gem5${{ matrix.opts }} with ${{ matrix.image }} - run: scons build/ALL/gem5${{ matrix.opts }} + run: /usr/bin/env python3 /usr/bin/scons --ignore-style build/ALL/gem5${{ matrix.opts }} # Tests the two latest gcc and clang supported compilers against all gem5 compilations. latest-compilers-all-gem5-builds: @@ -37,7 +37,7 @@ jobs: opts: [.opt, .fast] runs-on: [self-hosted, linux, x64, run] container: gcr.io/gem5-test/${{ matrix.image }}:latest - timeout-minutes: 2880 # 48 hours + timeout-minutes: 240 # 4 hours steps: - uses: actions/checkout@v3 with: @@ -45,4 +45,4 @@ jobs: # therefore need to explicitly checkout the develop branch. ref: develop - name: Compile build/${{ matrix.gem5-compilation }}/gem5${{ matrix.opts }} with ${{ matrix.image }} - run: scons build/${{ matrix.gem5-compilation }}/gem5${{ matrix.opts }} + run: /usr/bin/env python3 /usr/bin/scons --ignore-style build/${{ matrix.gem5-compilation }}/gem5${{ matrix.opts }} diff --git a/.github/workflows/daily-tests.yaml b/.github/workflows/daily-tests.yaml index 91bb7d6f8a..97b41642b7 100644 --- a/.github/workflows/daily-tests.yaml +++ b/.github/workflows/daily-tests.yaml @@ -223,7 +223,7 @@ jobs: unittests-all-debug: runs-on: [self-hosted, linux, x64, run] container: gcr.io/gem5-test/ubuntu-22.04_all-dependencies:latest - timeout-minutes: 30 + timeout-minutes: 60 steps: - uses: actions/checkout@v3 @@ -240,7 +240,7 @@ jobs: unittests-all-fast: runs-on: [self-hosted, linux, x64, run] container: gcr.io/gem5-test/ubuntu-22.04_all-dependencies:latest - timeout-minutes: 30 + timeout-minutes: 60 steps: - uses: actions/checkout@v3 @@ -837,22 +837,16 @@ jobs: # therefore need to explicitly checkout the develop branch. ref: develop - name: Build ARM/gem5.opt - uses: docker://gcr.io/gem5-test/ubuntu-22.04_min-dependencies:latest - # This is a bit of a hack so we can run a different docker container. - with: - args: scons --ignore-style --duplicate-sources -j4 build/ARM/gem5.opt + run: scons build/ARM/gem5.opt --ignore-style --duplicate-sources -j$(nproc) - name: Build ARM/libgem5_opt.so - uses: docker://gcr.io/gem5-test/ubuntu-22.04_min-dependencies:latest - # This is a bit of a hack so we can run a different docker container. - with: - args: scons --with-cxx-config --without-python --without-tcmalloc USE_SYSTEMC=0 -j4 --duplicate-sources build/ARM/libgem5_opt.so + run: scons build/ARM/libgem5_opt.so --with-cxx-config --without-python --without-tcmalloc USE_SYSTEMC=0 -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: bla - run: LD_LIBRARY_PATH=build/ARM/:/opt/systemc/lib-linux64/ ./gem5.opt.sc m5out/config.ini + - 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: @@ -872,7 +866,7 @@ jobs: uses: wei/wget@v1 with: args: -q http://dist.gem5.org/dist/develop/test-progs/square/square # Removed -N bc it wasn't available within actions, should be okay bc workspace is clean every time: https://github.com/coder/sshcode/issues/102 - - name: Run Square test with GCN3_X8/gem5.opt (SE mode) + - name: Run Square test with GCN3_X86/gem5.opt (SE mode) run: | mkdir -p tests/testing-results ./build/GCN3_X86/gem5.opt configs/example/apu_se.py --reg-alloc-policy=dynamic -n3 -c square @@ -880,7 +874,7 @@ jobs: uses: wei/wget@v1 with: args: -q http://dist.gem5.org/dist/develop/test-progs/heterosync/gcn3/allSyncPrims-1kernel # Removed -N bc it wasn't available within actions, should be okay bc workspace is clean every time - - name: Run allSyncPrims-1kernel sleepMutex test with GCN3_X8/gem5.opt (SE mode) + - name: Run allSyncPrims-1kernel sleepMutex test with GCN3_X86/gem5.opt (SE mode) run: ./build/GCN3_X86/gem5.opt configs/example/apu_se.py --reg-alloc-policy=dynamic -n3 -c allSyncPrims-1kernel --options="sleepMutex 10 16 4" - - name: Run allSysncPrims-1kernel lfTreeBarrUsing test with GCN3_X8/gem5.opt (SE mode) - run: ./build/GCN3_X86/gem5.opt configs/example/apu_se.py --reg-alloc-policy=dynamic -n3 -c allSyncPrims-1kernel --options="lfTreeBarrUsing 10 16 4" + - name: Run allSyncPrims-1kernel lfTreeBarrUsing test with GCN3_X86/gem5.opt (SE mode) + run: ./build/GCN3_X86/gem5.opt configs/example/apu_se.py --reg-alloc-policy=dynamic -n3 -c allSyncPrims-1kernel --options="lfTreeBarrUniq 10 16 4"