1
0
mirror of https://github.com/systemd/systemd.git synced 2025-03-31 14:50:15 +03:00

Merge pull request #21293 from mrc0mmand/ci-cancel-old-jobs

ci: cancel previous jobs on ref update
This commit is contained in:
Luca Boccassi 2021-11-10 18:15:21 +00:00 committed by GitHub
commit fe63d890fd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 44 additions and 36 deletions

View File

@ -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:

View File

@ -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

View File

@ -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

View File

@ -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:

View File

@ -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'