mirror of
https://github.com/EasyTier/EasyTier.git
synced 2026-04-23 00:27:06 +08:00
45 lines
1.1 KiB
YAML
45 lines
1.1 KiB
YAML
name: Nix Check
|
|
|
|
on:
|
|
push:
|
|
branches: ["main", "develop"]
|
|
paths:
|
|
- "**/*.nix"
|
|
- "flake.lock"
|
|
- "rust-toolchain.toml"
|
|
pull_request:
|
|
branches: ["main", "develop"]
|
|
types: [opened, synchronize, reopened, ready_for_review]
|
|
paths:
|
|
- "**/*.nix"
|
|
- "flake.lock"
|
|
- "rust-toolchain.toml"
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
check-full-shell:
|
|
if: github.event_name != 'pull_request' || !github.event.pull_request.draft
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v5
|
|
|
|
- name: Install Nix
|
|
uses: cachix/install-nix-action@v27
|
|
with:
|
|
nix_path: nixpkgs=channel:nixos-unstable
|
|
|
|
- name: Magic Nix Cache
|
|
uses: DeterminateSystems/magic-nix-cache-action@v6
|
|
|
|
- name: Warm up full devShell
|
|
run: nix develop .#full --command true
|
|
|
|
- name: Cargo check in flake environment
|
|
run: nix develop .#full --command cargo check
|
|
|
|
- name: Cargo build in flake environment
|
|
run: nix develop .#full --command cargo build
|