This copies our .github folder from stable into the develop branch, which allows the GitHub Actions workflows to run on both branches Change-Id: I864939f86f0fbd6d73676f137df2670d3eac1d1a Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/71860 Reviewed-by: Bobby Bruce <bbruce@ucdavis.edu> Tested-by: kokoro <noreply+kokoro@google.com> Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
81 lines
2.6 KiB
YAML
81 lines
2.6 KiB
YAML
# This workflow runs after a pull-request has been approved by a reviewer.
|
|
|
|
name: CI Tests
|
|
|
|
on:
|
|
pull_request:
|
|
types: [opened, edited, synchronize, ready_for_review]
|
|
|
|
|
|
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:
|
|
- uses: actions/checkout@v3
|
|
- id: name
|
|
run: echo "test=$(date +"%Y-%m-%d_%H.%M.%S")-artifact" >> $GITHUB_OUTPUT
|
|
|
|
- name: Build gem5
|
|
run: |
|
|
scons build/ALL/gem5.opt -j $(nproc)
|
|
- uses: actions/upload-artifact@v3
|
|
with:
|
|
name: ${{ steps.name.outputs.test }}
|
|
path: build/ALL/gem5.opt
|
|
- run: echo "This job's status is ${{ job.status }}."
|
|
|
|
unittests-all-opt:
|
|
runs-on: [self-hosted, linux, x64, run]
|
|
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
|
|
- name: CI Unittests
|
|
working-directory: ${{ github.workspace }}
|
|
run: scons build/ALL/unittests.opt -j $(nproc)
|
|
- run: echo "This job's status is ${{ job.status }}."
|
|
|
|
testlib-quick:
|
|
runs-on: [self-hosted, linux, x64, run]
|
|
container: gcr.io/gem5-test/ubuntu-22.04_all-dependencies:latest
|
|
needs: [pre-commit, build-gem5]
|
|
timeout-minutes: 360 # 6 hours
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- uses: actions/download-artifact@v3
|
|
with:
|
|
name: ${{needs.build-gem5.outputs.artifactname}}
|
|
path: build/ALL
|
|
- run: chmod u+x build/ALL/gem5.opt
|
|
- name: The TestLib CI Tests
|
|
working-directory: ${{ github.workspace }}/tests
|
|
run: ./main.py run --skip-build -vv
|
|
- name: create zip of results
|
|
if: success() || failure()
|
|
run: |
|
|
apt-get -y install zip
|
|
zip -r output.zip tests/testing-results
|
|
- name: upload zip
|
|
if: success() || failure()
|
|
uses: actions/upload-artifact@v3
|
|
env:
|
|
MY_STEP_VAR: ${{github.job}}_COMMIT.${{github.sha}}_RUN.${{github.run_id}}_ATTEMPT.${{github.run_attempt}}
|
|
with:
|
|
name: ${{ env.MY_STEP_VAR }}
|
|
path: output.zip
|
|
retention-days: 7
|
|
- run: echo "This job's status is ${{ job.status }}."
|