woodpecker ci: run steps in parallel
Some checks failed
ci/woodpecker/pr/debug Pipeline was successful
ci/woodpecker/push/debug Pipeline was successful
ci/woodpecker/deployment/debug Pipeline was successful
ci/woodpecker/deployment/release/3 Pipeline failed
ci/woodpecker/deployment/release/2 Pipeline failed
ci/woodpecker/deployment/release/1 Pipeline failed
ci/woodpecker/deployment/release/4 Pipeline failed
ci/woodpecker/deployment/publish unknown status

This commit is contained in:
Alex 2025-02-02 21:08:47 +01:00
parent 32305cd2db
commit 05a98ff45c
2 changed files with 15 additions and 9 deletions

View file

@ -8,7 +8,7 @@ when:
- manual - manual
steps: steps:
- name: check formatting - name: fmt
image: nixpkgs/nix:nixos-22.05 image: nixpkgs/nix:nixos-22.05
commands: commands:
- nix-shell --attr devShell --run "cargo fmt -- --check" - nix-shell --attr devShell --run "cargo fmt -- --check"
@ -18,18 +18,19 @@ steps:
commands: commands:
- nix-build -j4 --attr flakePackages.dev - nix-build -j4 --attr flakePackages.dev
- name: unit + func tests - name: unit + func tests (lmdb)
image: nixpkgs/nix:nixos-22.05 image: nixpkgs/nix:nixos-22.05
environment:
GARAGE_TEST_INTEGRATION_EXE: result-bin/bin/garage
GARAGE_TEST_INTEGRATION_PATH: tmp-garage-integration
commands: commands:
- nix-build -j4 --attr flakePackages.tests-lmdb - nix-build -j4 --attr flakePackages.tests-lmdb
- name: unit + func tests (sqlite)
image: nixpkgs/nix:nixos-22.05
commands:
- nix-build -j4 --attr flakePackages.tests-sqlite - nix-build -j4 --attr flakePackages.tests-sqlite
- rm result
- name: integration tests - name: integration tests
image: nixpkgs/nix:nixos-22.05 image: nixpkgs/nix:nixos-22.05
commands: commands:
- nix-build -j4 --attr flakePackages.dev - nix-build -j4 --attr flakePackages.dev
- nix-shell --attr ci --run ./script/test-smoke.sh || (cat /tmp/garage.log; false) - nix-shell --attr ci --run ./script/test-smoke.sh || (cat /tmp/garage.log; false)
depends_on: [ build ]

View file

@ -161,6 +161,8 @@ in rec {
]); ]);
}; };
# ---- building garage ----
garage-deps = craneLib.buildDepsOnly commonArgs; garage-deps = craneLib.buildDepsOnly commonArgs;
garage = craneLib.buildPackage (commonArgs // { garage = craneLib.buildPackage (commonArgs // {
@ -173,9 +175,12 @@ in rec {
GIT_VERSION = git_version; GIT_VERSION = git_version;
} else {})); } else {}));
garage-test-deps = craneLib.buildDepsOnly (testArgs // { # ---- testing garage ----
cargoArtifacts = garage;
}); garage-test-deps = craneLib.buildDepsOnly testArgs;
# cargoArtifacts = garage would do nothing for this derivation
# because it's not the same profile
# this is a truly independent build
garage-test-bin = craneLib.cargoBuild (testArgs // { garage-test-bin = craneLib.cargoBuild (testArgs // {
cargoArtifacts = garage-test-deps; cargoArtifacts = garage-test-deps;