fixup! rix now focuses only on nix language evaluation #536
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
name: builder | |
on: [push, pull_request] | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Nix Setup | |
run: | | |
set -x | |
sudo mkdir /nix | |
sudo chown $USER /nix | |
mkdir -p $HOME/.config/nix | |
echo 'experimental-features = nix-command flakes' > $HOME/.config/nix/nix.conf | |
- name: Cache Nix DevEnv | |
uses: actions/cache@v3 | |
env: | |
cache-name: cache-nix-dev-env | |
with: | |
path: | | |
/nix | |
/home/runner/.bash_profile | |
/home/runner/.nix-profile | |
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('**/flake.nix', '**/flake.lock') }} | |
- name: Cache Rust Artifacts | |
uses: actions/cache@v3 | |
env: | |
cache-name: cache-rust-artifacts | |
with: | |
path: | | |
/home/runner/.rustup | |
/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: | | |
[ -f /home/runner/.nix-profile/etc/profile.d/nix.sh ] || sh <(curl -L https://nixos.org/nix/install) --no-daemon | |
. /home/runner/.nix-profile/etc/profile.d/nix.sh | |
eval "$(nix print-dev-env)" | |
set -x | |
cargo fmt --check | |
cargo clippy | |
cargo test |