bakare/.forgejo/workflows/build.yaml

71 lines
1.9 KiB
YAML
Raw Normal View History

2023-11-04 10:45:10 +00:00
name: build
on: push
env:
DEV_SHELL_NAME: CI
CI: true
jobs:
build-cargo:
runs-on: flakes-action
steps:
- uses: actions/checkout@v3
name: Checkout
2024-04-21 20:01:06 +01:00
- uses: https://github.com/DeterminateSystems/magic-nix-cache-action@main
2024-04-27 11:41:31 +01:00
- uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
2024-04-21 20:01:06 +01:00
- name: Run tests
2024-04-21 19:29:26 +01:00
run: |
nix develop -c cargo nextest run --run-ignored all
2024-04-21 20:01:06 +01:00
- name: Build release
2023-11-04 10:45:10 +00:00
run: |
nix develop -c cargo build --release
build-nix:
runs-on: flakes-action
steps:
- uses: actions/checkout@v3
name: Checkout
2024-04-21 20:01:06 +01:00
- uses: https://github.com/DeterminateSystems/magic-nix-cache-action@main
2024-04-27 11:41:31 +01:00
- uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
2023-11-04 10:45:10 +00:00
- name:
run: |
nix build
check-nix:
runs-on: flakes-action
steps:
- uses: actions/checkout@v3
name: Checkout
- name: Metadata
run: |
nix flake metadata
2024-04-21 20:01:06 +01:00
- uses: https://github.com/DeterminateSystems/magic-nix-cache-action@main
2024-04-27 11:41:31 +01:00
- uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
2023-11-04 10:45:10 +00:00
- name: Statix
run: |
nix develop -c statix check
- name: Flake check
run: |
nix flake check