1
1
mirror of https://github.com/oxalica/nil.git synced 2024-09-11 10:36:04 +03:00
nil/.github/workflows/ci.yml

83 lines
2.0 KiB
YAML
Raw Normal View History

2022-09-19 04:45:49 +03:00
name: CI
on:
pull_request:
push:
env:
RUST_BACKTRACE: full
jobs:
style:
name: Code style check
2022-09-19 04:45:49 +03:00
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Nix
uses: cachix/install-nix-action@v17
- name: Prepare devShell
run: nix develop --command true
- name: Run pre-commit
run: nix develop --command pre-commit
2022-09-19 04:45:49 +03:00
test:
name: Test
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
channel: [stable, beta]
2022-09-27 17:17:40 +03:00
include:
- os: ubuntu-latest
channel: "1.62.0"
2022-09-19 04:45:49 +03:00
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v3
# For builtins.
- name: Install Nix
uses: cachix/install-nix-action@v17
2022-09-19 04:45:49 +03:00
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.channel }}
- name: Build
run: cargo build --all
- name: Test
run: cargo test --all -- --include-ignored
2022-09-22 16:50:58 +03:00
nix-flake:
2022-12-01 04:09:43 +03:00
name: Nix package (flake)
2022-09-19 04:45:49 +03:00
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Nix
uses: cachix/install-nix-action@v17
- name: Flake check
run: nix flake check --no-update-lock-file --show-trace --verbose
- name: Flake build
run: nix build --no-update-lock-file --show-trace --verbose --print-build-logs
2022-09-22 16:47:46 +03:00
2022-09-22 16:50:58 +03:00
nix-legacy:
2022-12-01 04:09:43 +03:00
name: Nix package (legacy)
2022-09-22 16:47:46 +03:00
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v3
2022-09-22 17:00:32 +03:00
# flake-compat doesn't support shallow repo.
with:
fetch-depth: 0
2022-09-22 16:47:46 +03:00
- name: Install Nix
uses: cachix/install-nix-action@v17
with:
nix_path: nixpkgs=channel:nixpkgs-unstable
- name: Nix build
2022-12-01 04:09:43 +03:00
run: nix-build --show-trace --verbose