Skip to content

Commit 417ae72

Browse files
authored
experimenting with nix ci (#151)
* experimenting with nix
1 parent f5cc80a commit 417ae72

File tree

4 files changed

+53
-14
lines changed

4 files changed

+53
-14
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# This is a basic workflow to help you get started with Actions
22

3-
name: CI
3+
name: docker CI
44

55
# Controls when the action will run. Triggers the workflow on push or pull request
66
# events but only for the master branch
@@ -11,19 +11,6 @@ on:
1111
branches: [ master ]
1212

1313
jobs:
14-
nix:
15-
runs-on: ubuntu-latest
16-
17-
steps:
18-
- uses: actions/checkout@v2
19-
with:
20-
fetch-depth: 0
21-
- uses: cachix/install-nix-action@v12
22-
- uses: cachix/cachix-action@v8
23-
with:
24-
name: coq
25-
- run: nix-build
26-
2714
opam:
2815
runs-on: ubuntu-latest
2916
strategy:

.github/workflows/nix.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# This is a basic workflow to help you get started with Actions
2+
3+
name: nix CI
4+
5+
# Controls when the action will run. Triggers the workflow on push or pull request
6+
# events but only for the master branch
7+
on:
8+
push:
9+
branches: [ master ]
10+
pull_request:
11+
branches: [ master ]
12+
13+
jobs:
14+
nix:
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- uses: actions/checkout@v2
19+
with:
20+
fetch-depth: 0
21+
- uses: cachix/install-nix-action@v12
22+
- uses: cachix/cachix-action@v8
23+
with:
24+
name: math-comp
25+
extraPullNames: coq
26+
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
27+
- run: nix-build
28+
29+
nixci:
30+
runs-on: ubuntu-latest
31+
needs: nix
32+
33+
steps:
34+
- uses: actions/checkout@v2
35+
with:
36+
fetch-depth: 0
37+
- uses: cachix/install-nix-action@v12
38+
- uses: cachix/cachix-action@v8
39+
with:
40+
name: math-comp
41+
extraPullNames: coq
42+
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
43+
- run: nix-build --arg ci true

.nix/config.nix

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,7 @@
66
select = "coq-8.13";
77
inputs."coq-8.13".coqPackages = {
88
coq.override.version = "8.13";
9+
mathcomp.override.version = "gares:hierarchy-builder";
10+
mathcomp-single.ci = true;
911
};
1012
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{ mathcomp, coq-elpi, hierarchy-builder, version ? null }:
2+
(mathcomp.override {single = true;}).overrideAttrs (old: {
3+
buildPhase = "make -j $(max_jobs) -C mathcomp ./algebra/ssralg.vo";
4+
propagatedBuildInputs = old.propagatedBuildInputs ++
5+
[ coq-elpi hierarchy-builder ];
6+
installPhase = "echo NO INSTALL";
7+
})

0 commit comments

Comments
 (0)