fix(ci): run linux arm release natively and enforce arm artifacts
Some checks failed
Auto Tag / autotag (push) Successful in 50s
Auto Tag / build-macos-arm64 (push) Failing after 11m15s
Auto Tag / build-windows-amd64 (push) Successful in 18m15s
Auto Tag / build-linux-arm64 (push) Failing after 18m33s
Auto Tag / build-linux-amd64 (push) Successful in 29m19s
Some checks failed
Auto Tag / autotag (push) Successful in 50s
Auto Tag / build-macos-arm64 (push) Failing after 11m15s
Auto Tag / build-windows-amd64 (push) Successful in 18m15s
Auto Tag / build-linux-arm64 (push) Failing after 18m33s
Auto Tag / build-linux-amd64 (push) Successful in 29m19s
Avoid cross-compiling GTK/glib on the arm release job by building natively on ARM64 hosts, add an explicit architecture guard, and restrict uploads to arm64/aarch64 artifact filenames so amd64 outputs cannot be published as arm releases. Made-with: Cursor
This commit is contained in:
parent
2bf5a03d8a
commit
6de7cfb104
@ -348,10 +348,14 @@ jobs:
|
|||||||
apt-get install -y nodejs
|
apt-get install -y nodejs
|
||||||
- name: Build
|
- name: Build
|
||||||
run: |
|
run: |
|
||||||
|
ARCH=$(uname -m)
|
||||||
|
if [ "$ARCH" != "aarch64" ] && [ "$ARCH" != "arm64" ]; then
|
||||||
|
echo "ERROR: linux-arm64 job is not running on an ARM64 host (uname -m=$ARCH)."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
npm ci --legacy-peer-deps
|
npm ci --legacy-peer-deps
|
||||||
rustup target add aarch64-unknown-linux-gnu
|
|
||||||
cargo install tauri-cli --version "^2" --locked
|
cargo install tauri-cli --version "^2" --locked
|
||||||
CI=true cargo tauri build --target aarch64-unknown-linux-gnu
|
CI=true cargo tauri build
|
||||||
- name: Upload artifacts
|
- name: Upload artifacts
|
||||||
env:
|
env:
|
||||||
RELEASE_TOKEN: ${{ secrets.RELEASE_TOKEN }}
|
RELEASE_TOKEN: ${{ secrets.RELEASE_TOKEN }}
|
||||||
@ -378,10 +382,10 @@ jobs:
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
echo "Release ID: $RELEASE_ID"
|
echo "Release ID: $RELEASE_ID"
|
||||||
ARTIFACTS=$(find src-tauri/target/aarch64-unknown-linux-gnu/release/bundle -type f \
|
ARTIFACTS=$(find src-tauri/target/release/bundle -type f \
|
||||||
\( -name "*.deb" -o -name "*.rpm" -o -name "*.AppImage" \))
|
\( -name "*arm64*.deb" -o -name "*aarch64*.deb" -o -name "*arm64*.rpm" -o -name "*aarch64*.rpm" -o -name "*arm64*.AppImage" -o -name "*aarch64*.AppImage" \))
|
||||||
if [ -z "$ARTIFACTS" ]; then
|
if [ -z "$ARTIFACTS" ]; then
|
||||||
echo "ERROR: No Linux arm64 artifacts were found to upload."
|
echo "ERROR: No Linux arm64 artifacts were found to upload (arm64/aarch64 filename filter)."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
printf '%s\n' "$ARTIFACTS" | while IFS= read -r f; do
|
printf '%s\n' "$ARTIFACTS" | while IFS= read -r f; do
|
||||||
|
|||||||
@ -19,11 +19,14 @@ describe("auto-tag release cross-platform artifact handling", () => {
|
|||||||
const workflow = readFileSync(autoTagWorkflowPath, "utf-8");
|
const workflow = readFileSync(autoTagWorkflowPath, "utf-8");
|
||||||
|
|
||||||
expect(workflow).toContain("ERROR: No Linux amd64 artifacts were found to upload.");
|
expect(workflow).toContain("ERROR: No Linux amd64 artifacts were found to upload.");
|
||||||
expect(workflow).toContain("ERROR: No Linux arm64 artifacts were found to upload.");
|
|
||||||
expect(workflow).toContain("cargo tauri build --target aarch64-unknown-linux-gnu");
|
|
||||||
expect(workflow).toContain(
|
expect(workflow).toContain(
|
||||||
"find src-tauri/target/aarch64-unknown-linux-gnu/release/bundle -type f",
|
"ERROR: No Linux arm64 artifacts were found to upload (arm64/aarch64 filename filter).",
|
||||||
);
|
);
|
||||||
|
expect(workflow).toContain(
|
||||||
|
"ERROR: linux-arm64 job is not running on an ARM64 host (uname -m=$ARCH).",
|
||||||
|
);
|
||||||
|
expect(workflow).toContain("CI=true cargo tauri build");
|
||||||
|
expect(workflow).toContain("find src-tauri/target/release/bundle -type f");
|
||||||
});
|
});
|
||||||
|
|
||||||
it("fails windows uploads when no artifacts are found", () => {
|
it("fails windows uploads when no artifacts are found", () => {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user