1
0
Fork 0
mirror of https://github.com/malob/prefmanager.git synced 2024-12-14 11:57:49 +00:00
prefmanager/.github/workflows/ci.yml

83 lines
1.8 KiB
YAML
Raw Normal View History

2023-06-29 00:27:16 +00:00
name: CI
2020-10-08 19:37:59 +00:00
on:
pull_request:
push:
2023-06-29 00:27:16 +00:00
2020-10-08 19:37:59 +00:00
jobs:
2023-06-29 00:27:16 +00:00
matrix:
name: Generate matrix
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.gen-matrix.outputs.matrix }}
steps:
- name: Checkout repo
uses: actions/checkout@v4
2023-06-29 00:27:16 +00:00
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@v10
2023-06-29 00:27:16 +00:00
- name: Genrate matrix
id: gen-matrix
run: |
echo "matrix=$(nix eval --impure --json --expr '(import ./constants.nix).ghcVersions')" \
>> $GITHUB_OUTPUT
nix-build-packages:
needs: matrix
2021-01-14 01:13:58 +00:00
runs-on: macos-latest
2023-06-29 00:27:16 +00:00
strategy:
fail-fast: false
matrix:
ghc: ${{ fromJson(needs.matrix.outputs.matrix) }}
name: Nix build (${{ matrix.ghc }})
2020-10-08 19:37:59 +00:00
steps:
2023-06-29 00:27:16 +00:00
- name: Checkout repo
uses: actions/checkout@v3
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@v10
2023-06-29 00:27:16 +00:00
- name: Setup cache
uses: DeterminateSystems/magic-nix-cache-action@main
- name: Build and test
run: |
NAME=$(nix eval --impure --raw --expr '(import ./constants.nix).name')-${{ matrix.ghc }}
nix -L build .#$NAME
nix run .#$NAME -- domains
2023-06-29 00:38:10 +00:00
nix-build-devshell:
name: Nix build devshell
runs-on: macos-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
2023-06-29 00:38:10 +00:00
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@v10
2023-06-29 00:38:10 +00:00
- name: Setup cache
uses: DeterminateSystems/magic-nix-cache-action@main
- name: Build and test
run: |
nix -L develop . --command echo "OK"
2023-06-29 00:27:16 +00:00
stack-build:
name: Stack build
runs-on: macos-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
2023-06-29 00:27:16 +00:00
- name: Build and test
run: |
stack run -- domains