ci: move to Nix #4092
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: [push, pull_request] | |
name: CI | |
jobs: | |
self-care: | |
name: Flake self-check | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Check Nix flake inputs | |
uses: DeterminateSystems/flake-checker-action@v5 | |
with: | |
fail-mode: true | |
build-test: | |
name: Build and test | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout | |
uses: actions/checkout@v4 | |
- name: Install Nix | |
uses: DeterminateSystems/nix-installer-action@v5 | |
- name: Rust Cache | |
uses: Swatinem/[email protected] | |
- name: Nix Check | |
run: nix flake check -L --keep-failed | |
# check-wasm: | |
# name: Check WASM | |
# runs-on: ubuntu-20.04 | |
# env: | |
# CC: clang-10 | |
# CFLAGS: -I/usr/include | |
# steps: | |
# - name: Checkout | |
# uses: actions/checkout@v4 | |
# - name: Install Nix | |
# uses: DeterminateSystems/nix-installer-action@v5 | |
# - name: Rust Cache | |
# uses: Swatinem/[email protected] | |
# - name: Check bdk | |
# working-directory: ./crates/bdk | |
# run: 'nix develop -L .#test.WASM --command bash -c "cargo check --target wasm32-unknown-unknown --no-default-features --features bitcoin/no-std,miniscript/no-std,bdk_chain/hashbrown,dev-getrandom-wasm"' | |
# - name: Check esplora | |
# working-directory: ./crates/esplora | |
# run: 'nix develop -L .#test.WASM --command bash -c "cargo check --target wasm32-unknown-unknown --no-default-features --features bitcoin/no-std,miniscript/no-std,bdk_chain/hashbrown,async"' | |
fmt: | |
name: Rust fmt | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install Nix | |
uses: DeterminateSystems/nix-installer-action@v5 | |
- name: Check fmt | |
run: 'nix develop -L . --command bash -c "cargo fmt --all -- --config format_code_in_doc_comments=true --check"' | |
clippy_check: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Nix | |
uses: DeterminateSystems/nix-installer-action@v5 | |
- name: Rust Cache | |
uses: Swatinem/[email protected] | |
- name: Clippy | |
run: nix build -L .#checks.x86_64-linux.clippy --keep-failed |