Skip to content

Use harmonia-store-core to save on a lot of code #35

Use harmonia-store-core to save on a lot of code

Use harmonia-store-core to save on a lot of code #35

Workflow file for this run

name: CI
on:
push:
branches: [ main ]
pull_request:
types: [ opened, reopened, labeled, synchronize ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Nix
uses: ./.github/actions/setup-nix
- name: Cache Rust Artifacts
uses: actions/cache@v4
env:
cache-name: cache-rust-artifacts
with:
path: |
/home/runner/.cargo
target
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('**/Cargo.toml', '**/Cargo.lock', '**/.cargo/config.toml', '**/rust-toolchain.toml', '**/flake.nix', '**/flake.lock') }}
- name: Build
run: |
eval "$(nix print-dev-env)"
set -x
cargo fmt --check
cargo clippy
cargo test
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Nix
uses: ./.github/actions/setup-nix
- name: Run nix flake check
run: nix flake check -L
integration-test:
runs-on: ubuntu-latest
strategy:
matrix:
test:
- nix-build-hello
- nix-build-header
- nix-build-multi-source
- nix-build-shared-lib
- nix-build-dynamic-deps
steps:
- uses: actions/checkout@v4
- name: Setup Nix
uses: ./.github/actions/setup-nix
- name: Build NixOS test driver
run: nix build .#driver-${{ matrix.test }}
- name: Run integration tests
run: nix run -L .#test-${{ matrix.test }}