Require Windows ARM64 release artifacts
ci / test (push) Canceled after 0s
ci / fuzz-smoke (push) Canceled after 0s
ci / windows-client (push) Canceled after 0s
ci / package-release (linux-x86_64, ubuntu-latest, , , ) (push) Canceled after 0s
ci / package-release (macos-aarch64, macos-14, , , ) (push) Canceled after 0s
ci / package-release (macos-x86_64, macos-13, , , ) (push) Canceled after 0s
ci / package-release (windows-aarch64, windows-latest, aarch64, windows, aarch64-pc-windows-msvc) (push) Canceled after 0s
ci / package-release (windows-x86_64, windows-latest, , , ) (push) Canceled after 0s
ci / remote-bench (push) Canceled after 0s
ci / publish-gitea-release (push) Canceled after 0s
ci / test (push) Canceled after 0s
ci / fuzz-smoke (push) Canceled after 0s
ci / windows-client (push) Canceled after 0s
ci / package-release (linux-x86_64, ubuntu-latest, , , ) (push) Canceled after 0s
ci / package-release (macos-aarch64, macos-14, , , ) (push) Canceled after 0s
ci / package-release (macos-x86_64, macos-13, , , ) (push) Canceled after 0s
ci / package-release (windows-aarch64, windows-latest, aarch64, windows, aarch64-pc-windows-msvc) (push) Canceled after 0s
ci / package-release (windows-x86_64, windows-latest, , , ) (push) Canceled after 0s
ci / remote-bench (push) Canceled after 0s
ci / publish-gitea-release (push) Canceled after 0s
This commit is contained in:
@@ -72,18 +72,43 @@ jobs:
|
|||||||
include:
|
include:
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
name: linux-x86_64
|
name: linux-x86_64
|
||||||
|
package_os: ""
|
||||||
|
package_arch: ""
|
||||||
|
rust_target: ""
|
||||||
- os: macos-14
|
- os: macos-14
|
||||||
name: macos-aarch64
|
name: macos-aarch64
|
||||||
|
package_os: ""
|
||||||
|
package_arch: ""
|
||||||
|
rust_target: ""
|
||||||
- os: macos-13
|
- os: macos-13
|
||||||
name: macos-x86_64
|
name: macos-x86_64
|
||||||
|
package_os: ""
|
||||||
|
package_arch: ""
|
||||||
|
rust_target: ""
|
||||||
- os: windows-latest
|
- os: windows-latest
|
||||||
name: windows-x86_64
|
name: windows-x86_64
|
||||||
|
package_os: ""
|
||||||
|
package_arch: ""
|
||||||
|
rust_target: ""
|
||||||
|
- os: windows-latest
|
||||||
|
name: windows-aarch64
|
||||||
|
package_os: windows
|
||||||
|
package_arch: aarch64
|
||||||
|
rust_target: aarch64-pc-windows-msvc
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: dtolnay/rust-toolchain@stable
|
- uses: dtolnay/rust-toolchain@stable
|
||||||
|
- name: Install Rust target
|
||||||
|
if: matrix.rust_target != ''
|
||||||
|
shell: bash
|
||||||
|
run: rustup target add '${{ matrix.rust_target }}'
|
||||||
- name: Package release
|
- name: Package release
|
||||||
shell: bash
|
shell: bash
|
||||||
|
env:
|
||||||
|
DOSH_PACKAGE_OS: ${{ matrix.package_os }}
|
||||||
|
DOSH_PACKAGE_ARCH: ${{ matrix.package_arch }}
|
||||||
|
DOSH_PACKAGE_TARGET: ${{ matrix.rust_target }}
|
||||||
run: sh scripts/package-release.sh
|
run: sh scripts/package-release.sh
|
||||||
- uses: actions/upload-artifact@v4
|
- uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
|
|||||||
@@ -27,14 +27,23 @@ normalize_arch() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
host_os="$(normalize_os)"
|
host_os="$(normalize_os)"
|
||||||
|
host_arch="$(normalize_arch)"
|
||||||
os="${DOSH_PACKAGE_OS:-$host_os}"
|
os="${DOSH_PACKAGE_OS:-$host_os}"
|
||||||
arch="${DOSH_PACKAGE_ARCH:-$(normalize_arch)}"
|
arch="${DOSH_PACKAGE_ARCH:-$host_arch}"
|
||||||
target="${DOSH_PACKAGE_TARGET:-}"
|
target="${DOSH_PACKAGE_TARGET:-}"
|
||||||
if [ -z "$target" ] && [ "$os" = "windows" ] && [ "$host_os" != "windows" ]; then
|
if [ -z "$target" ] && [ "$os" = "windows" ]; then
|
||||||
case "$arch" in
|
if [ "$host_os" != "windows" ]; then
|
||||||
x86_64) target="x86_64-pc-windows-gnu" ;;
|
case "$arch" in
|
||||||
*) echo "set DOSH_PACKAGE_TARGET for windows/$arch" >&2; exit 1 ;;
|
x86_64) target="x86_64-pc-windows-gnu" ;;
|
||||||
esac
|
*) echo "set DOSH_PACKAGE_TARGET for windows/$arch" >&2; exit 1 ;;
|
||||||
|
esac
|
||||||
|
elif [ "$arch" != "$host_arch" ]; then
|
||||||
|
case "$arch" in
|
||||||
|
x86_64) target="x86_64-pc-windows-msvc" ;;
|
||||||
|
aarch64) target="aarch64-pc-windows-msvc" ;;
|
||||||
|
*) echo "set DOSH_PACKAGE_TARGET for windows/$arch" >&2; exit 1 ;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
if [ "$os" = "windows" ]; then
|
if [ "$os" = "windows" ]; then
|
||||||
artifact="dosh-$os-$arch.zip"
|
artifact="dosh-$os-$arch.zip"
|
||||||
|
|||||||
@@ -94,7 +94,8 @@ require_complete_release_artifacts() {
|
|||||||
dosh-linux-x86_64.tar.gz \
|
dosh-linux-x86_64.tar.gz \
|
||||||
dosh-macos-aarch64.tar.gz \
|
dosh-macos-aarch64.tar.gz \
|
||||||
dosh-macos-x86_64.tar.gz \
|
dosh-macos-x86_64.tar.gz \
|
||||||
dosh-windows-x86_64.zip; do
|
dosh-windows-x86_64.zip \
|
||||||
|
dosh-windows-aarch64.zip; do
|
||||||
found=0
|
found=0
|
||||||
checksum_found=0
|
checksum_found=0
|
||||||
for artifact in "$@"; do
|
for artifact in "$@"; do
|
||||||
|
|||||||
@@ -89,7 +89,7 @@ verify_checksum() {
|
|||||||
if [ "$#" -gt 0 ]; then
|
if [ "$#" -gt 0 ]; then
|
||||||
artifacts="$*"
|
artifacts="$*"
|
||||||
else
|
else
|
||||||
artifacts="$out_dir/dosh-linux-x86_64.tar.gz $out_dir/dosh-macos-aarch64.tar.gz $out_dir/dosh-macos-x86_64.tar.gz $out_dir/dosh-windows-x86_64.zip"
|
artifacts="$out_dir/dosh-linux-x86_64.tar.gz $out_dir/dosh-macos-aarch64.tar.gz $out_dir/dosh-macos-x86_64.tar.gz $out_dir/dosh-windows-x86_64.zip $out_dir/dosh-windows-aarch64.zip"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
failed=0
|
failed=0
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ fn release_upload_refuses_partial_platform_sets_by_default() {
|
|||||||
"dosh-macos-aarch64.tar.gz",
|
"dosh-macos-aarch64.tar.gz",
|
||||||
"dosh-macos-x86_64.tar.gz",
|
"dosh-macos-x86_64.tar.gz",
|
||||||
"dosh-windows-x86_64.zip",
|
"dosh-windows-x86_64.zip",
|
||||||
|
"dosh-windows-aarch64.zip",
|
||||||
] {
|
] {
|
||||||
assert!(
|
assert!(
|
||||||
upload.contains(name),
|
upload.contains(name),
|
||||||
@@ -236,12 +237,22 @@ fn package_check_verifies_only_artifacts_it_builds() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn complete_release_verifier_requires_both_macos_architectures() {
|
fn complete_release_verifier_requires_all_desktop_architectures() {
|
||||||
let verify = include_str!("../scripts/verify-release-artifacts.sh");
|
let verify = include_str!("../scripts/verify-release-artifacts.sh");
|
||||||
assert!(verify.contains("dosh-linux-x86_64.tar.gz"));
|
assert!(verify.contains("dosh-linux-x86_64.tar.gz"));
|
||||||
assert!(verify.contains("dosh-macos-aarch64.tar.gz"));
|
assert!(verify.contains("dosh-macos-aarch64.tar.gz"));
|
||||||
assert!(verify.contains("dosh-macos-x86_64.tar.gz"));
|
assert!(verify.contains("dosh-macos-x86_64.tar.gz"));
|
||||||
assert!(verify.contains("dosh-windows-x86_64.zip"));
|
assert!(verify.contains("dosh-windows-x86_64.zip"));
|
||||||
|
assert!(verify.contains("dosh-windows-aarch64.zip"));
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn package_release_workflow_builds_both_windows_architectures() {
|
||||||
|
let ci = include_str!("../.github/workflows/ci.yml");
|
||||||
|
assert!(ci.contains("name: windows-x86_64"));
|
||||||
|
assert!(ci.contains("name: windows-aarch64"));
|
||||||
|
assert!(ci.contains("DOSH_PACKAGE_ARCH: ${{ matrix.package_arch }}"));
|
||||||
|
assert!(ci.contains("aarch64-pc-windows-msvc"));
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
@@ -284,6 +295,15 @@ fn package_release_stamps_git_build_info() {
|
|||||||
assert!(build.contains("cargo:rerun-if-env-changed=DOSH_BUILD_GIT_HASH"));
|
assert!(build.contains("cargo:rerun-if-env-changed=DOSH_BUILD_GIT_HASH"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn package_release_maps_windows_cross_arch_targets() {
|
||||||
|
let package = include_str!("../scripts/package-release.sh");
|
||||||
|
assert!(package.contains("host_arch=\"$(normalize_arch)\""));
|
||||||
|
assert!(package.contains("elif [ \"$arch\" != \"$host_arch\" ]; then"));
|
||||||
|
assert!(package.contains("x86_64-pc-windows-msvc"));
|
||||||
|
assert!(package.contains("aarch64-pc-windows-msvc"));
|
||||||
|
}
|
||||||
|
|
||||||
#[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