Skip to content

Commit 0fc7acc

Browse files
committed
move to cabal, nix flakes, autoformat
1 parent 9a38b17 commit 0fc7acc

24 files changed

+4723
-3364
lines changed

.envrc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
watch_file *.cabal
2+
use flake

.github/workflows/flake-ci.yml

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
name: "Flake CI"
2+
on:
3+
pull_request:
4+
push:
5+
jobs:
6+
checks:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- name: Free Disk Space
10+
uses: insightsengineering/free-disk-space@v1.1.0
11+
- uses: actions/checkout@v3
12+
- uses: webfactory/ssh-agent@v0.9.0
13+
with:
14+
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
15+
- uses: cachix/install-nix-action@v22
16+
with:
17+
nix_path: nixpkgs=channel:nixos-unstable
18+
github_access_token: ${{ secrets.GITHUB_TOKEN }}
19+
extra_nix_config: |
20+
trusted-public-keys = hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= loony-tools:pr9m4BkM/5/eSTZlkQyRt57Jz7OMBxNSUiMC4FkcNfk=
21+
allow-import-from-derivation = true
22+
auto-optimise-store = true
23+
substituters = https://hydra.iohk.io https://cache.nixos.org/ https://cache.iog.io https://cache.zw3rk.com https://mstksg.cachix.org
24+
- uses: cachix/cachix-action@v13
25+
with:
26+
name: mstksg
27+
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
28+
- run: nix flake check --show-trace
29+
30+
cache:
31+
runs-on: ubuntu-latest
32+
steps:
33+
- name: Free Disk Space
34+
uses: insightsengineering/free-disk-space@v1.1.0
35+
- uses: actions/checkout@v4.1.1
36+
- uses: webfactory/ssh-agent@v0.9.0
37+
with:
38+
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
39+
- uses: cachix/install-nix-action@v22
40+
with:
41+
nix_path: nixpkgs=channel:nixos-unstable
42+
github_access_token: ${{ secrets.GITHUB_TOKEN }}
43+
extra_nix_config: |
44+
trusted-public-keys = hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= loony-tools:pr9m4BkM/5/eSTZlkQyRt57Jz7OMBxNSUiMC4FkcNfk=
45+
allow-import-from-derivation = true
46+
auto-optimise-store = true
47+
substituters = https://hydra.iohk.io https://cache.nixos.org/ https://cache.iog.io https://cache.zw3rk.com https://mstksg.cachix.org
48+
- uses: cachix/cachix-action@v13
49+
with:
50+
name: mstksg
51+
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
52+
- run: nix build --show-trace
53+
- run: nix develop --show-trace
54+
55+
every-compiler:
56+
runs-on: ubuntu-latest
57+
steps:
58+
- name: Free Disk Space
59+
uses: insightsengineering/free-disk-space@v1.1.0
60+
- uses: actions/checkout@v3
61+
- uses: webfactory/ssh-agent@v0.9.0
62+
with:
63+
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
64+
- uses: cachix/install-nix-action@v22
65+
with:
66+
nix_path: nixpkgs=channel:nixos-unstable
67+
github_access_token: ${{ secrets.GITHUB_TOKEN }}
68+
extra_nix_config: |
69+
trusted-public-keys = hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= loony-tools:pr9m4BkM/5/eSTZlkQyRt57Jz7OMBxNSUiMC4FkcNfk=
70+
allow-import-from-derivation = true
71+
auto-optimise-store = true
72+
substituters = https://hydra.iohk.io https://cache.nixos.org/ https://cache.iog.io https://cache.zw3rk.com https://mstksg.cachix.org
73+
- uses: cachix/cachix-action@v13
74+
with:
75+
name: mstksg
76+
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
77+
- run: nix build .#everyCompiler
78+

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
/.stack-work
22
/.shake
33
/.build
4+
/.direnv
45
/wiki
56
/tags
67
/TAGS
78
/data
89
/samples-exe
9-
/*.cabal
1010
/dist-newstyle
1111

1212
/bench-results
@@ -19,3 +19,4 @@
1919
*.dyn_o
2020
*.o
2121
*.hi
22+
/result

0 commit comments

Comments
 (0)