mem-ruby: add transition_no_stall #7427
Workflow file for this run
This file contains hidden or 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 after a pull-request has been approved by a reviewer. | |
| name: CI Tests | |
| on: | |
| pull_request: | |
| types: [opened, synchronize, ready_for_review] | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref || github.run_id }} | |
| cancel-in-progress: true | |
| jobs: | |
| pre-commit: | |
| # runs on github hosted runner | |
| runs-on: ubuntu-24.04 | |
| if: github.event.pull_request.draft == false | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: '3.10' | |
| - uses: pre-commit/action@v3.0.1 | |
| # Runs on the github hosted runner | |
| # Iterates through all of the commits in the the PR and runs | |
| # clang-format to make sure that nothing changes. | |
| clang-format-check: | |
| runs-on: ubuntu-24.04 | |
| if: github.event.pull_request.draft == false | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v7 | |
| with: | |
| fetch-depth: 0 # Need full history to get the merge base | |
| - name: Setup Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: '3.10' | |
| - name: Install clang-format | |
| run: sudo apt-get install -y clang-format | |
| - name: Get merge base commit | |
| id: get-base-commit | |
| run: | | |
| # Calculate the merge base between the target branch and the PR branch | |
| BASE_SHA="${{ github.event.pull_request.base.sha }}" | |
| HEAD_SHA="${{ github.event.pull_request.head.sha }}" | |
| MERGE_BASE=$(git merge-base $BASE_SHA $HEAD_SHA) | |
| echo "base_commit=$MERGE_BASE" >> $GITHUB_OUTPUT | |
| - name: Run clang-format check | |
| run: | | |
| python util/run-git-clang-format.py --verbose --ci-pr-base-commit ${{ steps.get-base-commit.outputs.base_commit }} --ignore ext | |
| get-date: | |
| # We use the date to label caches. A cache is a a "hit" if the date is the | |
| # request binary and date are the same as what is stored in the cache. | |
| # This essentially means the first job to run on a given day for a given | |
| # binary will always be a "miss" and will have to build the binary then | |
| # upload it as that day's binary to upload. While this isn't the most | |
| # efficient way to do this, the alternative was to run take a hash of the | |
| # `src` directory contents and use it as a hash. We found there to be bugs | |
| # with the hash function where this task would timeout. This approach is | |
| # simple, works, and still provides some level of caching. | |
| runs-on: ubuntu-24.04 | |
| outputs: | |
| date: ${{ steps.date.outputs.date }} | |
| steps: | |
| - name: Get the current date | |
| id: date | |
| run: echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT | |
| unittests-all-fast-opt: | |
| strategy: | |
| matrix: | |
| type: [fast, opt] | |
| runs-on: [self-hosted, linux, x64] | |
| if: github.event.pull_request.draft == false | |
| container: ghcr.io/gem5/ubuntu-24.04_all-dependencies:latest | |
| needs: [pre-commit] # only runs if pre-commit passes. | |
| timeout-minutes: 60 | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - name: CI Unittests (${{ matrix.type }}) | |
| working-directory: ${{ github.workspace }} | |
| run: scons --no-compress-debug build/ALL/unittests.${{ matrix.type }} -j $(nproc) | |
| - run: echo "This job's status is ${{ job.status }}." | |
| testlib-quick-matrix: | |
| runs-on: ubuntu-24.04 | |
| if: github.event.pull_request.draft == false | |
| # In order to make sure the environment is exactly the same, we run in | |
| # the same container we use to build gem5 and run the testlib tests. This | |
| container: ghcr.io/gem5/ubuntu-24.04_all-dependencies:latest | |
| needs: [pre-commit] | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - name: Get directories for testlib-quick | |
| working-directory: ${{ github.workspace }}/tests | |
| id: dir-matrix | |
| run: | | |
| unset PREV | |
| echo "test-dirs-matrix=$(\ | |
| ./main.py list gem5 \ | |
| --suites \ | |
| --exclude-tags gcn_gpu | \ | |
| grep "$SUITEUID:" | \ | |
| cut -d: -f2 | \ | |
| cut -d/ -f 2- | \ | |
| xargs dirname | \ | |
| sort -u | \ | |
| while read x; do \ | |
| if [ -z "${PREV}" ] || [ "$x" != "${PREV}/*" ]; then \ | |
| PREV=$x; \ | |
| echo $x; \ | |
| fi; \ | |
| done | \ | |
| jq -ncR '[inputs]'\ | |
| )" >>$GITHUB_OUTPUT | |
| - name: Get the build targets for testlib-quick-gem5-builds | |
| working-directory: ${{ github.workspace }}/tests | |
| id: build-matrix | |
| run: echo "build-matrix=$(./main.py list --build-targets --exclude-tags VEGA_X86 -q | jq -ncR '[inputs]')" >>$GITHUB_OUTPUT | |
| outputs: | |
| build-matrix: ${{ steps.build-matrix.outputs.build-matrix }} | |
| test-dirs-matrix: ${{ steps.dir-matrix.outputs.test-dirs-matrix }} | |
| clang-fast-compilation: | |
| # gem5 binaries built in `quick-gem5-builds` always use GCC. | |
| # Clang is more strict than GCC. This job checks that gem5 compiles | |
| # with Clang. It compiles build/ALL/gem5.fast to maximize the change | |
| # for compilation error to be exposed. | |
| runs-on: [self-hosted, linux, x64] | |
| if: github.event.pull_request.draft == false | |
| container: ghcr.io/gem5/clang-version-19:latest | |
| needs: [pre-commit] | |
| timeout-minutes: 90 | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - name: Clang Compilation | |
| working-directory: ${{ github.workspace }} | |
| run: scons build/ALL/gem5.fast -j $(nproc) | |
| macos-compilation: | |
| runs-on: macos-26 | |
| if: github.event.pull_request.draft == false | |
| needs: [pre-commit, get-date] | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| type: [fast, opt] | |
| steps: | |
| - name: Checkout the gem5 repository | |
| uses: actions/checkout@v7 | |
| - name: Install the gem5 dependencies | |
| run: | | |
| brew update | |
| brew install \ | |
| scons \ | |
| python \ | |
| pkg-config \ | |
| protobuf \ | |
| grpc \ | |
| boost | |
| - name: Restore macOS build/ALL cache | |
| uses: actions/cache/restore@v6 | |
| with: | |
| path: build/ALL | |
| key: macos-all-gem5-${{ matrix.type }}-${{ needs.get-date.outputs.date }} | |
| restore-keys: | | |
| macos-all-gem5-${{ matrix.type }} | |
| - name: Compile gem5.${{ matrix.type }} | |
| working-directory: ${{ github.workspace }} | |
| run: scons build/ALL/gem5.${{ matrix.type }} -j $(sysctl -n hw.ncpu) | |
| timeout-minutes: 90 | |
| testlib-quick-gem5-builds: | |
| runs-on: [self-hosted, linux, x64] | |
| if: github.event.pull_request.draft == false | |
| container: ghcr.io/gem5/ubuntu-24.04_all-dependencies:latest | |
| needs: [pre-commit, testlib-quick-matrix, get-date] | |
| strategy: | |
| matrix: | |
| build-target: ${{ fromJson(needs.testlib-quick-matrix.outputs.build-matrix) }} | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - name: Cache build/ALL | |
| uses: actions/cache/restore@v6 | |
| if: ${{ endsWith(matrix.build-target, 'build/ALL/gem5.opt') }} | |
| with: | |
| path: build/ALL | |
| key: testlib-build-all-${{ needs.get-date.outputs.date }} | |
| restore-keys: | | |
| testlib-build-all | |
| - name: Build gem5 | |
| run: scons --no-compress-debug ${{ matrix.build-target }} -j $(nproc) | |
| - name: Sanitize build-target for artifact name | |
| id: sanitize-build-target | |
| if: success() || failure() | |
| run: echo "sanitized-build-target=$(echo '${{ matrix.build-target }}' | sed 's/[\\|\.]/-/g' | sed 's/[\/|__w|gem5|build]//g')" >> $GITHUB_OUTPUT | |
| # Upload the gem5 binary as an artifact. | |
| # Note: the "achor.txt" file is a hack to make sure the paths are | |
| # preserverd in the artifact. The upload-artifact action finds the | |
| # closest common directory and uploads everything relative to that. | |
| # E.g., if we upload "build/ARM/gem5.opt" and "build/RISCV/gem5.opt" | |
| # Then upload-artifact will upload "ARM/gem5.opt" and "RISCV/gem5.opt", | |
| # stripping the "build" directory. By adding the "anchor.txt" file, we | |
| # ensure the "build" directory is preserved. | |
| - run: echo "anchor" > anchor.txt | |
| - uses: actions/upload-artifact@v7 | |
| with: | |
| name: ci-tests-${{ github.run_number }}-testlib-quick-all-gem5-builds-${{ steps.sanitize-build-target.outputs.sanitized-build-target }} | |
| path: | | |
| build/*/gem5.* | |
| anchor.txt | |
| testlib-quick-execution: | |
| name: quick-tests | |
| runs-on: [self-hosted, linux, x64] | |
| if: github.event.pull_request.draft == false | |
| container: ghcr.io/gem5/ubuntu-24.04_all-dependencies:latest | |
| needs: [pre-commit, testlib-quick-matrix, testlib-quick-gem5-builds] | |
| timeout-minutes: 360 # 6 hours | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| test-dir: ${{ fromJson(needs.testlib-quick-matrix.outputs.test-dirs-matrix) }} | |
| steps: | |
| # Checkout the repository then download the gem5.opt artifact. | |
| - uses: actions/checkout@v7 | |
| - uses: actions/download-artifact@v8 | |
| name: Download gem5 artifacts | |
| with: | |
| pattern: ci-tests-${{ github.run_number }}-testlib-quick-all-gem5-builds* | |
| merge-multiple: true | |
| # Check that the gem5.opt artifact exists and is executable. | |
| - name: Chmod gem5.{opt,debug,fast} to be executable | |
| run: | | |
| find . -name "gem5.opt" -exec chmod u+x {} \; | |
| find . -name "gem5.debug" -exec chmod u+x {} \; | |
| find . -name "gem5.fast" -exec chmod u+x {} \; | |
| # Run the testlib quick tests in the given directory. | |
| - name: Run quick ${{ matrix.test-dir }} tests | |
| id: run-tests | |
| working-directory: ${{ github.workspace }}/tests | |
| run: ./main.py run --skip-build --exclude-tags gcn_gpu ${{ matrix.test-dir }} | |
| # Get the basename of the matrix.test-dir path (to name the artifact). | |
| - name: Sanitize test-dir for artifact name | |
| id: sanitize-test-dir | |
| if: success() || failure() | |
| run: echo "sanitized-test-dir=$(echo '${{ matrix.test-dir }}' | sed 's/\//-/g')" >> $GITHUB_OUTPUT | |
| # Upload the tests/testing-results directory as an artifact. | |
| - name: Upload results | |
| if: success() || failure() | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: ci-tests-run-${{ github.run_number }}-attempt-${{ github.run_attempt }}-testlib-quick-${{ steps.sanitize-test-dir.outputs.sanitized-test-dir | |
| }}-status-${{ steps.run-tests.outcome }}-output | |
| path: tests/testing-results | |
| retention-days: 30 | |
| gpu-tests: | |
| runs-on: [self-hosted, linux, x64] | |
| container: ghcr.io/gem5/gcn-gpu:latest | |
| timeout-minutes: 180 | |
| needs: [pre-commit, get-date] | |
| steps: | |
| - uses: actions/checkout@v7 | |
| # Obtain the cache if available. | |
| - name: Cache build/VEGA_X86 | |
| uses: actions/cache/restore@v6 | |
| with: | |
| path: build/VEGA_X86 | |
| key: testlib-build-vega-${{ needs.get-date.outputs.date }} | |
| restore-keys: | | |
| testlib-build-vega | |
| # Run the GPU tests. | |
| - name: Run Testlib GPU Tests | |
| id: run-tests | |
| working-directory: ${{ github.workspace }}/tests | |
| run: ./main.py run -j$(nproc) -t$(nproc) --host gcn_gpu --isa=VEGA_X86 | |
| # Upload the tests/testing-results directory as an artifact. | |
| - name: Upload results | |
| if: success() || failure() | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: ci-tests-run-${{ github.run_number }}-attempt-${{ github.run_attempt }}-gpu-status-${{ steps.run-tests.outcome }}-output | |
| path: tests/testing-results | |
| ci-tests: | |
| # It is 'testlib-quick' which needs to pass for the pull request to be | |
| # merged. This job is a dummy job that depends on all the other jobs. | |
| runs-on: ubuntu-24.04 | |
| needs: | |
| - testlib-quick-execution | |
| - clang-fast-compilation | |
| - unittests-all-fast-opt | |
| - macos-compilation | |
| - pre-commit | |
| - gpu-tests | |
| steps: | |
| - run: echo "This job's status is ${{ job.status }}." |