forked from DGNum/colmena
44 lines
1.2 KiB
YAML
44 lines
1.2 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.13.2
|
|
url: https://releases.nixos.org/nix/nix-2.13.2/install
|
|
|
|
name: ${{ matrix.os.label }} + Nix ${{ matrix.nix.version }}
|
|
runs-on: ${{ matrix.os.image }}
|
|
steps:
|
|
- uses: actions/checkout@v3.3.0
|
|
|
|
- name: Install Nix
|
|
uses: zhaofengli/nix-installer-action@zhaofeng
|
|
|
|
- name: Enable Binary Cache
|
|
uses: cachix/cachix-action@v12
|
|
with:
|
|
name: colmena
|
|
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
|
|
|
|
- run: nix flake check --no-build
|
|
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' }}
|