Skip to content

Update CI to use new devenv flake #275

Update CI to use new devenv flake

Update CI to use new devenv flake #275

Workflow file for this run

---
name: Build
on:
push:
branches:
- main
pull_request:
types:
- opened
- synchronize
concurrency:
group: build-${{ github.ref }}
cancel-in-progress: true
jobs:
haskell:
strategy:
matrix:
os:
# - macos-13 # x86_64-darwin
# - macos-latest # aarch64-darwin
- ubuntu-latest # x86_64-linux
fail-fast: true
runs-on: ${{ matrix.os }}
timeout-minutes: 30
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@v16
with:
extra-conf: accept-flake-config = true
- 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: Set locales
run: |
locale
export LANG=en_US.UTF-8
export LC_ALL=C.UTF-8
export GHC_CHARENC=GHC_NO_UNICODE
echo "---------------"
locale
- 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 develop --no-pure-eval -c cabal build
- name: Run tests ${{ matrix.ghc }}
run: nix develop --no-pure-eval -c cabal test
# docker:
# uses: ./.github/workflows/reusable-docker.yml
# with:
# push: false