From f6e1aa350d6b23a4ffb63fc859c89b79ec6ce8d0 Mon Sep 17 00:00:00 2001 From: seth Date: Sun, 21 Apr 2024 19:49:14 +0000 Subject: nix: remove subflake (#174) --- .github/workflows/ci.yaml | 12 ++++-------- .github/workflows/clippy.yaml | 6 +++--- .github/workflows/docker.yaml | 2 +- .github/workflows/nix.yaml | 31 ------------------------------- 4 files changed, 8 insertions(+), 43 deletions(-) delete mode 100644 .github/workflows/nix.yaml (limited to '.github') diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 44e7de3..ebaf53a 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -25,7 +25,6 @@ jobs: uses: dtolnay/rust-toolchain@stable with: toolchain: stable - components: clippy - name: Setup Rust cache uses: Swatinem/rust-cache@v2 @@ -33,8 +32,8 @@ jobs: - name: Run build run: cargo build --locked --release - format: - name: Check formatting + format-and-lint: + name: Format & lint runs-on: ubuntu-latest @@ -50,14 +49,11 @@ jobs: - name: Run treefmt run: | - pushd nix/dev - nix fmt - popd - git diff --color=always --exit-code + nix flake check --all-systems --print-build-logs --show-trace release-gate: name: CI Release Gate - needs: [build, format] + needs: [build, format-and-lint] runs-on: ubuntu-latest diff --git a/.github/workflows/clippy.yaml b/.github/workflows/clippy.yaml index a37fde3..b827057 100644 --- a/.github/workflows/clippy.yaml +++ b/.github/workflows/clippy.yaml @@ -38,18 +38,18 @@ jobs: - name: Install SARIF tools run: | nix profile install \ - --inputs-from ./nix/dev \ + --inputs-from . \ github:getchoo/nix-exprs#{clippy-sarif,sarif-fmt} - name: Fetch Cargo deps run: | - nix develop ./nix/dev#ci --command \ + nix develop .#ci --command \ cargo fetch --locked - name: Run Clippy continue-on-error: true run: | - nix develop ./nix/dev#ci --command \ + nix develop .#ci --command \ cargo clippy \ --all-features \ --all-targets \ diff --git a/.github/workflows/docker.yaml b/.github/workflows/docker.yaml index 5f45bec..221516b 100644 --- a/.github/workflows/docker.yaml +++ b/.github/workflows/docker.yaml @@ -35,7 +35,7 @@ jobs: nix build \ --fallback \ --print-build-logs \ - ./nix/dev#container-"$ARCH" + .#container-"$ARCH" # exit if no `result` from nix build [ ! -L result ] && exit 1 diff --git a/.github/workflows/nix.yaml b/.github/workflows/nix.yaml deleted file mode 100644 index ab0987c..0000000 --- a/.github/workflows/nix.yaml +++ /dev/null @@ -1,31 +0,0 @@ -name: Nix - -on: - push: - branches: [main] - pull_request: - workflow_dispatch: - -jobs: - check: - name: Check flake - - runs-on: ubuntu-latest - - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Install Nix - uses: DeterminateSystems/nix-installer-action@v10 - - - name: Setup Nix cache - uses: DeterminateSystems/magic-nix-cache-action@v4 - - - name: Run nix flake check - run: | - nix flake check \ - --all-systems \ - --fallback \ - --print-build-logs \ - --show-trace -- cgit v1.2.3