colmena/.github/workflows/build.yml

48 lines
1.3 KiB
YAML
Raw Normal View History

2021-02-11 20:55:45 +01:00
name: Build
on:
pull_request:
push:
jobs:
build:
2021-11-17 06:56:28 +01:00
strategy:
matrix:
os:
2022-08-17 04:15:43 +02:00
- label: Linux
image: ubuntu-latest
- label: macOS
image: macos-11
2021-11-17 06:56:28 +01:00
nix:
2022-08-17 04:15:43 +02:00
- version: 2.10.3
2022-07-17 23:42:34 +02:00
url: https://releases.nixos.org/nix/nix-2.10.3/install
2022-08-17 04:15:43 +02:00
name: ${{ matrix.os.label }} + Nix ${{ matrix.nix.version }}
runs-on: ${{ matrix.os.image }}
2021-02-11 20:55:45 +01:00
steps:
2022-07-17 23:42:34 +02:00
- uses: actions/checkout@v3.0.2
2022-08-17 04:15:43 +02:00
- uses: cachix/install-nix-action@v17
with:
2021-11-17 06:56:28 +01:00
install_url: ${{ matrix.nix.url }}
extra_nix_config: |
experimental-features = nix-command flakes
- name: Enable Binary Cache
uses: cachix/cachix-action@v10
2021-11-18 07:21:00 +01:00
with:
name: colmena
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- run: nix flake check
2022-08-17 04:15:43 +02:00
if: ${{ !contains(matrix.nix.version, '2.3') && runner.os != 'macOS' }}
2021-11-17 06:56:28 +01:00
- name: Build Colmena
run: nix build -L
2022-08-17 04:15:43 +02:00
if: ${{ !contains(matrix.nix.version, '2.3') }}
2021-12-07 00:08:09 +01:00
- name: Build and install Colmena with flake-compat
run: nix-env -if default.nix
- name: Build manual
run: nix build .#manual -L
2022-08-17 04:15:43 +02:00
if: ${{ !contains(matrix.nix.version, '2.3') && runner.os != 'macOS' }}