Make package artifact checks deterministic
ci / test (push) Has been cancelled
ci / fuzz-smoke (push) Has been cancelled
ci / windows-client (push) Has been cancelled
ci / package-release (linux-x86_64, ubuntu-latest) (push) Has been cancelled
ci / package-release (macos-aarch64, macos-14) (push) Has been cancelled
ci / package-release (macos-x86_64, macos-13) (push) Has been cancelled
ci / package-release (windows-x86_64, windows-latest) (push) Has been cancelled
ci / remote-bench (push) Has been cancelled
ci / test (push) Has been cancelled
ci / fuzz-smoke (push) Has been cancelled
ci / windows-client (push) Has been cancelled
ci / package-release (linux-x86_64, ubuntu-latest) (push) Has been cancelled
ci / package-release (macos-aarch64, macos-14) (push) Has been cancelled
ci / package-release (macos-x86_64, macos-13) (push) Has been cancelled
ci / package-release (windows-x86_64, windows-latest) (push) Has been cancelled
ci / remote-bench (push) Has been cancelled
This commit is contained in:
@@ -36,7 +36,9 @@ persistence-check:
|
|||||||
package-check:
|
package-check:
|
||||||
$(MAKE) package-release-linux
|
$(MAKE) package-release-linux
|
||||||
$(MAKE) package-release-windows
|
$(MAKE) package-release-windows
|
||||||
sh scripts/verify-release-artifacts.sh
|
sh scripts/verify-release-artifacts.sh \
|
||||||
|
target/dosh-release/dosh-linux-x86_64.tar.gz \
|
||||||
|
target/dosh-release/dosh-windows-x86_64.zip
|
||||||
|
|
||||||
install:
|
install:
|
||||||
sh install.sh --from-current
|
sh install.sh --from-current
|
||||||
|
|||||||
@@ -22,11 +22,14 @@ artifact_version() {
|
|||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if [ "$#" -gt 0 ]; then
|
||||||
|
artifacts="$*"
|
||||||
|
else
|
||||||
|
artifacts="$out_dir/dosh-linux-x86_64.tar.gz $out_dir/dosh-macos-aarch64.tar.gz $out_dir/dosh-windows-x86_64.zip"
|
||||||
|
fi
|
||||||
|
|
||||||
failed=0
|
failed=0
|
||||||
for artifact in \
|
for artifact in $artifacts; do
|
||||||
"$out_dir/dosh-linux-x86_64.tar.gz" \
|
|
||||||
"$out_dir/dosh-macos-aarch64.tar.gz" \
|
|
||||||
"$out_dir/dosh-windows-x86_64.zip"; do
|
|
||||||
if [ ! -f "$artifact" ]; then
|
if [ ! -f "$artifact" ]; then
|
||||||
echo "missing release artifact: $artifact" >&2
|
echo "missing release artifact: $artifact" >&2
|
||||||
failed=1
|
failed=1
|
||||||
|
|||||||
@@ -19,6 +19,29 @@ fn release_scripts_skip_stale_artifacts_when_auto_discovering() {
|
|||||||
assert!(publish.contains("actual=\"$(artifact_version \"$artifact\" || true)\""));
|
assert!(publish.contains("actual=\"$(artifact_version \"$artifact\" || true)\""));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn package_check_verifies_only_artifacts_it_builds() {
|
||||||
|
let makefile = include_str!("../Makefile");
|
||||||
|
let verify = include_str!("../scripts/verify-release-artifacts.sh");
|
||||||
|
assert!(
|
||||||
|
verify.contains("if [ \"$#\" -gt 0 ]; then"),
|
||||||
|
"release verifier must accept an explicit artifact list"
|
||||||
|
);
|
||||||
|
let package_check = makefile
|
||||||
|
.split("package-check:")
|
||||||
|
.nth(1)
|
||||||
|
.and_then(|tail| tail.split("\ninstall:").next())
|
||||||
|
.expect("package-check target");
|
||||||
|
assert!(package_check.contains("package-release-linux"));
|
||||||
|
assert!(package_check.contains("package-release-windows"));
|
||||||
|
assert!(package_check.contains("dosh-linux-x86_64.tar.gz"));
|
||||||
|
assert!(package_check.contains("dosh-windows-x86_64.zip"));
|
||||||
|
assert!(
|
||||||
|
!package_check.contains("dosh-macos-aarch64.tar.gz"),
|
||||||
|
"Linux package-check does not build macOS artifacts, so it must not depend on one"
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn systemd_service_does_not_sandbox_remote_shells() {
|
fn systemd_service_does_not_sandbox_remote_shells() {
|
||||||
let service = include_str!("../packaging/systemd/dosh-server.service");
|
let service = include_str!("../packaging/systemd/dosh-server.service");
|
||||||
|
|||||||
Reference in New Issue
Block a user