From f9c246d5458df0eab0aa82817378ac5101b986d4 Mon Sep 17 00:00:00 2001 From: Yuval Kogman Date: Mon, 15 Dec 2025 17:59:58 +0100 Subject: [PATCH 1/4] disable terminal reliant progress output from nextest --- flake.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/flake.nix b/flake.nix index 6c7cab5eb..3592d6b4d 100644 --- a/flake.nix +++ b/flake.nix @@ -217,6 +217,7 @@ partitions = 1; partitionType = "count"; cargoExtraArgs = "--locked --all-features"; + NEXTEST_SHOW_PROGRESS = "none"; BITCOIND_EXE = nixpkgs.lib.getExe' pkgs.bitcoind "bitcoind"; nativeBuildInputs = [ nginxWithStream ]; } From fa577e0bb4c637c0ccf392870e072d5ebba27ced Mon Sep 17 00:00:00 2001 From: Yuval Kogman Date: Mon, 15 Dec 2025 18:00:44 +0100 Subject: [PATCH 2/4] don't install cargo artifacts from nextest jobs --- flake.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/flake.nix b/flake.nix index 3592d6b4d..6dd36b9ca 100644 --- a/flake.nix +++ b/flake.nix @@ -220,6 +220,7 @@ NEXTEST_SHOW_PROGRESS = "none"; BITCOIND_EXE = nixpkgs.lib.getExe' pkgs.bitcoind "bitcoind"; nativeBuildInputs = [ nginxWithStream ]; + doInstallCargoArtifacts = false; } ) From e8d89b6846c25f090dd4d04f649abca8f5c986f9 Mon Sep 17 00:00:00 2001 From: Yuval Kogman Date: Mon, 15 Dec 2025 18:12:20 +0100 Subject: [PATCH 3/4] fixup! flake: build dev profile instead of release --- Cargo.toml | 4 ++++ flake.nix | 5 ++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 0e16ea6c1..2fecb8718 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -14,3 +14,7 @@ ohttp-relay = { path = "ohttp-relay" } payjoin = { path = "payjoin" } payjoin-directory = { path = "payjoin-directory" } payjoin-test-utils = { path = "payjoin-test-utils" } + +[profile.crane] +inherits = "test" +debug = false diff --git a/flake.nix b/flake.nix index 6dd36b9ca..eb69c2573 100644 --- a/flake.nix +++ b/flake.nix @@ -96,6 +96,10 @@ inherit src; strictDeps = true; + # avoid release builds throughout for faster feedback from checks + # note that this also affects the built packages + CARGO_PROFILE = "crane"; + # provide fallback name & version for workspace related derivations # this is mainly to silence warnings from crane about providing a stub # value overridden in per-crate packages with info from Cargo.toml @@ -222,7 +226,6 @@ nativeBuildInputs = [ nginxWithStream ]; doInstallCargoArtifacts = false; } - ) )) ) craneLibVersions From 50408cd7b287555702e179603d34a222aa778878 Mon Sep 17 00:00:00 2001 From: Mshehu5 Date: Thu, 11 Dec 2025 14:43:40 +0100 Subject: [PATCH 4/4] Add full flake check in CI and monthly flake.lock maintence job Add flake check in CI workflow and weekly flake.lock update and check after lock updates Co-authored-by: Ben Allen --- .github/workflows/flake-check.yml | 31 +++++++++++++++ .github/workflows/flake-maintenance.yml | 52 +++++++++++++++++++++++++ flake.nix | 10 +++++ 3 files changed, 93 insertions(+) create mode 100644 .github/workflows/flake-check.yml create mode 100644 .github/workflows/flake-maintenance.yml diff --git a/.github/workflows/flake-check.yml b/.github/workflows/flake-check.yml new file mode 100644 index 000000000..2d8a4cc25 --- /dev/null +++ b/.github/workflows/flake-check.yml @@ -0,0 +1,31 @@ +name: Flake Check + +on: + push: + pull_request: + types: [opened, synchronize, reopened] + paths-ignore: + - "flake.lock" + +jobs: + flake-check: + runs-on: ubuntu-latest + strategy: + matrix: + checks: + - msrv + - stable + - nightly + - maintenance + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Install Nix + uses: DeterminateSystems/nix-installer-action@main + + - name: Enable magic Nix cache + uses: DeterminateSystems/magic-nix-cache-action@main + + - name: Run full flake check + run: nix build .#checks.x86_64-linux.${{ matrix.checks }} diff --git a/.github/workflows/flake-maintenance.yml b/.github/workflows/flake-maintenance.yml new file mode 100644 index 000000000..cc0be8420 --- /dev/null +++ b/.github/workflows/flake-maintenance.yml @@ -0,0 +1,52 @@ +name: Flake maintenance + +on: + schedule: + - cron: "0 11 * * 1" # weekly at 14:00 UTC + workflow_dispatch: + +jobs: + validate-lock-file: + runs-on: ubuntu-latest + strategy: + matrix: + checks: + - msrv + - stable + - nightly + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Install Nix + uses: DeterminateSystems/nix-installer-action@main + + - name: Enable magic Nix cache + uses: DeterminateSystems/magic-nix-cache-action@main + + - name: Validate recreated lockfile + run: nix build .#checks.x86_64-linux.${{ matrix.checks }} -L --recreate-lock-file --no-write-lock-file + + update-lock-file: + needs: validate-lock-file + runs-on: ubuntu-latest + permissions: + contents: write + pull-requests: write + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Install Nix + uses: DeterminateSystems/nix-installer-action@main + + - name: Enable magic Nix cache + uses: DeterminateSystems/magic-nix-cache-action@main + + - name: Update flake.lock + uses: DeterminateSystems/update-flake-lock@main + with: + pr-title: "chore: update flake.lock" + commit-msg: "chore: update flake.lock" + token: ${{ secrets.GITHUB_TOKEN }} + nix-options: --offline diff --git a/flake.nix b/flake.nix index eb69c2573..fb8bbd83d 100644 --- a/flake.nix +++ b/flake.nix @@ -309,6 +309,16 @@ ] ++ pkgs.lib.attrValues packages ); + + maintenance = checkSuite "maintenance" ( + with self.outputs.checks.${system}; + [ + payjoin-workspace-machete + payjoin-workspace-clippy + payjoin-workspace-doc + formatting + ] + ); }; } );