Skip to content

Commit 308ac2e

Browse files
committed
Do not install HLS on CI
1 parent b6283e0 commit 308ac2e

File tree

2 files changed

+13
-14
lines changed

2 files changed

+13
-14
lines changed

.github/workflows/ci.yaml

+11-11
Original file line numberDiff line numberDiff line change
@@ -27,19 +27,19 @@ jobs:
2727
key: cabal-deps-${{ runner.os }}-${{ hashFiles('nix/sources.json') }}-${{ matrix.ghc-version }}-v${{ env.cache-invalidation-key }}-${{ hashFiles('linear-base.cabal') }}-${{ github.sha }}
2828
restore-keys: cabal-deps-${{ runner.os }}-${{ hashFiles('nix/sources.json') }}-${{ matrix.ghc-version }}-v${{ env.cache-invalidation-key }}-${{ hashFiles('linear-base.cabal') }}-
2929
- name: Build Nix dependencies
30-
run: nix-shell --arg ghcVersion '"${{ matrix.ghc-version }}"' --pure --run "echo '=== Nix dependencies installed ==='"
30+
run: nix-shell --arg ghcVersion '"${{ matrix.ghc-version }}"' --arg installHls 'false' --pure --run "echo '=== Nix dependencies installed ==='"
3131
- name: Init Cabal's config file
32-
run: nix-shell --arg ghcVersion '"${{ matrix.ghc-version }}"' --pure --run "cabal --config-file=/home/runner/.cabal/config user-config -f init"
32+
run: nix-shell --arg ghcVersion '"${{ matrix.ghc-version }}"' --arg installHls 'false' --pure --run "cabal --config-file=/home/runner/.cabal/config user-config -f init"
3333
- name: Update Cabal's database
34-
run: nix-shell --arg ghcVersion '"${{ matrix.ghc-version }}"' --pure --run "cabal update"
34+
run: nix-shell --arg ghcVersion '"${{ matrix.ghc-version }}"' --arg installHls 'false' --pure --run "cabal update"
3535
- name: Build Cabal's dependencies
36-
run: nix-shell --arg ghcVersion '"${{ matrix.ghc-version }}"' --pure --run "cabal build --allow-newer --disable-tests --disable-benchmarks --dependencies-only"
36+
run: nix-shell --arg ghcVersion '"${{ matrix.ghc-version }}"' --arg installHls 'false' --pure --run "cabal build --allow-newer --disable-tests --disable-benchmarks --dependencies-only"
3737
- name: Build
38-
run: nix-shell --arg ghcVersion '"${{ matrix.ghc-version }}"' --pure --run "cabal build --allow-newer --disable-tests --disable-benchmarks"
38+
run: nix-shell --arg ghcVersion '"${{ matrix.ghc-version }}"' --arg installHls 'false' --pure --run "cabal build --allow-newer --disable-tests --disable-benchmarks"
3939
- name: Haddock
40-
run: nix-shell --arg ghcVersion '"${{ matrix.ghc-version }}"' --pure --run "cabal --allow-newer haddock"
40+
run: nix-shell --arg ghcVersion '"${{ matrix.ghc-version }}"' --arg installHls 'false' --pure --run "cabal --allow-newer haddock"
4141
- name: cabal-docspec
42-
run: nix-shell --arg ghcVersion '"${{ matrix.ghc-version }}"' --pure --run cabal-docspec
42+
run: nix-shell --arg ghcVersion '"${{ matrix.ghc-version }}"' --arg installHls 'false' --pure --run cabal-docspec
4343

4444
ormolu:
4545
name: check formatting with ormolu
@@ -56,9 +56,9 @@ jobs:
5656
key: stack-deps-ormolu-${{ runner.os }}-${{ hashFiles('nix/sources.json') }}-v${{ env.cache-invalidation-key }}-${{ hashFiles('stack.yaml.lock') }}-${{ github.sha }}
5757
restore-keys: stack-deps-ormolu-${{ runner.os }}-${{ hashFiles('nix/sources.json') }}-v${{ env.cache-invalidation-key }}-${{ hashFiles('stack.yaml.lock') }}-
5858
- name: Build Nix dependencies
59-
run: nix-shell --pure --run "echo '=== Nix dependencies installed ==='"
59+
run: nix-shell --arg installHls 'false' --pure --run "echo '=== Nix dependencies installed ==='"
6060
- name: check formatting
61-
run: nix-shell --pure --run 'stack build ormolu && stack exec ormolu -- -m check $(find . -type f -name "*.hs-boot" -o -name "*.hs")'
61+
run: nix-shell --arg installHls 'false' --pure --run 'stack build ormolu && stack exec ormolu -- -m check $(find . -type f -name "*.hs-boot" -o -name "*.hs")'
6262

6363
stack-build:
6464
name: stack build
@@ -75,6 +75,6 @@ jobs:
7575
key: stack-deps-${{ runner.os }}-${{ hashFiles('nix/sources.json') }}-v${{ env.cache-invalidation-key }}-${{ hashFiles('stack.yaml.lock', 'linear-base.cabal') }}-${{ github.sha }}
7676
restore-keys: stack-deps-${{ runner.os }}-${{ hashFiles('nix/sources.json') }}-v${{ env.cache-invalidation-key }}-${{ hashFiles('stack.yaml.lock', 'linear-base.cabal') }}-
7777
- name: Build Nix dependencies
78-
run: nix-shell --pure --run "echo '=== Nix dependencies installed ==='"
78+
run: nix-shell --arg installHls 'false' --pure --run "echo '=== Nix dependencies installed ==='"
7979
- name: Build
80-
run: nix-shell --pure --run "stack build --pedantic --test --bench --no-run-benchmarks"
80+
run: nix-shell --arg installHls 'false' --pure --run "stack build --pedantic --test --bench --no-run-benchmarks"

shell.nix

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{ system ? builtins.currentSystem, sources ? import ./nix/sources.nix, ghcVersion ? "96" }:
1+
{ system ? builtins.currentSystem, sources ? import ./nix/sources.nix, ghcVersion ? "96", installHls ? true }:
22

33
let
44
selectHls = self: super: {
@@ -32,6 +32,5 @@ mkShell {
3232
stack-wrapped
3333
nix
3434
cabal-docspec
35-
haskell-language-server
36-
];
35+
] ++ (if installHls then [ haskell-language-server ] else []);
3736
}

0 commit comments

Comments
 (0)