mirror of
https://github.com/zama-ai/concrete.git
synced 2026-02-08 19:44:57 -05:00
feat(github): auto cancel previous continuous-integration.yml run when a PR is updated
This commit is contained in:
14
.github/workflows/auto-cancel.yml
vendored
Normal file
14
.github/workflows/auto-cancel.yml
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
# https://github.com/styfle/cancel-workflow-action#user-content-advanced-canceling-other-workflows
|
||||
name: Auto-cancel-outdated PR
|
||||
on:
|
||||
pull_request:
|
||||
types: [opened, synchronize, reopened]
|
||||
jobs:
|
||||
cancel:
|
||||
name: Auto-cancel-outdated PR
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: styfle/cancel-workflow-action@0.10.0
|
||||
with:
|
||||
workflow_id: all
|
||||
access_token: ${{ github.token }}
|
||||
8
.github/workflows/continuous-integration.yml
vendored
8
.github/workflows/continuous-integration.yml
vendored
@@ -56,10 +56,10 @@ jobs:
|
||||
strategy:
|
||||
matrix:
|
||||
compiler: [gcc7, latest]
|
||||
# We want to always run the tests, but after the docker image build job.
|
||||
# We want to always run the tests unless cancelled, but after the docker image build job.
|
||||
# If there is no new build then we use the old image, else we use the new image.
|
||||
# The latest compiler job isn't using the built image, so it suffers the dependance of the gcc7 job.
|
||||
if: ${{ always() }}
|
||||
if: ${{ !cancelled() }}
|
||||
needs: [BuildAndPushDockerImages]
|
||||
steps:
|
||||
# Free 4Gb of workspace
|
||||
@@ -307,9 +307,9 @@ jobs:
|
||||
|
||||
BuildAndTestDF:
|
||||
runs-on: ubuntu-latest
|
||||
# We want to always run the tests, but after the docker image build job.
|
||||
# We want to always run the tests unless cancelled, but after the docker image build job.
|
||||
# If there is no new build then we use the old image, else we use the new image.
|
||||
if: ${{ always() }}
|
||||
if: ${{ !cancelled() }}
|
||||
needs: [BuildAndPushDockerImages]
|
||||
steps:
|
||||
# A SSH private key is required as some dependencies are from private repos
|
||||
|
||||
Reference in New Issue
Block a user