forked from DGNum/colmena
06804e3715
Currently it requires Linux remote builders to be set up to do anything useful, but soon it will not once we able to initiate builds directly on the target nodes themselves.
76 lines
2.3 KiB
YAML
76 lines
2.3 KiB
YAML
name: Build
|
|
on:
|
|
pull_request:
|
|
push:
|
|
jobs:
|
|
build:
|
|
strategy:
|
|
matrix:
|
|
os:
|
|
- ubuntu-latest
|
|
- macos-11
|
|
nix:
|
|
- name: 2.4
|
|
url: https://releases.nixos.org/nix/nix-2.4/install
|
|
#- name: 2.3.16
|
|
# url: https://releases.nixos.org/nix/nix-2.3.16/install
|
|
#- name: 2.5pre
|
|
# url: https://github.com/numtide/nix-unstable-installer/releases/download/nix-2.5pre20211026_5667822/install
|
|
runs-on: ${{ matrix.os }}
|
|
steps:
|
|
- uses: actions/checkout@v2.3.5
|
|
- uses: cachix/install-nix-action@v15
|
|
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.name, '2.3') }}
|
|
|
|
- name: Build Colmena
|
|
run: nix build -L
|
|
if: ${{ !contains(matrix.nix.name, '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.name, '2.3') }}
|
|
|
|
tests:
|
|
strategy:
|
|
matrix:
|
|
os:
|
|
- ubuntu-latest
|
|
nix:
|
|
- name: 2.3.16
|
|
url: https://releases.nixos.org/nix/nix-2.3.16/install
|
|
- name: 2.4
|
|
url: https://releases.nixos.org/nix/nix-2.4/install
|
|
- name: 2.5pre
|
|
url: https://github.com/numtide/nix-unstable-installer/releases/download/nix-2.5pre20211026_5667822/install
|
|
runs-on: ${{ matrix.os }}
|
|
steps:
|
|
- uses: actions/checkout@v2.3.5
|
|
- uses: cachix/install-nix-action@v15
|
|
with:
|
|
install_url: ${{ matrix.nix.url }}
|
|
extra_nix_config: |
|
|
experimental-features = nix-command flakes
|
|
- uses: cachix/cachix-action@v10
|
|
with:
|
|
name: colmena
|
|
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
|
|
|
|
- run: nix-shell --run "cargo test"
|
|
if: ${{ !contains(matrix.nix.name, '2.3') }}
|
|
- run: nix-shell --run "cargo test -- --skip flake"
|
|
if: ${{ contains(matrix.nix.name, '2.3') }}
|