11name : EasyCrypt compilation & check
22
3- on : [push,pull_request,merge_group]
3+ on :
4+ push :
5+ branches :
6+ - ' main'
7+ pull_request :
48
59env :
610 HOME : /home/charlie
711 OPAMYES : true
812 OPAMJOBS : 2
913
1014jobs :
11- pre_job :
12- name : Check for Duplicates Jobs
13- runs-on : ubuntu-20.04
14- outputs :
15- should_skip : ${{ steps.skip_check.outputs.should_skip }}
16- steps :
17- - uses : fkirc/skip-duplicate-actions@v5
18- id : skip_check
19- with :
20- concurrent_skipping : ' same_content_newer'
21- skip_after_successful_duplicate : ' false'
22-
2315 compile-opam :
2416 name : EasyCrypt compilation (opam)
25- needs : pre_job
26- if : needs.pre_job.outputs.should_skip != 'true'
27- runs-on : ubuntu-20.04
17+ runs-on : ubuntu-24.04
2818 container :
2919 image : ghcr.io/easycrypt/ec-build-box
3020 steps :
@@ -34,15 +24,13 @@ jobs:
3424 opam pin add -n easycrypt .
3525 opam install --deps-only easycrypt
3626 - name : Compile EasyCrypt
37- run : opam exec -- make
27+ run : opam exec -- make PROFILE=ci
3828
3929 compile-nix :
4030 name : EasyCrypt compilation (nix)
41- needs : pre_job
42- if : needs.pre_job.outputs.should_skip != 'true'
4331 env :
4432 HOME : /home/runner
45- runs-on : ubuntu-20 .04
33+ runs-on : ubuntu-24 .04
4634 steps :
4735 - uses : actions/checkout@v4
4836 - name : Setup Nix
6048
6149 check :
6250 name : Check EasyCrypt Libraries
63- needs : [pre_job, compile-opam]
64- if : needs.pre_job.outputs.should_skip != 'true'
65- runs-on : ubuntu-20.04
51+ needs : compile-opam
52+ runs-on : ubuntu-24.04
6653 container :
6754 image : ghcr.io/easycrypt/ec-build-box
6855 strategy :
9582
9683 fetch-external-matrix :
9784 name : Fetch EasyCrypt External Projects Matrix
98- needs : [pre_job]
99- runs-on : ubuntu-20.04
85+ runs-on : ubuntu-24.04
10086 outputs :
10187 matrix : ${{ steps.set-matrix.outputs.matrix }}
10288 steps :
11096
11197 external :
11298 name : Check EasyCrypt External Projects
113- needs : [pre_job, compile-opam, fetch-external-matrix]
114- if : needs.pre_job.outputs.should_skip != 'true'
115- runs-on : ubuntu-20.04
99+ needs : [compile-opam, fetch-external-matrix]
100+ runs-on : ubuntu-24.04
116101 container :
117102 image : ghcr.io/easycrypt/ec-build-box
118103 strategy :
@@ -123,10 +108,21 @@ jobs:
123108 - uses : actions/checkout@v4
124109 with :
125110 path : easycrypt
111+ - name : Extract target branch name
112+ run : echo "branch=merge-${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT
113+ id : extract_branch
114+ - name : Find remote branch
115+ id : branch_name
116+ run : |
117+ git ls-remote --exit-code --heads ${{ matrix.target.repository }} refs/heads/${{ steps.extract_branch.outputs.branch }} || exists=$?
118+ if [ "$exists" = "2" ];
119+ then echo "REPO_BRANCH=${{ matrix.target.branch }}" >> $GITHUB_OUTPUT;
120+ else echo "REPO_BRANCH=${{ steps.extract_branch.outputs.branch }}" >> $GITHUB_OUTPUT;
121+ fi
126122 - name : Checkout External Project
127123 run : |
128124 git clone --recurse-submodules \
129- -b ${{ matrix.target.branch }} \
125+ -b ${{ steps.branch_name.outputs.REPO_BRANCH }} \
130126 ${{ matrix.target.repository }} \
131127 project/${{ matrix.target.name }}
132128 - name : Install EasyCrypt dependencies
@@ -163,7 +159,7 @@ jobs:
163159 name : Check EasyCrypt External Projects (set-status)
164160 if : always()
165161 needs : [external]
166- runs-on : ubuntu-20 .04
162+ runs-on : ubuntu-24 .04
167163 steps :
168164 - uses : re-actors/alls-green@release/v1
169165 with :
@@ -176,7 +172,7 @@ jobs:
176172 if : |
177173 (github.event_name == 'push') ||
178174 (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository)
179- runs-on : ubuntu-20 .04
175+ runs-on : ubuntu-24 .04
180176 steps :
181177 - uses : technote-space/workflow-conclusion-action@v3
182178 - uses : zulip/github-actions-zulip/send-message@v1
0 commit comments