diff --git a/.github/workflows/build_nix.yml b/.github/workflows/build_nix.yml index 8dcab5a..5afdecf 100644 --- a/.github/workflows/build_nix.yml +++ b/.github/workflows/build_nix.yml @@ -14,34 +14,19 @@ jobs: runs-on: ubuntu-latest timeout-minutes: 90 steps: - - name: Configure Git - run: | - git config --global url."https://ancient123:${{ secrets.ORG_GITHUB_PAT }}@github.com/".insteadOf git://github.com/ - git config --global url."https://ancient123:${{ secrets.ORG_GITHUB_PAT }}@github.com/".insteadOf ssh://git@github.com/ - - name: Checkout Repository uses: actions/checkout@v4 - name: Install Nix uses: cachix/install-nix-action@v24 - # - uses: cachix/cachix-action@v12 - # with: - # name: espresso-systems-private - # authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' + - uses: Swatinem/rust-cache@v2 - - name: Cache cargo - uses: actions/cache@v3.3.2 - with: - path: | - ~/.cargo-nix/registry/index - ~/.cargo-nix/registry/cache - ~/.cargo-nix/git - target - key: espresso-nix-v2-${{ hashFiles('Cargo.lock') }} + - name: Nix environment loads + run: nix develop -c echo Success - - name: "Sanity Check: nix environment loads" - run: nix-shell --run "echo Success" + - name: Nix environment builds all targets + run: nix develop -c cargo build --all-targets --all-features --release --workspace - - name: "Sanity Check: nix environment builds all targets" - run: nix-shell --run "cargo build --all-targets --all-features --release --workspace" + - name: Precommit hooks work + run: nix develop -c pre-commit run --all-files diff --git a/flake.nix b/flake.nix index 9b9df50..0907729 100644 --- a/flake.nix +++ b/flake.nix @@ -23,7 +23,6 @@ inputs.rust-overlay.url = "github:oxalica/rust-overlay"; inputs.pre-commit-hooks.url = "github:cachix/pre-commit-hooks.nix"; - inputs.pre-commit-hooks.inputs.flake-utils.follows = "flake-utils"; inputs.pre-commit-hooks.inputs.nixpkgs.follows = "nixpkgs"; outputs = { self, nixpkgs, flake-utils, rust-overlay, pre-commit-hooks, ... }: