フック版 herp-logger #440
Workflow file for this run
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-9_0: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- uses: cachix/install-nix-action@v22 | |
with: | |
nix_path: nixpkgs=channel:nixos-22.11 | |
- uses: haskell-actions/setup@v2 | |
id: setup | |
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/restore@v4 | |
id: cache | |
env: | |
key: ${{ runner.os }}-ghc-9.0-stack-${{ steps.setup.outputs.stack-version }} | |
with: | |
path: | | |
${{ steps.setup.outputs.stack-root }} | |
.stack-work | |
key: ${{ env.key }}-${{ hashFiles('stack.yaml.lock') }} | |
restore-keys: ${{ env.key }}- | |
- run: stack build --test --no-run-tests --bench --no-run-benchmarks --only-dependencies | |
- uses: actions/cache/save@v4 | |
if: steps.cache.outputs.cache-hit != 'true' | |
with: | |
path: | | |
${{ steps.setup.outputs.stack-root }} | |
.stack-work | |
key: ${{ steps.cache.outputs.cache-primary-key }} | |
- run: stack build | |
- run: stack test | |
- run: stack bench --no-run-benchmarks | |
stack-ghc-9_2: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- uses: cachix/install-nix-action@v22 | |
with: | |
nix_path: nixpkgs=channel:nixos-22.11 | |
- uses: haskell-actions/setup@v2 | |
id: setup | |
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/restore@v4 | |
id: cache | |
env: | |
key: ${{ runner.os }}-ghc-9.2-stack-${{ steps.setup.outputs.stack-version }} | |
with: | |
path: | | |
${{ steps.setup.outputs.stack-root }} | |
.stack-work | |
key: ${{ env.key }}-${{ hashFiles('stack-ghc-9.2.yaml.lock') }} | |
restore-keys: ${{ env.key }}- | |
- run: stack --stack-yaml stack-ghc-9.2.yaml build --test --no-run-tests --bench --no-run-benchmarks --only-dependencies | |
- uses: actions/cache/save@v4 | |
if: steps.cache.outputs.cache-hit != 'true' | |
with: | |
path: | | |
${{ steps.setup.outputs.stack-root }} | |
.stack-work | |
key: ${{ steps.cache.outputs.cache-primary-key }} | |
- run: stack --stack-yaml stack-ghc-9.2.yaml build | |
- run: stack --stack-yaml stack-ghc-9.2.yaml test | |
- run: stack --stack-yaml stack-ghc-9.2.yaml bench --no-run-benchmarks | |
cabal-ghc-9_0: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- uses: cachix/install-nix-action@v25 | |
with: | |
nix_path: nixpkgs=channel:nixos-22.11 | |
- uses: actions/cache/restore@v4 | |
id: cache | |
env: | |
key: ${{ runner.os }}-ghc-9.0-nixos-22.11 | |
with: | |
path: ~/.cabal | |
key: ${{ env.key }}-${{ hashFiles('cabal.project.freeze') }} | |
restore-keys: ${{ env.key }}- | |
- run: nix develop --command cabal update | |
- run: nix develop --command cabal v2-build --enable-tests --enable-benchmarks --only-dependencies all | |
- uses: actions/cache/save@v4 | |
if: steps.cache.outputs.cache-hit != 'true' | |
with: | |
path: ~/.cabal | |
key: ${{ steps.cache.outputs.cache-primary-key }} | |
- run: nix develop --command cabal v2-build all | |
- run: nix develop --command cabal v2-test all | |
- run: nix develop --command cabal v2-build --enable-benchmarks all | |
format: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: haskell-actions/run-fourmolu@v10 | |
with: | |
version: "0.13.1.0" |