Skip to content

Commit

Permalink
CI: only for PR & main
Browse files Browse the repository at this point in the history
This allows to remove the job duplicates detection script that
has its own odities and was badly working with automatic merges.

If ones want to have the CI running on its develoment branch, that
person should create a draft PR.
  • Loading branch information
strub committed Oct 1, 2024
1 parent 1f4054e commit acdf4fa
Showing 1 changed file with 7 additions and 22 deletions.
29 changes: 7 additions & 22 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,29 +1,19 @@
name: EasyCrypt compilation & check

on: [push,pull_request,merge_group]
on:
push:
branches:
- 'main'
pull_request:

env:
HOME: /home/charlie
OPAMYES: true
OPAMJOBS: 2

jobs:
pre_job:
name: Check for Duplicates Jobs
runs-on: ubuntu-20.04
outputs:
should_skip: ${{ steps.skip_check.outputs.should_skip }}
steps:
- uses: fkirc/skip-duplicate-actions@v5
id: skip_check
with:
concurrent_skipping: 'same_content_newer'
skip_after_successful_duplicate: 'false'

compile-opam:
name: EasyCrypt compilation (opam)
needs: pre_job
if: needs.pre_job.outputs.should_skip != 'true'
runs-on: ubuntu-20.04
container:
image: ghcr.io/easycrypt/ec-build-box
Expand All @@ -38,8 +28,6 @@ jobs:

compile-nix:
name: EasyCrypt compilation (nix)
needs: pre_job
if: needs.pre_job.outputs.should_skip != 'true'
env:
HOME: /home/runner
runs-on: ubuntu-20.04
Expand All @@ -60,8 +48,7 @@ jobs:
check:
name: Check EasyCrypt Libraries
needs: [pre_job, compile-opam]
if: needs.pre_job.outputs.should_skip != 'true'
needs: compile-opam
runs-on: ubuntu-20.04
container:
image: ghcr.io/easycrypt/ec-build-box
Expand Down Expand Up @@ -95,7 +82,6 @@ jobs:

fetch-external-matrix:
name: Fetch EasyCrypt External Projects Matrix
needs: [pre_job]
runs-on: ubuntu-20.04
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
Expand All @@ -110,8 +96,7 @@ jobs:
external:
name: Check EasyCrypt External Projects
needs: [pre_job, compile-opam, fetch-external-matrix]
if: needs.pre_job.outputs.should_skip != 'true'
needs: [compile-opam, fetch-external-matrix]
runs-on: ubuntu-20.04
container:
image: ghcr.io/easycrypt/ec-build-box
Expand Down

0 comments on commit acdf4fa

Please sign in to comment.