Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion .envrc
Original file line number Diff line number Diff line change
@@ -1 +1,10 @@
use flake
if ! has nix_direnv_version || ! nix_direnv_version 2.2.1; then
source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/2.2.1/direnvrc" "sha256-zelF0vLbEl5uaqrfIzbgNzJWGmLzCmYAkInj/LNxvKs="
fi

watch_file flake.nix
watch_file flake.lock
if ! use flake . --no-pure-eval
then
echo "devenv could not be built. The devenv environment was not loaded. Make the necessary changes to devenv.nix and hit enter to try again." >&2
fi
34 changes: 26 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,22 +18,40 @@ jobs:
strategy:
matrix:
os:
- macos-13 # x86_64-darwin
- macos-latest # aarch64-darwin
- ubuntu-latest # x86_64-linux
- macos-13 # x86_64-darwin
- macos-latest # aarch64-darwin
- ubuntu-24.04 # x86_64-linux
fail-fast: true
runs-on: ${{ matrix.os }}
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- uses: DeterminateSystems/nix-installer-action@v12
- name: Checkout code
uses: actions/checkout@v4
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@v16
with:
extra-conf: accept-flake-config = true
- uses: DeterminateSystems/magic-nix-cache-action@v7
- name: Setup devenv binary cache
uses: cachix/cachix-action@v15
with:
name: devenv
- name: Install devenv
run: nix-env -if https://github.com/cachix/devenv/archive/refs/tags/v1.3.1.tar.gz
- name: Cache ~/.cabal/packages, ~/.cabal/store and dist-newstyle
uses: actions/cache@v4
with:
path: |
~/.cabal/packages
~/.cabal/store
dist-newstyle
key: ${{ runner.os }}-${{ matrix.ghc }}-${{ hashFiles('**/*.cabal') }}
restore-keys: ${{ runner.os }}-${{ matrix.ghc }}-
- name: Update Cabal list of known packages.
run: nix develop --no-pure-eval -c cabal update
- name: Compile code ${{ matrix.ghc }}
run: nix build .#test
run: nix develop --no-pure-eval -c cabal build
- name: Run tests ${{ matrix.ghc }}
run: nix run .#test
run: nix develop --no-pure-eval -c cabal test

docker:
uses: ./.github/workflows/reusable-docker.yml
Expand Down
10 changes: 10 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
repos:
- repo: local
hooks:
- id: hlint
name: hlint
description: HLint gives suggestions on how to improve your source code.
entry: hlint
language: system
files: '\.l?hs$'

Loading