Skip to content

Commit

Permalink
Use nix CI
Browse files Browse the repository at this point in the history
  • Loading branch information
DashieTM committed Dec 3, 2024
1 parent 6c1291b commit f09ed75
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 65 deletions.
2 changes: 1 addition & 1 deletion .direnv/flake-profile
1 change: 1 addition & 0 deletions .direnv/flake-profile-1-link
1 change: 0 additions & 1 deletion .direnv/flake-profile-11-link

This file was deleted.

42 changes: 25 additions & 17 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,33 @@
name: Rust

# inspired by https://github.com/danth/stylix/blob/master/.github/workflows/docs.yml
name: Rust-build
on:
push:
branches: [ "main" ]
branches: ["main"]
pull_request:
branches: [ "main" ]

env:
CARGO_TERM_COLOR: always

branches: ["main"]
jobs:
build:
runs-on: [self-hosted, ubuntu]
name: Build
permissions:
contents: read
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: nightly-rust
uses: actions-rs/toolchain@v1
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@main
with:
profile: minimal
toolchain: nightly
github-token: ${{ secrets.GITHUB_TOKEN }}
extra-conf: |
extra-experimental-features = nix-command flakes
- name: Set up cache
uses: DeterminateSystems/magic-nix-cache-action@main
- name: action
uses: cachix/install-nix-action@v25
with:
nix_path: nixpkgs=channel:nixos-unstable
- name: cache
uses: cachix/cachix-action@v14
with:
name: reset
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- name: Build
run: cargo build --verbose
- name: Run clippy
run: cargo clippy --fix
run: nix -L build github:${{ github.repository }}/${{ github.sha }} --no-write-lock-file
58 changes: 12 additions & 46 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit f09ed75

Please sign in to comment.