name: CI
on:
workflow_dispatch:
pull_request:
push:
branches:
- main
- dev
jobs:
native-build-kconfq:
name: "kconfq native build: ${{ matrix.arch }}"
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- arch: x86_64-linux
os: ubuntu-24.04
- arch: aarch64-linux
os: ubuntu-24.04-arm
steps:
- uses: actions/checkout@v6
- name: Setup Nix
uses: ./.github/actions/nix-setup
- name: Build kconfq
run: nix build .#kconfq
- name: Tree result
run: tree result
native-build-libkconfq:
name: "libkconfq native build: ${{ matrix.arch }}"
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- arch: x86_64-linux
os: ubuntu-24.04
- arch: aarch64-linux
os: ubuntu-24.04-arm
steps:
- uses: actions/checkout@v5
- name: Setup Nix
uses: ./.github/actions/nix-setup
- name: Build libkconfq $out
run: nix build .#libkconfq.out
- name: Tree result/
run: tree result/
- name: Build libkconfq $dev
run: nix build .#libkconfq.dev
- name: Tree result-dev/
run: tree result-dev/
cross-compile-kconfq:
name: "kconfq cross-compiled to aarch64"
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v5
- name: Setup Nix
uses: ./.github/actions/nix-setup
- name: Cross-compile $out
run: ./scripts/cross-compile.sh aarch64-multiplatform ./nix/kconfq.nix out
- name: Tree result/
run: tree result/
cross-compile-libkconfq:
name: "libkconfq cross-compiled to aarch64"
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v5
- name: Setup Nix
uses: ./.github/actions/nix-setup
- name: Cross-compile $out
run: ./scripts/cross-compile.sh aarch64-multiplatform ./nix/libkconfq.nix out
- name: Tree result/
run: tree result/
- name: Cross-compile $dev
run: ./scripts/cross-compile.sh aarch64-multiplatform ./nix/libkconfq.nix dev
- name: Tree result-dev/
run: tree result-dev/
build-docs:
name: "build documentation"
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v5
- name: Setup Nix
uses: ./.github/actions/nix-setup
- name: Run `cargo doc`
run: RUSTDOCFLAGS="-Dwarnings" cargo doc
build-libkconfq-example:
name: "build libkconfq example"
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v5
- name: Install Nix
uses: cachix/install-nix-action@v31
with:
github_access_token: ${{ github.token }}
- name: Run `nix build`
run: nix build ./examples/libkconfq/
- name: Run resulting binary
run: ./result/bin/example
run-pre-commit-hooks:
name: run pre-commit hooks
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v5
- name: Setup Nix
uses: ./.github/actions/nix-setup
- name: Run pre-commit hooks
run: prek run --all-files