mirror of
https://github.com/haskell/haskell-language-server.git
synced 2024-09-19 20:57:21 +03:00
75634393d5
Bumps [cachix/cachix-action](https://github.com/cachix/cachix-action) from 14 to 15. - [Release notes](https://github.com/cachix/cachix-action/releases) - [Commits](https://github.com/cachix/cachix-action/compare/v14...v15) --- updated-dependencies: - dependency-name: cachix/cachix-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Michael Peyton Jones <me@michaelpj.com>
78 lines
2.2 KiB
YAML
78 lines
2.2 KiB
YAML
name: Nix
|
|
|
|
# See: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#concurrency.
|
|
concurrency:
|
|
group: ${{ github.head_ref }}-${{ github.workflow }}
|
|
cancel-in-progress: true
|
|
|
|
on:
|
|
pull_request:
|
|
branches:
|
|
- '**'
|
|
push:
|
|
branches:
|
|
- master
|
|
|
|
jobs:
|
|
pre_job:
|
|
runs-on: ubuntu-latest
|
|
outputs:
|
|
should_skip_develop: ${{ steps.skip_check.outputs.should_skip }}
|
|
steps:
|
|
- id: skip_check
|
|
uses: fkirc/skip-duplicate-actions@v5.3.1
|
|
with:
|
|
cancel_others: false
|
|
paths_ignore: '[ "**/docs/**"
|
|
, "**.md"
|
|
, "**/LICENSE"
|
|
, ".circleci/**"
|
|
, "**/README.md"
|
|
, "FUNDING.yml"
|
|
, "**/stack*.yaml"
|
|
, "**/stack*.yaml"
|
|
, ".gitlab-ci.yaml"
|
|
, ".gitlab/**"
|
|
]'
|
|
|
|
# Enter the development shell and run `cabal build`
|
|
develop:
|
|
if: needs.pre_job.outputs.should_skip_develop != 'true'
|
|
needs: pre_job
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
os: [ubuntu-latest, macOS-latest]
|
|
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
|
|
- uses: cachix/install-nix-action@V27
|
|
with:
|
|
extra_nix_config: |
|
|
experimental-features = nix-command flakes
|
|
nix_path: nixpkgs=channel:nixos-unstable
|
|
- uses: cachix/cachix-action@v15
|
|
with:
|
|
name: haskell-language-server
|
|
authToken: ${{ secrets.HLS_CACHIX_AUTH_TOKEN }}
|
|
# Don't try and run the build (although that would be a good
|
|
# test), it takes a long time and we have sometimes had
|
|
# glibc incompatibilities with the runners
|
|
- run: |
|
|
nix develop --print-build-logs --command true
|
|
|
|
nix_post_job:
|
|
if: always()
|
|
runs-on: ubuntu-latest
|
|
needs: [pre_job, develop]
|
|
steps:
|
|
- run: |
|
|
echo "jobs info: ${{ toJSON(needs) }}"
|
|
- if: contains(needs.*.result, 'failure')
|
|
run: exit 1
|
|
- if: contains(needs.*.result, 'cancelled') && needs.pre_job.outputs.should_skip != 'true'
|
|
run: exit 1
|