Merge branch 'tb/ci-concurrency' into maint-2.39
Avoid unnecessary builds in CI, with settings configured in ci-config. * tb/ci-concurrency: ci: avoid unnecessary builds
This commit is contained in:
commit
83d585a5b9
6
.github/workflows/check-whitespace.yml
vendored
6
.github/workflows/check-whitespace.yml
vendored
@ -9,6 +9,12 @@ on:
|
|||||||
pull_request:
|
pull_request:
|
||||||
types: [opened, synchronize]
|
types: [opened, synchronize]
|
||||||
|
|
||||||
|
# Avoid unnecessary builds. Unlike the main CI jobs, these are not
|
||||||
|
# ci-configurable (but could be).
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
check-whitespace:
|
check-whitespace:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
6
.github/workflows/l10n.yml
vendored
6
.github/workflows/l10n.yml
vendored
@ -2,6 +2,12 @@ name: git-l10n
|
|||||||
|
|
||||||
on: [push, pull_request_target]
|
on: [push, pull_request_target]
|
||||||
|
|
||||||
|
# Avoid unnecessary builds. Unlike the main CI jobs, these are not
|
||||||
|
# ci-configurable (but could be).
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
git-po-helper:
|
git-po-helper:
|
||||||
if: >-
|
if: >-
|
||||||
|
40
.github/workflows/main.yml
vendored
40
.github/workflows/main.yml
vendored
@ -11,6 +11,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
outputs:
|
outputs:
|
||||||
enabled: ${{ steps.check-ref.outputs.enabled }}${{ steps.skip-if-redundant.outputs.enabled }}
|
enabled: ${{ steps.check-ref.outputs.enabled }}${{ steps.skip-if-redundant.outputs.enabled }}
|
||||||
|
skip_concurrent: ${{ steps.check-ref.outputs.skip_concurrent }}
|
||||||
steps:
|
steps:
|
||||||
- name: try to clone ci-config branch
|
- name: try to clone ci-config branch
|
||||||
run: |
|
run: |
|
||||||
@ -34,7 +35,15 @@ jobs:
|
|||||||
then
|
then
|
||||||
enabled=no
|
enabled=no
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
skip_concurrent=yes
|
||||||
|
if test -x config-repo/ci/config/skip-concurrent &&
|
||||||
|
! config-repo/ci/config/skip-concurrent '${{ github.ref }}'
|
||||||
|
then
|
||||||
|
skip_concurrent=no
|
||||||
|
fi
|
||||||
echo "enabled=$enabled" >>$GITHUB_OUTPUT
|
echo "enabled=$enabled" >>$GITHUB_OUTPUT
|
||||||
|
echo "skip_concurrent=$skip_concurrent" >>$GITHUB_OUTPUT
|
||||||
- name: skip if the commit or tree was already tested
|
- name: skip if the commit or tree was already tested
|
||||||
id: skip-if-redundant
|
id: skip-if-redundant
|
||||||
uses: actions/github-script@v6
|
uses: actions/github-script@v6
|
||||||
@ -82,6 +91,9 @@ jobs:
|
|||||||
needs: ci-config
|
needs: ci-config
|
||||||
if: needs.ci-config.outputs.enabled == 'yes'
|
if: needs.ci-config.outputs.enabled == 'yes'
|
||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
|
concurrency:
|
||||||
|
group: windows-build-${{ github.ref }}
|
||||||
|
cancel-in-progress: ${{ needs.ci-config.outputs.skip_concurrent == 'yes' }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- uses: git-for-windows/setup-git-for-windows-sdk@v1
|
- uses: git-for-windows/setup-git-for-windows-sdk@v1
|
||||||
@ -101,11 +113,14 @@ jobs:
|
|||||||
windows-test:
|
windows-test:
|
||||||
name: win test
|
name: win test
|
||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
needs: [windows-build]
|
needs: [ci-config, windows-build]
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
nr: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
|
nr: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
|
||||||
|
concurrency:
|
||||||
|
group: windows-test-${{ matrix.nr }}-${{ github.ref }}
|
||||||
|
cancel-in-progress: ${{ needs.ci-config.outputs.skip_concurrent == 'yes' }}
|
||||||
steps:
|
steps:
|
||||||
- name: download tracked files and build artifacts
|
- name: download tracked files and build artifacts
|
||||||
uses: actions/download-artifact@v3
|
uses: actions/download-artifact@v3
|
||||||
@ -137,6 +152,9 @@ jobs:
|
|||||||
NO_PERL: 1
|
NO_PERL: 1
|
||||||
GIT_CONFIG_PARAMETERS: "'user.name=CI' 'user.email=ci@git'"
|
GIT_CONFIG_PARAMETERS: "'user.name=CI' 'user.email=ci@git'"
|
||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
|
concurrency:
|
||||||
|
group: vs-build-${{ github.ref }}
|
||||||
|
cancel-in-progress: ${{ needs.ci-config.outputs.skip_concurrent == 'yes' }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- uses: git-for-windows/setup-git-for-windows-sdk@v1
|
- uses: git-for-windows/setup-git-for-windows-sdk@v1
|
||||||
@ -184,11 +202,14 @@ jobs:
|
|||||||
vs-test:
|
vs-test:
|
||||||
name: win+VS test
|
name: win+VS test
|
||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
needs: vs-build
|
needs: [ci-config, vs-build]
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
nr: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
|
nr: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
|
||||||
|
concurrency:
|
||||||
|
group: vs-test-${{ matrix.nr }}-${{ github.ref }}
|
||||||
|
cancel-in-progress: ${{ needs.ci-config.outputs.skip_concurrent == 'yes' }}
|
||||||
steps:
|
steps:
|
||||||
- uses: git-for-windows/setup-git-for-windows-sdk@v1
|
- uses: git-for-windows/setup-git-for-windows-sdk@v1
|
||||||
- name: download tracked files and build artifacts
|
- name: download tracked files and build artifacts
|
||||||
@ -218,6 +239,9 @@ jobs:
|
|||||||
name: ${{matrix.vector.jobname}} (${{matrix.vector.pool}})
|
name: ${{matrix.vector.jobname}} (${{matrix.vector.pool}})
|
||||||
needs: ci-config
|
needs: ci-config
|
||||||
if: needs.ci-config.outputs.enabled == 'yes'
|
if: needs.ci-config.outputs.enabled == 'yes'
|
||||||
|
concurrency:
|
||||||
|
group: ${{ matrix.vector.jobname }}-${{ matrix.vector.pool }}-${{ github.ref }}
|
||||||
|
cancel-in-progress: ${{ needs.ci-config.outputs.skip_concurrent == 'yes' }}
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
@ -277,6 +301,9 @@ jobs:
|
|||||||
name: ${{matrix.vector.jobname}} (${{matrix.vector.image}})
|
name: ${{matrix.vector.jobname}} (${{matrix.vector.image}})
|
||||||
needs: ci-config
|
needs: ci-config
|
||||||
if: needs.ci-config.outputs.enabled == 'yes'
|
if: needs.ci-config.outputs.enabled == 'yes'
|
||||||
|
concurrency:
|
||||||
|
group: dockerized-${{ matrix.vector.jobname }}-${{ matrix.vector.image }}-${{ github.ref }}
|
||||||
|
cancel-in-progress: ${{ needs.ci-config.outputs.skip_concurrent == 'yes' }}
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
@ -318,6 +345,9 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
jobname: StaticAnalysis
|
jobname: StaticAnalysis
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
|
concurrency:
|
||||||
|
group: static-analysis-${{ github.ref }}
|
||||||
|
cancel-in-progress: ${{ needs.ci-config.outputs.skip_concurrent == 'yes' }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- run: ci/install-dependencies.sh
|
- run: ci/install-dependencies.sh
|
||||||
@ -329,6 +359,9 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
jobname: sparse
|
jobname: sparse
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
|
concurrency:
|
||||||
|
group: sparse-${{ github.ref }}
|
||||||
|
cancel-in-progress: ${{ needs.ci-config.outputs.skip_concurrent == 'yes' }}
|
||||||
steps:
|
steps:
|
||||||
- name: Download a current `sparse` package
|
- name: Download a current `sparse` package
|
||||||
# Ubuntu's `sparse` version is too old for us
|
# Ubuntu's `sparse` version is too old for us
|
||||||
@ -347,6 +380,9 @@ jobs:
|
|||||||
name: documentation
|
name: documentation
|
||||||
needs: ci-config
|
needs: ci-config
|
||||||
if: needs.ci-config.outputs.enabled == 'yes'
|
if: needs.ci-config.outputs.enabled == 'yes'
|
||||||
|
concurrency:
|
||||||
|
group: documentation-${{ github.ref }}
|
||||||
|
cancel-in-progress: ${{ needs.ci-config.outputs.skip_concurrent == 'yes' }}
|
||||||
env:
|
env:
|
||||||
jobname: Documentation
|
jobname: Documentation
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
Loading…
Reference in New Issue
Block a user