Skip to content

Bump cachix/cachix-action from 14 to 15 #619

Bump cachix/cachix-action from 14 to 15

Bump cachix/cachix-action from 14 to 15 #619

Workflow file for this run

name: CI
on:
push:
pull_request:
env:
RUSTFLAGS: -Dwarnings
RUST_BACKTRACE: 1
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read # to fetch code (actions/checkout)
jobs:
nixpkgs-fmt:
name: nixpkgs-fmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v26
with:
nix_path: nixpkgs=channel:nixos-unstable
- run: nix-shell -p nixpkgs-fmt --run 'nixpkgs-fmt --check .'
rustfmt:
name: rustfmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: sfackler/actions/rustup@master
- run: |
cd cli
cargo fmt --all -- --check
clippy:
name: clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: sfackler/actions/rustup@master
- run: echo "::set-output name=version::$(rustc --version)"
id: rust-version
- uses: Swatinem/rust-cache@v2
with:
workspaces: cli
key: "clippy"
- run: |
cd cli
cargo clippy --all --all-targets
windows:
name: windows
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: sfackler/actions/rustup@master
- run: echo "::set-output name=version::$(rustc --version)"
id: rust-version
- uses: actions/cache@v4
with:
path: ~/.cargo
key: cargo-${{ runner.os }}-${{ steps.rust-version.outputs.version }}-${{ hashFiles('cli/Cargo.lock') }}
restore-keys: |
cargo-${{ runner.os }}-${{ steps.rust-version.outputs.version }}-
cargo-${{ runner.os }}-
- uses: actions/cache@v4
with:
path: cli/target
key: target-${{ github.job }}-${{ steps.rust-version.outputs.version }}-${{ hashFiles('cli/Cargo.lock') }}
restore-keys: |
cargo-${{ runner.os }}-${{ steps.rust-version.outputs.version }}-
cargo-${{ runner.os }}-
- run: |
cd cli
cargo test
cargo test --no-default-features --features cli
- run: |
cd cli
cargo build --release
- uses: actions/upload-artifact@v4
with:
name: windows
path: cli/target/release/mineflake.exe
linux:
name: linux
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: sfackler/actions/rustup@master
- run: echo "::set-output name=version::$(rustc --version)"
id: rust-version
- run: rustup target add x86_64-unknown-linux-gnu
- run: |
sudo apt-get update
sudo apt-get install -y libssl-dev pkg-config openssl
- uses: Swatinem/rust-cache@v2
with:
workspaces: cli
key: "linux"
- run: |
cd cli
cargo test --target x86_64-unknown-linux-gnu
cargo test --target x86_64-unknown-linux-gnu --no-default-features --features cli
- run: |
cd cli
cargo build --target x86_64-unknown-linux-gnu --release
- uses: actions/upload-artifact@v4
with:
name: linux
path: cli/target/x86_64-unknown-linux-gnu/release/mineflake
nix:
name: nix
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v26
with:
nix_path: nixpkgs=channel:nixos-unstable
- uses: cachix/cachix-action@v15
with:
name: nix-community
- run: nix build .