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
steps:
- name: check formatting
- name: fmt
image: nixpkgs/nix:nixos-22.05
commands:
- nix-shell --attr devShell --run "cargo fmt -- --check"
@ -18,18 +18,19 @@ steps:
commands:
- nix-build -j4 --attr flakePackages.dev
- name: unit + func tests
- name: unit + func tests (lmdb)
image: nixpkgs/nix:nixos-22.05
environment:
GARAGE_TEST_INTEGRATION_EXE: result-bin/bin/garage
GARAGE_TEST_INTEGRATION_PATH: tmp-garage-integration
commands:
- 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
- rm result
- name: integration tests
image: nixpkgs/nix:nixos-22.05
commands:
- nix-build -j4 --attr flakePackages.dev
- 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 = craneLib.buildPackage (commonArgs // {
@ -173,9 +175,12 @@ in rec {
GIT_VERSION = git_version;
} else {}));
garage-test-deps = craneLib.buildDepsOnly (testArgs // {
cargoArtifacts = garage;
});
# ---- testing 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 // {
cargoArtifacts = garage-test-deps;