Skip to content

Commit 3162cdb

Browse files
authored
Merge pull request #28 from 4ever2/nix
Nix setup
2 parents 026405f + 5f53736 commit 3162cdb

File tree

8 files changed

+670
-0
lines changed

8 files changed

+670
-0
lines changed
Lines changed: 192 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,192 @@
1+
jobs:
2+
coq:
3+
needs: []
4+
runs-on: ubuntu-latest
5+
steps:
6+
- name: Determine which commit to initially checkout
7+
run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"target_commit=${{\
8+
\ github.sha }}\" >> $GITHUB_ENV\nelse\n echo \"target_commit=${{ github.event.pull_request.head.sha\
9+
\ }}\" >> $GITHUB_ENV\nfi\n"
10+
- name: Git checkout
11+
uses: actions/checkout@v3
12+
with:
13+
fetch-depth: 0
14+
ref: ${{ env.target_commit }}
15+
- name: Determine which commit to test
16+
run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"tested_commit=${{\
17+
\ github.sha }}\" >> $GITHUB_ENV\nelse\n merge_commit=$(git ls-remote ${{\
18+
\ github.event.repository.html_url }} refs/pull/${{ github.event.number }}/merge\
19+
\ | cut -f1)\n mergeable=$(git merge --no-commit --no-ff ${{ github.event.pull_request.base.sha\
20+
\ }} > /dev/null 2>&1; echo $?; git merge --abort > /dev/null 2>&1 || true)\n\
21+
\ if [ -z \"$merge_commit\" -o \"x$mergeable\" != \"x0\" ]; then\n echo\
22+
\ \"tested_commit=${{ github.event.pull_request.head.sha }}\" >> $GITHUB_ENV\n\
23+
\ else\n echo \"tested_commit=$merge_commit\" >> $GITHUB_ENV\n fi\nfi\n"
24+
- name: Git checkout
25+
uses: actions/checkout@v3
26+
with:
27+
fetch-depth: 0
28+
ref: ${{ env.tested_commit }}
29+
- name: Cachix install
30+
uses: cachix/install-nix-action@v27
31+
with:
32+
nix_path: nixpkgs=channel:nixpkgs-unstable
33+
- name: Cachix setup au-cobra
34+
uses: cachix/cachix-action@v15
35+
with:
36+
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
37+
extraPullNames: coq, coq-community, metacoq
38+
name: au-cobra
39+
- id: stepCheck
40+
name: Checking presence of CI target coq
41+
run: "nb_dry_run=$(NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link \\\n --argstr\
42+
\ bundle \"8.17\" --argstr job \"coq\" \\\n --dry-run 2>&1 > /dev/null)\n\
43+
echo $nb_dry_run\necho status=$(echo $nb_dry_run | grep \"built:\" | sed \"\
44+
s/.*/built/\") >> $GITHUB_OUTPUT\n"
45+
- if: steps.stepCheck.outputs.status == 'built'
46+
name: Building/fetching current CI target
47+
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "8.17" --argstr
48+
job "coq"
49+
metacoq:
50+
needs:
51+
- coq
52+
runs-on: ubuntu-latest
53+
steps:
54+
- name: Determine which commit to initially checkout
55+
run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"target_commit=${{\
56+
\ github.sha }}\" >> $GITHUB_ENV\nelse\n echo \"target_commit=${{ github.event.pull_request.head.sha\
57+
\ }}\" >> $GITHUB_ENV\nfi\n"
58+
- name: Git checkout
59+
uses: actions/checkout@v3
60+
with:
61+
fetch-depth: 0
62+
ref: ${{ env.target_commit }}
63+
- name: Determine which commit to test
64+
run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"tested_commit=${{\
65+
\ github.sha }}\" >> $GITHUB_ENV\nelse\n merge_commit=$(git ls-remote ${{\
66+
\ github.event.repository.html_url }} refs/pull/${{ github.event.number }}/merge\
67+
\ | cut -f1)\n mergeable=$(git merge --no-commit --no-ff ${{ github.event.pull_request.base.sha\
68+
\ }} > /dev/null 2>&1; echo $?; git merge --abort > /dev/null 2>&1 || true)\n\
69+
\ if [ -z \"$merge_commit\" -o \"x$mergeable\" != \"x0\" ]; then\n echo\
70+
\ \"tested_commit=${{ github.event.pull_request.head.sha }}\" >> $GITHUB_ENV\n\
71+
\ else\n echo \"tested_commit=$merge_commit\" >> $GITHUB_ENV\n fi\nfi\n"
72+
- name: Git checkout
73+
uses: actions/checkout@v3
74+
with:
75+
fetch-depth: 0
76+
ref: ${{ env.tested_commit }}
77+
- name: Cachix install
78+
uses: cachix/install-nix-action@v27
79+
with:
80+
nix_path: nixpkgs=channel:nixpkgs-unstable
81+
- name: Cachix setup au-cobra
82+
uses: cachix/cachix-action@v15
83+
with:
84+
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
85+
extraPullNames: coq, coq-community, metacoq
86+
name: au-cobra
87+
- id: stepCheck
88+
name: Checking presence of CI target metacoq
89+
run: "nb_dry_run=$(NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link \\\n --argstr\
90+
\ bundle \"8.17\" --argstr job \"metacoq\" \\\n --dry-run 2>&1 > /dev/null)\n\
91+
echo $nb_dry_run\necho status=$(echo $nb_dry_run | grep \"built:\" | sed \"\
92+
s/.*/built/\") >> $GITHUB_OUTPUT\n"
93+
- if: steps.stepCheck.outputs.status == 'built'
94+
name: 'Building/fetching previous CI target: coq'
95+
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "8.17" --argstr
96+
job "coq"
97+
- if: steps.stepCheck.outputs.status == 'built'
98+
name: 'Building/fetching previous CI target: equations'
99+
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "8.17" --argstr
100+
job "equations"
101+
- if: steps.stepCheck.outputs.status == 'built'
102+
name: 'Building/fetching previous CI target: metacoq-template-coq'
103+
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "8.17" --argstr
104+
job "metacoq-template-coq"
105+
- if: steps.stepCheck.outputs.status == 'built'
106+
name: 'Building/fetching previous CI target: metacoq-pcuic'
107+
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "8.17" --argstr
108+
job "metacoq-pcuic"
109+
- if: steps.stepCheck.outputs.status == 'built'
110+
name: 'Building/fetching previous CI target: metacoq-safechecker'
111+
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "8.17" --argstr
112+
job "metacoq-safechecker"
113+
- if: steps.stepCheck.outputs.status == 'built'
114+
name: 'Building/fetching previous CI target: metacoq-erasure'
115+
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "8.17" --argstr
116+
job "metacoq-erasure"
117+
- if: steps.stepCheck.outputs.status == 'built'
118+
name: Building/fetching current CI target
119+
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "8.17" --argstr
120+
job "metacoq"
121+
rust-extraction:
122+
needs:
123+
- coq
124+
- metacoq
125+
runs-on: ubuntu-latest
126+
steps:
127+
- name: Determine which commit to initially checkout
128+
run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"target_commit=${{\
129+
\ github.sha }}\" >> $GITHUB_ENV\nelse\n echo \"target_commit=${{ github.event.pull_request.head.sha\
130+
\ }}\" >> $GITHUB_ENV\nfi\n"
131+
- name: Git checkout
132+
uses: actions/checkout@v3
133+
with:
134+
fetch-depth: 0
135+
ref: ${{ env.target_commit }}
136+
- name: Determine which commit to test
137+
run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"tested_commit=${{\
138+
\ github.sha }}\" >> $GITHUB_ENV\nelse\n merge_commit=$(git ls-remote ${{\
139+
\ github.event.repository.html_url }} refs/pull/${{ github.event.number }}/merge\
140+
\ | cut -f1)\n mergeable=$(git merge --no-commit --no-ff ${{ github.event.pull_request.base.sha\
141+
\ }} > /dev/null 2>&1; echo $?; git merge --abort > /dev/null 2>&1 || true)\n\
142+
\ if [ -z \"$merge_commit\" -o \"x$mergeable\" != \"x0\" ]; then\n echo\
143+
\ \"tested_commit=${{ github.event.pull_request.head.sha }}\" >> $GITHUB_ENV\n\
144+
\ else\n echo \"tested_commit=$merge_commit\" >> $GITHUB_ENV\n fi\nfi\n"
145+
- name: Git checkout
146+
uses: actions/checkout@v3
147+
with:
148+
fetch-depth: 0
149+
ref: ${{ env.tested_commit }}
150+
- name: Cachix install
151+
uses: cachix/install-nix-action@v27
152+
with:
153+
nix_path: nixpkgs=channel:nixpkgs-unstable
154+
- name: Cachix setup au-cobra
155+
uses: cachix/cachix-action@v15
156+
with:
157+
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
158+
extraPullNames: coq, coq-community, metacoq
159+
name: au-cobra
160+
- id: stepCheck
161+
name: Checking presence of CI target rust-extraction
162+
run: "nb_dry_run=$(NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link \\\n --argstr\
163+
\ bundle \"8.17\" --argstr job \"rust-extraction\" \\\n --dry-run 2>&1 >\
164+
\ /dev/null)\necho $nb_dry_run\necho status=$(echo $nb_dry_run | grep \"built:\"\
165+
\ | sed \"s/.*/built/\") >> $GITHUB_OUTPUT\n"
166+
- if: steps.stepCheck.outputs.status == 'built'
167+
name: 'Building/fetching previous CI target: coq'
168+
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "8.17" --argstr
169+
job "coq"
170+
- if: steps.stepCheck.outputs.status == 'built'
171+
name: 'Building/fetching previous CI target: metacoq'
172+
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "8.17" --argstr
173+
job "metacoq"
174+
- if: steps.stepCheck.outputs.status == 'built'
175+
name: Building/fetching current CI target
176+
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "8.17" --argstr
177+
job "rust-extraction"
178+
name: Nix CI for bundle 8.17
179+
'on':
180+
pull_request:
181+
paths:
182+
- .github/workflows/nix-action-8.17.yml
183+
pull_request_target:
184+
paths-ignore:
185+
- .github/workflows/nix-action-8.17.yml
186+
types:
187+
- opened
188+
- synchronize
189+
- reopened
190+
push:
191+
branches:
192+
- master
Lines changed: 192 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,192 @@
1+
jobs:
2+
coq:
3+
needs: []
4+
runs-on: ubuntu-latest
5+
steps:
6+
- name: Determine which commit to initially checkout
7+
run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"target_commit=${{\
8+
\ github.sha }}\" >> $GITHUB_ENV\nelse\n echo \"target_commit=${{ github.event.pull_request.head.sha\
9+
\ }}\" >> $GITHUB_ENV\nfi\n"
10+
- name: Git checkout
11+
uses: actions/checkout@v3
12+
with:
13+
fetch-depth: 0
14+
ref: ${{ env.target_commit }}
15+
- name: Determine which commit to test
16+
run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"tested_commit=${{\
17+
\ github.sha }}\" >> $GITHUB_ENV\nelse\n merge_commit=$(git ls-remote ${{\
18+
\ github.event.repository.html_url }} refs/pull/${{ github.event.number }}/merge\
19+
\ | cut -f1)\n mergeable=$(git merge --no-commit --no-ff ${{ github.event.pull_request.base.sha\
20+
\ }} > /dev/null 2>&1; echo $?; git merge --abort > /dev/null 2>&1 || true)\n\
21+
\ if [ -z \"$merge_commit\" -o \"x$mergeable\" != \"x0\" ]; then\n echo\
22+
\ \"tested_commit=${{ github.event.pull_request.head.sha }}\" >> $GITHUB_ENV\n\
23+
\ else\n echo \"tested_commit=$merge_commit\" >> $GITHUB_ENV\n fi\nfi\n"
24+
- name: Git checkout
25+
uses: actions/checkout@v3
26+
with:
27+
fetch-depth: 0
28+
ref: ${{ env.tested_commit }}
29+
- name: Cachix install
30+
uses: cachix/install-nix-action@v27
31+
with:
32+
nix_path: nixpkgs=channel:nixpkgs-unstable
33+
- name: Cachix setup au-cobra
34+
uses: cachix/cachix-action@v15
35+
with:
36+
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
37+
extraPullNames: coq, coq-community, metacoq
38+
name: au-cobra
39+
- id: stepCheck
40+
name: Checking presence of CI target coq
41+
run: "nb_dry_run=$(NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link \\\n --argstr\
42+
\ bundle \"8.18\" --argstr job \"coq\" \\\n --dry-run 2>&1 > /dev/null)\n\
43+
echo $nb_dry_run\necho status=$(echo $nb_dry_run | grep \"built:\" | sed \"\
44+
s/.*/built/\") >> $GITHUB_OUTPUT\n"
45+
- if: steps.stepCheck.outputs.status == 'built'
46+
name: Building/fetching current CI target
47+
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "8.18" --argstr
48+
job "coq"
49+
metacoq:
50+
needs:
51+
- coq
52+
runs-on: ubuntu-latest
53+
steps:
54+
- name: Determine which commit to initially checkout
55+
run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"target_commit=${{\
56+
\ github.sha }}\" >> $GITHUB_ENV\nelse\n echo \"target_commit=${{ github.event.pull_request.head.sha\
57+
\ }}\" >> $GITHUB_ENV\nfi\n"
58+
- name: Git checkout
59+
uses: actions/checkout@v3
60+
with:
61+
fetch-depth: 0
62+
ref: ${{ env.target_commit }}
63+
- name: Determine which commit to test
64+
run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"tested_commit=${{\
65+
\ github.sha }}\" >> $GITHUB_ENV\nelse\n merge_commit=$(git ls-remote ${{\
66+
\ github.event.repository.html_url }} refs/pull/${{ github.event.number }}/merge\
67+
\ | cut -f1)\n mergeable=$(git merge --no-commit --no-ff ${{ github.event.pull_request.base.sha\
68+
\ }} > /dev/null 2>&1; echo $?; git merge --abort > /dev/null 2>&1 || true)\n\
69+
\ if [ -z \"$merge_commit\" -o \"x$mergeable\" != \"x0\" ]; then\n echo\
70+
\ \"tested_commit=${{ github.event.pull_request.head.sha }}\" >> $GITHUB_ENV\n\
71+
\ else\n echo \"tested_commit=$merge_commit\" >> $GITHUB_ENV\n fi\nfi\n"
72+
- name: Git checkout
73+
uses: actions/checkout@v3
74+
with:
75+
fetch-depth: 0
76+
ref: ${{ env.tested_commit }}
77+
- name: Cachix install
78+
uses: cachix/install-nix-action@v27
79+
with:
80+
nix_path: nixpkgs=channel:nixpkgs-unstable
81+
- name: Cachix setup au-cobra
82+
uses: cachix/cachix-action@v15
83+
with:
84+
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
85+
extraPullNames: coq, coq-community, metacoq
86+
name: au-cobra
87+
- id: stepCheck
88+
name: Checking presence of CI target metacoq
89+
run: "nb_dry_run=$(NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link \\\n --argstr\
90+
\ bundle \"8.18\" --argstr job \"metacoq\" \\\n --dry-run 2>&1 > /dev/null)\n\
91+
echo $nb_dry_run\necho status=$(echo $nb_dry_run | grep \"built:\" | sed \"\
92+
s/.*/built/\") >> $GITHUB_OUTPUT\n"
93+
- if: steps.stepCheck.outputs.status == 'built'
94+
name: 'Building/fetching previous CI target: coq'
95+
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "8.18" --argstr
96+
job "coq"
97+
- if: steps.stepCheck.outputs.status == 'built'
98+
name: 'Building/fetching previous CI target: equations'
99+
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "8.18" --argstr
100+
job "equations"
101+
- if: steps.stepCheck.outputs.status == 'built'
102+
name: 'Building/fetching previous CI target: metacoq-template-coq'
103+
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "8.18" --argstr
104+
job "metacoq-template-coq"
105+
- if: steps.stepCheck.outputs.status == 'built'
106+
name: 'Building/fetching previous CI target: metacoq-pcuic'
107+
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "8.18" --argstr
108+
job "metacoq-pcuic"
109+
- if: steps.stepCheck.outputs.status == 'built'
110+
name: 'Building/fetching previous CI target: metacoq-safechecker'
111+
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "8.18" --argstr
112+
job "metacoq-safechecker"
113+
- if: steps.stepCheck.outputs.status == 'built'
114+
name: 'Building/fetching previous CI target: metacoq-erasure'
115+
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "8.18" --argstr
116+
job "metacoq-erasure"
117+
- if: steps.stepCheck.outputs.status == 'built'
118+
name: Building/fetching current CI target
119+
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "8.18" --argstr
120+
job "metacoq"
121+
rust-extraction:
122+
needs:
123+
- coq
124+
- metacoq
125+
runs-on: ubuntu-latest
126+
steps:
127+
- name: Determine which commit to initially checkout
128+
run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"target_commit=${{\
129+
\ github.sha }}\" >> $GITHUB_ENV\nelse\n echo \"target_commit=${{ github.event.pull_request.head.sha\
130+
\ }}\" >> $GITHUB_ENV\nfi\n"
131+
- name: Git checkout
132+
uses: actions/checkout@v3
133+
with:
134+
fetch-depth: 0
135+
ref: ${{ env.target_commit }}
136+
- name: Determine which commit to test
137+
run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"tested_commit=${{\
138+
\ github.sha }}\" >> $GITHUB_ENV\nelse\n merge_commit=$(git ls-remote ${{\
139+
\ github.event.repository.html_url }} refs/pull/${{ github.event.number }}/merge\
140+
\ | cut -f1)\n mergeable=$(git merge --no-commit --no-ff ${{ github.event.pull_request.base.sha\
141+
\ }} > /dev/null 2>&1; echo $?; git merge --abort > /dev/null 2>&1 || true)\n\
142+
\ if [ -z \"$merge_commit\" -o \"x$mergeable\" != \"x0\" ]; then\n echo\
143+
\ \"tested_commit=${{ github.event.pull_request.head.sha }}\" >> $GITHUB_ENV\n\
144+
\ else\n echo \"tested_commit=$merge_commit\" >> $GITHUB_ENV\n fi\nfi\n"
145+
- name: Git checkout
146+
uses: actions/checkout@v3
147+
with:
148+
fetch-depth: 0
149+
ref: ${{ env.tested_commit }}
150+
- name: Cachix install
151+
uses: cachix/install-nix-action@v27
152+
with:
153+
nix_path: nixpkgs=channel:nixpkgs-unstable
154+
- name: Cachix setup au-cobra
155+
uses: cachix/cachix-action@v15
156+
with:
157+
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
158+
extraPullNames: coq, coq-community, metacoq
159+
name: au-cobra
160+
- id: stepCheck
161+
name: Checking presence of CI target rust-extraction
162+
run: "nb_dry_run=$(NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link \\\n --argstr\
163+
\ bundle \"8.18\" --argstr job \"rust-extraction\" \\\n --dry-run 2>&1 >\
164+
\ /dev/null)\necho $nb_dry_run\necho status=$(echo $nb_dry_run | grep \"built:\"\
165+
\ | sed \"s/.*/built/\") >> $GITHUB_OUTPUT\n"
166+
- if: steps.stepCheck.outputs.status == 'built'
167+
name: 'Building/fetching previous CI target: coq'
168+
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "8.18" --argstr
169+
job "coq"
170+
- if: steps.stepCheck.outputs.status == 'built'
171+
name: 'Building/fetching previous CI target: metacoq'
172+
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "8.18" --argstr
173+
job "metacoq"
174+
- if: steps.stepCheck.outputs.status == 'built'
175+
name: Building/fetching current CI target
176+
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "8.18" --argstr
177+
job "rust-extraction"
178+
name: Nix CI for bundle 8.18
179+
'on':
180+
pull_request:
181+
paths:
182+
- .github/workflows/nix-action-8.18.yml
183+
pull_request_target:
184+
paths-ignore:
185+
- .github/workflows/nix-action-8.18.yml
186+
types:
187+
- opened
188+
- synchronize
189+
- reopened
190+
push:
191+
branches:
192+
- master

0 commit comments

Comments
 (0)