Skip to content

Commit cf7ea17

Browse files
committed
chore(nix): switch to standard nix pin
+ iohk nix was too slow in ci without caching
1 parent 75d0a9c commit cf7ea17

File tree

5 files changed

+54
-667
lines changed

5 files changed

+54
-667
lines changed

.github/workflows/haskell-nix.yml

Lines changed: 8 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Haskell CI with Nix
1+
name: Nix CI
22

33
on:
44
push:
@@ -10,8 +10,6 @@ permissions:
1010
jobs:
1111
nix-ci:
1212
runs-on: ubuntu-latest
13-
env:
14-
NIX_CONFIG: accept-flake-config = true
1513

1614
steps:
1715
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
@@ -25,34 +23,11 @@ jobs:
2523
- name: Enable Nix cache
2624
uses: DeterminateSystems/magic-nix-cache-action@565684385bcd71bad329742eefe8d12f2e765b39 # v13
2725

28-
- name: Show toolchain versions from nix shell
29-
shell: bash
26+
- name: Build and test
3027
run: |
31-
nix develop --command bash -lc 'ghc --numeric-version'
32-
nix develop --command bash -lc 'cabal --numeric-version'
33-
nix develop --command bash -lc 'stack --numeric-version || true'
34-
nix develop --command bash -lc 'fourmolu --version'
35-
36-
- name: Check formatting
37-
run: nix develop --command make format-check
38-
39-
- name: Check cabal file
40-
run: nix develop --command make cabal-check
41-
42-
- name: Update cabal package index
43-
run: nix develop --command make cabal-update
44-
45-
- name: Configure the build
46-
run: nix develop --command make configure
47-
48-
- name: Build dependencies
49-
run: nix develop --command make deps
50-
51-
- name: Build the package
52-
run: nix develop --command make build
53-
54-
- name: Run tests
55-
run: nix develop --command make test
56-
57-
- name: Build documentation
58-
run: nix develop --command make docs
28+
nix develop --command bash -c '
29+
# hsc2hs-generated test binaries crash in nix shells on Linux
30+
# ("stack smashing detected") due to hardening flags.
31+
# --cross-compile avoids running those binaries entirely.
32+
CABAL_CONFIGURE_FLAGS="--hsc2hs-option=--cross-compile" make ci
33+
'

.github/workflows/update-flake.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@ permissions:
1313
jobs:
1414
update-flake:
1515
runs-on: ubuntu-latest
16-
env:
17-
NIX_CONFIG: accept-flake-config = true
1816

1917
steps:
2018
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ cabal-update:
2020

2121
.PHONY: configure
2222
configure:
23-
cabal configure --enable-tests --enable-benchmarks --disable-documentation
23+
cabal configure --enable-tests --enable-benchmarks --disable-documentation $(CABAL_CONFIGURE_FLAGS)
2424
cabal build --dry-run
2525

2626
.PHONY: deps

0 commit comments

Comments
 (0)