1
1
name : EasyCrypt compilation & check
2
2
3
- on : [push,pull_request,merge_group]
3
+ on :
4
+ push :
5
+ branches :
6
+ - ' main'
7
+ pull_request :
4
8
5
9
env :
6
10
HOME : /home/charlie
7
11
OPAMYES : true
8
12
OPAMJOBS : 2
9
13
10
14
jobs :
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
-
23
15
compile-opam :
24
16
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
28
18
container :
29
19
image : ghcr.io/easycrypt/ec-build-box
30
20
steps :
@@ -34,15 +24,13 @@ jobs:
34
24
opam pin add -n easycrypt .
35
25
opam install --deps-only easycrypt
36
26
- name : Compile EasyCrypt
37
- run : opam exec -- make
27
+ run : opam exec -- make PROFILE=ci
38
28
39
29
compile-nix :
40
30
name : EasyCrypt compilation (nix)
41
- needs : pre_job
42
- if : needs.pre_job.outputs.should_skip != 'true'
43
31
env :
44
32
HOME : /home/runner
45
- runs-on : ubuntu-20 .04
33
+ runs-on : ubuntu-24 .04
46
34
steps :
47
35
- uses : actions/checkout@v4
48
36
- name : Setup Nix
60
48
61
49
check :
62
50
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
66
53
container :
67
54
image : ghcr.io/easycrypt/ec-build-box
68
55
strategy :
95
82
96
83
fetch-external-matrix :
97
84
name : Fetch EasyCrypt External Projects Matrix
98
- needs : [pre_job]
99
- runs-on : ubuntu-20.04
85
+ runs-on : ubuntu-24.04
100
86
outputs :
101
87
matrix : ${{ steps.set-matrix.outputs.matrix }}
102
88
steps :
110
96
111
97
external :
112
98
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
116
101
container :
117
102
image : ghcr.io/easycrypt/ec-build-box
118
103
strategy :
@@ -123,10 +108,21 @@ jobs:
123
108
- uses : actions/checkout@v4
124
109
with :
125
110
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
126
122
- name : Checkout External Project
127
123
run : |
128
124
git clone --recurse-submodules \
129
- -b ${{ matrix.target.branch }} \
125
+ -b ${{ steps.branch_name.outputs.REPO_BRANCH }} \
130
126
${{ matrix.target.repository }} \
131
127
project/${{ matrix.target.name }}
132
128
- name : Install EasyCrypt dependencies
@@ -163,7 +159,7 @@ jobs:
163
159
name : Check EasyCrypt External Projects (set-status)
164
160
if : always()
165
161
needs : [external]
166
- runs-on : ubuntu-20 .04
162
+ runs-on : ubuntu-24 .04
167
163
steps :
168
164
- uses : re-actors/alls-green@release/v1
169
165
with :
@@ -176,7 +172,7 @@ jobs:
176
172
if : |
177
173
(github.event_name == 'push') ||
178
174
(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
180
176
steps :
181
177
- uses : technote-space/workflow-conclusion-action@v3
182
178
- uses : zulip/github-actions-zulip/send-message@v1
0 commit comments