diff options
author | Luca Boccassi <luca.boccassi@microsoft.com> | 2021-11-10 18:15:21 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-10 18:15:21 +0000 |
commit | fe63d890fd18d728604060e1c207356ace28a85e (patch) | |
tree | a4886233a544ac733c0930b8fd8ae265afbd4bd7 | |
parent | 4b499063acd64c7d5249a110d8eb7dc23d7b3e2b (diff) | |
parent | 3884837610168e6fb69fc2d5709f6c017a30beb9 (diff) | |
download | systemd-fe63d890fd18d728604060e1c207356ace28a85e.tar.gz |
Merge pull request #21293 from mrc0mmand/ci-cancel-old-jobs
ci: cancel previous jobs on ref update
-rw-r--r-- | .github/workflows/build_test.yml | 3 | ||||
-rw-r--r-- | .github/workflows/cifuzz.yml | 61 | ||||
-rw-r--r-- | .github/workflows/linter.yml | 3 | ||||
-rw-r--r-- | .github/workflows/mkosi.yml | 3 | ||||
-rw-r--r-- | .github/workflows/unit_tests.yml | 10 |
5 files changed, 44 insertions, 36 deletions
diff --git a/.github/workflows/build_test.yml b/.github/workflows/build_test.yml index 763a9b8025..ae03f591b3 100644 --- a/.github/workflows/build_test.yml +++ b/.github/workflows/build_test.yml @@ -15,6 +15,9 @@ on: jobs: build: runs-on: ubuntu-20.04 + concurrency: + group: ${{ github.workflow }}-${{ matrix.env.COMPILER }}-${{ matrix.env.COMPILER_VERSION }}-${{ github.ref }} + cancel-in-progress: true strategy: fail-fast: false matrix: diff --git a/.github/workflows/cifuzz.yml b/.github/workflows/cifuzz.yml index 562f296399..2053c11a0f 100644 --- a/.github/workflows/cifuzz.yml +++ b/.github/workflows/cifuzz.yml @@ -17,32 +17,35 @@ on: branches: - main jobs: - Fuzzing: - runs-on: ubuntu-latest - if: github.repository == 'systemd/systemd' - strategy: - fail-fast: false - matrix: - sanitizer: [address, undefined, memory] - steps: - - name: Build Fuzzers (${{ matrix.sanitizer }}) - id: build - uses: google/oss-fuzz/infra/cifuzz/actions/build_fuzzers@master - with: - oss-fuzz-project-name: 'systemd' - dry-run: false - allowed-broken-targets-percentage: 0 - sanitizer: ${{ matrix.sanitizer }} - - name: Run Fuzzers (${{ matrix.sanitizer }}) - uses: google/oss-fuzz/infra/cifuzz/actions/run_fuzzers@master - with: - oss-fuzz-project-name: 'systemd' - fuzz-seconds: 600 - dry-run: false - sanitizer: ${{ matrix.sanitizer }} - - name: Upload Crash - uses: actions/upload-artifact@v1 - if: failure() && steps.build.outcome == 'success' - with: - name: ${{ matrix.sanitizer }}-artifacts - path: ./out/artifacts + Fuzzing: + runs-on: ubuntu-latest + if: github.repository == 'systemd/systemd' + concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + strategy: + fail-fast: false + matrix: + sanitizer: [address, undefined, memory] + steps: + - name: Build Fuzzers (${{ matrix.sanitizer }}) + id: build + uses: google/oss-fuzz/infra/cifuzz/actions/build_fuzzers@master + with: + oss-fuzz-project-name: 'systemd' + dry-run: false + allowed-broken-targets-percentage: 0 + sanitizer: ${{ matrix.sanitizer }} + - name: Run Fuzzers (${{ matrix.sanitizer }}) + uses: google/oss-fuzz/infra/cifuzz/actions/run_fuzzers@master + with: + oss-fuzz-project-name: 'systemd' + fuzz-seconds: 600 + dry-run: false + sanitizer: ${{ matrix.sanitizer }} + - name: Upload Crash + uses: actions/upload-artifact@v1 + if: failure() && steps.build.outcome == 'success' + with: + name: ${{ matrix.sanitizer }}-artifacts + path: ./out/artifacts diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml index 1136c0523b..2c3c58ad58 100644 --- a/.github/workflows/linter.yml +++ b/.github/workflows/linter.yml @@ -13,6 +13,9 @@ jobs: build: name: Lint Code Base runs-on: ubuntu-latest + concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true steps: - name: Repo checkout diff --git a/.github/workflows/mkosi.yml b/.github/workflows/mkosi.yml index 9ae40e316f..11cb3f63b5 100644 --- a/.github/workflows/mkosi.yml +++ b/.github/workflows/mkosi.yml @@ -15,6 +15,9 @@ on: jobs: ci: runs-on: ubuntu-20.04 + concurrency: + group: ${{ github.workflow }}-${{ matrix.distro }}-${{ github.ref }} + cancel-in-progress: true strategy: fail-fast: false matrix: diff --git a/.github/workflows/unit_tests.yml b/.github/workflows/unit_tests.yml index 0b8c1782ea..2bb8400fdf 100644 --- a/.github/workflows/unit_tests.yml +++ b/.github/workflows/unit_tests.yml @@ -4,10 +4,6 @@ # name: Unit tests on: - # On push/merge to main we only run the GCC job, to get coverage data uploaded to coveralls.io - push: - branches: - - main pull_request: branches: - main @@ -15,6 +11,9 @@ on: jobs: build: runs-on: ubuntu-20.04 + concurrency: + group: ${{ github.workflow }}-${{ matrix.run_phase }}-${{ github.ref }} + cancel-in-progress: true strategy: fail-fast: false matrix: @@ -22,10 +21,7 @@ jobs: steps: - name: Repository checkout uses: actions/checkout@v2 - if: github.event_name == 'pull_request' || matrix.run_phase == 'GCC' - name: Install build dependencies run: sudo -E .github/workflows/unit_tests.sh SETUP - if: github.event_name == 'pull_request' || matrix.run_phase == 'GCC' - name: Build & test (${{ matrix.run_phase }}) run: sudo -E .github/workflows/unit_tests.sh RUN_${{ matrix.run_phase }} - if: github.event_name == 'pull_request' || matrix.run_phase == 'GCC' |