forked from DGNum/colmena
47 lines
1.3 KiB
YAML
47 lines
1.3 KiB
YAML
name: Build
|
|
on:
|
|
pull_request:
|
|
push:
|
|
jobs:
|
|
build:
|
|
strategy:
|
|
matrix:
|
|
os:
|
|
- label: Linux
|
|
image: ubuntu-latest
|
|
- label: macOS
|
|
image: macos-12
|
|
nix:
|
|
- version: 2.10.3
|
|
url: https://releases.nixos.org/nix/nix-2.10.3/install
|
|
|
|
name: ${{ matrix.os.label }} + Nix ${{ matrix.nix.version }}
|
|
runs-on: ${{ matrix.os.image }}
|
|
steps:
|
|
- uses: actions/checkout@v3.0.2
|
|
|
|
- uses: cachix/install-nix-action@v17
|
|
with:
|
|
install_url: ${{ matrix.nix.url }}
|
|
extra_nix_config: |
|
|
experimental-features = nix-command flakes
|
|
|
|
- name: Enable Binary Cache
|
|
uses: cachix/cachix-action@v10
|
|
with:
|
|
name: colmena
|
|
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
|
|
|
|
- run: nix flake check
|
|
if: ${{ !contains(matrix.nix.version, '2.3') && runner.os != 'macOS' }}
|
|
|
|
- name: Build Colmena
|
|
run: nix build -L
|
|
if: ${{ !contains(matrix.nix.version, '2.3') }}
|
|
|
|
- name: Build and install Colmena with flake-compat
|
|
run: nix-env -if default.nix
|
|
|
|
- name: Build manual
|
|
run: nix build .#manual -L
|
|
if: ${{ !contains(matrix.nix.version, '2.3') && runner.os != 'macOS' }}
|