Don't torture garnix with too many packages #355
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
push: | |
pull_request: | |
jobs: | |
stack-ghc-8_12: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: cachix/install-nix-action@v22 | |
with: | |
nix_path: nixpkgs=channel:nixos-23.05 | |
- uses: haskell/actions/setup@v2 | |
with: | |
enable-stack: true | |
- if: ${{ runner.os == 'Linux' }} | |
# https://github.com/actions/runner-images/issues/7061 | |
run: sudo chown -R $USER /usr/local/.ghcup | |
- uses: actions/cache@v3 | |
with: | |
path: | | |
~/.stack | |
.stack-work | |
key: stack-${{ runner.os }}-8.12-${{ hashFiles('stack-ghc-8.12.yaml.lock') }}-2 | |
restore-keys: | | |
- run: stack --stack-yaml stack-ghc-8.12.yaml build --only-dependencies | |
- run: stack --stack-yaml stack-ghc-8.12.yaml build | |
- run: stack --stack-yaml stack-ghc-8.12.yaml test | |
- run: stack --stack-yaml stack-ghc-8.12.yaml bench --no-run-benchmarks | |
stack-ghc-9_0: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: cachix/install-nix-action@v22 | |
with: | |
nix_path: nixpkgs=channel:nixos-23.05 | |
- uses: haskell/actions/setup@v2 | |
with: | |
enable-stack: true | |
- if: ${{ runner.os == 'Linux' }} | |
# https://github.com/actions/runner-images/issues/7061 | |
run: sudo chown -R $USER /usr/local/.ghcup | |
- uses: actions/cache@v3 | |
with: | |
path: | | |
~/.stack | |
.stack-work | |
key: stack-${{ runner.os }}-9.0-${{ hashFiles('stack-ghc-9.0.yaml.lock') }}-3 | |
restore-keys: | | |
- run: stack --stack-yaml stack-ghc-9.0.yaml build --only-dependencies | |
- run: stack --stack-yaml stack-ghc-9.0.yaml build | |
- run: stack --stack-yaml stack-ghc-9.0.yaml test | |
- run: stack --stack-yaml stack-ghc-9.0.yaml bench --no-run-benchmarks | |
stack-ghc: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: cachix/install-nix-action@v22 | |
with: | |
nix_path: nixpkgs=channel:nixos-23.05 | |
- uses: haskell/actions/setup@v2 | |
with: | |
enable-stack: true | |
- if: ${{ runner.os == 'Linux' }} | |
# https://github.com/actions/runner-images/issues/7061 | |
run: sudo chown -R $USER /usr/local/.ghcup | |
- uses: actions/cache@v3 | |
with: | |
path: | | |
~/.stack | |
.stack-work | |
key: stack-${{ runner.os }}-${{ hashFiles('stack.yaml.lock') }}-2 | |
restore-keys: | | |
- run: stack build --only-dependencies | |
- run: stack build | |
- run: stack test | |
- run: stack bench --no-run-benchmarks | |
format: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: haskell-actions/run-fourmolu@v9 | |
with: | |
version: "0.13.1.0" |