1818 runs-on : ubuntu-latest
1919 outputs :
2020 should_skip_develop : ${{ steps.skip_check.outputs.should_skip }}
21- should_skip_build : ${{ steps.skip_check_no_nix.outputs.should_skip }}
2221 steps :
2322 - id : skip_check
2423 uses : fkirc/skip-duplicate-actions@v5.3.1
3534 , ".gitlab-ci.yaml"
3635 , ".gitlab/**"
3736 ]'
38- - id : skip_check_no_nix
39- uses : fkirc/skip-duplicate-actions@v5.3.1
40- with :
41- cancel_others : false
42- paths : ' [ "**.nix" ]'
4337
4438 # Enter the development shell and run `cabal build`
4539 develop :
@@ -63,66 +57,15 @@ jobs:
6357 - uses : cachix/cachix-action@v12
6458 with :
6559 name : haskell-language-server
66- # Disable pushing, we will do that in job `build`
67- skipPush : true
60+ authToken : ${{ secrets.HLS_CACHIX_AUTH_TOKEN }}
6861 - run : |
6962 nix develop --print-build-logs --command cabal update
7063 nix develop --print-build-logs --command cabal build
7164
72- # Build and then push HLS binaries with developmet shell to cachix
73- # This job runs when
74- # 1. PRs are merged to master (runs on master)
75- # 2. Nix files are changed (runs on PR)
76- build :
77- needs : pre_job
78- runs-on : ${{ matrix.os }}
79- env :
80- HAS_TOKEN : ${{ secrets.HLS_CACHIX_AUTH_TOKEN != '' }}
81- if : (needs.pre_job.outputs.should_skip_build != 'true' && needs.pre_job.outputs.should_skip_pr != 'true') || (github.repository_owner == 'haskell' && github.ref == 'refs/heads/master')
82- strategy :
83- fail-fast : false
84- matrix :
85- os : [ubuntu-latest, macOS-latest]
86-
87- steps :
88- - uses : actions/checkout@v3
89-
90- - uses : cachix/install-nix-action@v23
91- with :
92- extra_nix_config : |
93- experimental-features = nix-command flakes
94- nix_path : nixpkgs=channel:nixos-unstable
95- - uses : cachix/cachix-action@v12
96- with :
97- name : haskell-language-server
98- authToken : ${{ secrets.HLS_CACHIX_AUTH_TOKEN }}
99- - name : Build development shell
100- run : nix develop --print-build-logs --profile dev
101- - name : Build all development shell (without nix dependencies)
102- run : nix develop --print-build-logs .#all-simple-dev-shells --profile dev
103- # We only build nix dev shell for current GHC version because some are
104- # failing with different GHC version on darwin.
105- - name : Build development shell with nix dependencies for current GHC version
106- if : matrix.os == 'macOS-latest'
107- run : nix develop --print-build-logs .#haskell-language-server-dev-nix --profile dev
108- - name : Build development shells with nix dependencies
109- if : matrix.os == 'ubuntu-latest'
110- run : nix develop --print-build-logs .#all-nix-dev-shells --profile dev
111- - name : Push development shell
112- if : ${{ env.HAS_TOKEN == 'true' }}
113- run : cachix push haskell-language-server dev
114- - name : Build binaries
115- run : nix build --print-build-logs
116- - name : Build all binaries
117- run : nix build --print-build-logs .#all-haskell-language-server
118- - name : Push binaries
119- if : ${{ env.HAS_TOKEN == 'true' }}
120- run : nix path-info --json | jq -r '.[].path' | cachix push haskell-language-server
121-
12265 nix_post_job :
12366 if : always()
12467 runs-on : ubuntu-latest
125- needs : [pre_job, develop, build ]
68+ needs : [pre_job, develop]
12669 steps :
12770 - run : |
12871 echo "jobs info: ${{ toJSON(needs) }}"
0 commit comments