mirror of
https://github.com/ClementTsang/bottom.git
synced 2025-09-22 09:17:51 +02:00
ci: build and check Windows ARM (#1801)
* ci: build and check Windows ARM * forgot to update these * ??? * is it the image or smth * nope not that * Update build_releases.yml * Update ci.yml * Update build_releases.yml * fix build * ??? * ???? * ???????? * okay that works, now just set the output file
This commit is contained in:
parent
47cc0b346a
commit
6c62e7817f
47
.github/workflows/build_releases.yml
vendored
47
.github/workflows/build_releases.yml
vendored
@ -122,9 +122,12 @@ jobs:
|
|||||||
cross: true,
|
cross: true,
|
||||||
}
|
}
|
||||||
|
|
||||||
# Seems like cross' FreeBSD image is a bit broken? I
|
# Windows ARM
|
||||||
# get build errors, may be related to this issue:
|
- {
|
||||||
# https://github.com/cross-rs/cross/issues/1291
|
os: "windows-11-arm",
|
||||||
|
target: "aarch64-pc-windows-msvc",
|
||||||
|
cross: false,
|
||||||
|
}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
if: matrix.info.container == ''
|
if: matrix.info.container == ''
|
||||||
@ -220,7 +223,7 @@ jobs:
|
|||||||
name: "release-${{ matrix.info.target }}"
|
name: "release-${{ matrix.info.target }}"
|
||||||
path: release
|
path: release
|
||||||
|
|
||||||
build-vm:
|
build-with-vm:
|
||||||
name: "Build binaries via VMs"
|
name: "Build binaries via VMs"
|
||||||
runs-on: "ubuntu-latest"
|
runs-on: "ubuntu-latest"
|
||||||
timeout-minutes: 12
|
timeout-minutes: 12
|
||||||
@ -304,8 +307,22 @@ jobs:
|
|||||||
|
|
||||||
build-msi:
|
build-msi:
|
||||||
name: "Build MSI (WiX) installer"
|
name: "Build MSI (WiX) installer"
|
||||||
runs-on: "windows-2022"
|
|
||||||
timeout-minutes: 12
|
timeout-minutes: 12
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
info:
|
||||||
|
- {
|
||||||
|
os: "windows-2022",
|
||||||
|
target: "x86_64-pc-windows-msvc",
|
||||||
|
output: "bottom_x86_64_installer.msi"
|
||||||
|
}
|
||||||
|
- {
|
||||||
|
os: "windows-11-arm",
|
||||||
|
target: "aarch64-pc-windows-msvc",
|
||||||
|
output: "bottom_aarch64_installer.msi"
|
||||||
|
}
|
||||||
|
runs-on: ${{ matrix.info.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
|
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
|
||||||
@ -314,18 +331,19 @@ jobs:
|
|||||||
|
|
||||||
- name: Install Net-Framework-Core
|
- name: Install Net-Framework-Core
|
||||||
shell: powershell
|
shell: powershell
|
||||||
run: Install-WindowsFeature Net-Framework-Core
|
run: |
|
||||||
|
choco install dotnet-sdk --pre -y --no-progress;
|
||||||
|
|
||||||
- name: Install wixtoolset
|
- name: Install wixtoolset
|
||||||
uses: crazy-max/ghaction-chocolatey@0e015857dd851f84fcb7fb53380eb5c4c8202333 # v3.0.0
|
shell: powershell
|
||||||
with:
|
run: |
|
||||||
args: install -y wixtoolset
|
choco install -y wixtoolset --no-progress;
|
||||||
|
|
||||||
- name: Set up Rust toolchain
|
- name: Set up Rust toolchain
|
||||||
uses: dtolnay/rust-toolchain@21dc36fb71dd22e3317045c0c31a3f4249868b17
|
uses: dtolnay/rust-toolchain@21dc36fb71dd22e3317045c0c31a3f4249868b17
|
||||||
with:
|
with:
|
||||||
toolchain: stable
|
toolchain: stable
|
||||||
target: x86_64-pc-windows-msvc
|
target: ${{ matrix.info.target }}
|
||||||
|
|
||||||
- name: Install cargo-wix
|
- name: Install cargo-wix
|
||||||
shell: powershell
|
shell: powershell
|
||||||
@ -337,24 +355,27 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
BTM_GENERATE: true
|
BTM_GENERATE: true
|
||||||
run: |
|
run: |
|
||||||
|
Import-Module "$env:ChocolateyInstall/helpers/chocolateyInstaller.psm1"
|
||||||
|
refreshenv
|
||||||
cargo wix --nocapture
|
cargo wix --nocapture
|
||||||
|
mv bottom_installer.msi ${{ matrix.info.output }}
|
||||||
|
|
||||||
- name: Generate artifact attestation for file
|
- name: Generate artifact attestation for file
|
||||||
uses: actions/attest-build-provenance@6149ea5740be74af77f260b9db67e633f6b0a9a1 # v1.4.2
|
uses: actions/attest-build-provenance@6149ea5740be74af77f260b9db67e633f6b0a9a1 # v1.4.2
|
||||||
with:
|
with:
|
||||||
subject-path: "bottom_x86_64_installer.msi"
|
subject-path: ${{ matrix.info.output }}
|
||||||
|
|
||||||
- name: Create release directory for artifact, move files
|
- name: Create release directory for artifact, move files
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
mkdir release
|
mkdir release
|
||||||
mv bottom_x86_64_installer.msi release/
|
mv ${{ matrix.info.output }} release/
|
||||||
|
|
||||||
- name: Save release as artifact
|
- name: Save release as artifact
|
||||||
uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0
|
uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0
|
||||||
with:
|
with:
|
||||||
retention-days: 3
|
retention-days: 3
|
||||||
name: "release-build-msi"
|
name: "release-${{ matrix.info.target }}-msi"
|
||||||
path: release
|
path: release
|
||||||
|
|
||||||
build-cirrus:
|
build-cirrus:
|
||||||
|
27
.github/workflows/ci.yml
vendored
27
.github/workflows/ci.yml
vendored
@ -137,11 +137,8 @@ jobs:
|
|||||||
#
|
#
|
||||||
# TODO: Maybe some of these should be allowed to fail? If so, I guess we can add back the "unofficial" MSRV,
|
# TODO: Maybe some of these should be allowed to fail? If so, I guess we can add back the "unofficial" MSRV,
|
||||||
# I would also put android there.
|
# I would also put android there.
|
||||||
other-check:
|
unsupported-check:
|
||||||
needs: pre-job
|
needs: pre-job
|
||||||
runs-on: ${{ matrix.info.os }}
|
|
||||||
if: ${{ needs.pre-job.outputs.should_skip != 'true' }}
|
|
||||||
timeout-minutes: 12
|
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
@ -229,6 +226,15 @@ jobs:
|
|||||||
no-clippy: true,
|
no-clippy: true,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Windows ARM
|
||||||
|
- {
|
||||||
|
os: "windows-11-arm",
|
||||||
|
target: "aarch64-pc-windows-msvc",
|
||||||
|
cross: false,
|
||||||
|
}
|
||||||
|
runs-on: ${{ matrix.info.os }}
|
||||||
|
if: ${{ needs.pre-job.outputs.should_skip != 'true' }}
|
||||||
|
timeout-minutes: 12
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
|
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
|
||||||
@ -265,8 +271,7 @@ jobs:
|
|||||||
use-cross: ${{ matrix.info.cross }}
|
use-cross: ${{ matrix.info.cross }}
|
||||||
cross-version: ${{ matrix.info.cross-version || '0.2.5' }}
|
cross-version: ${{ matrix.info.cross-version || '0.2.5' }}
|
||||||
|
|
||||||
vm-check:
|
unsupported-check-freebsd:
|
||||||
name: "Test using VMs"
|
|
||||||
needs: pre-job
|
needs: pre-job
|
||||||
if: ${{ needs.pre-job.outputs.should_skip != 'true' }}
|
if: ${{ needs.pre-job.outputs.should_skip != 'true' }}
|
||||||
runs-on: "ubuntu-latest"
|
runs-on: "ubuntu-latest"
|
||||||
@ -326,23 +331,23 @@ jobs:
|
|||||||
|
|
||||||
completion:
|
completion:
|
||||||
name: "CI Pass Check"
|
name: "CI Pass Check"
|
||||||
needs: [supported, other-check, vm-check]
|
needs: [supported, unsupported-check, unsupported-check-freebsd]
|
||||||
if: ${{ needs.supported.result != 'skipped' || needs.other-check.result != 'skipped' || needs.vm-check.result != 'skipped' }}
|
if: ${{ needs.supported.result != 'skipped' || needs.unsupported-check.result != 'skipped' || needs.unsupported-check-freebsd.result != 'skipped' }}
|
||||||
runs-on: "ubuntu-latest"
|
runs-on: "ubuntu-latest"
|
||||||
steps:
|
steps:
|
||||||
- name: CI Passed
|
- name: CI Passed
|
||||||
if: ${{ (needs.supported.result == 'success' || needs.supported.result == 'skipped') && (needs.other-check.result == 'success' || needs.other-check.result == 'skipped') && (needs.vm-check.result == 'success' || needs.vm-check.result == 'skipped') }}
|
if: ${{ (needs.supported.result == 'success' || needs.supported.result == 'skipped') && (needs.unsupported-check.result == 'success' || needs.unsupported-check.result == 'skipped') && (needs.unsupported-check-freebsd.result == 'success' || needs.unsupported-check-freebsd.result == 'skipped') }}
|
||||||
run: |
|
run: |
|
||||||
echo "CI workflow completed successfully.";
|
echo "CI workflow completed successfully.";
|
||||||
|
|
||||||
- name: CI Failed
|
- name: CI Failed
|
||||||
if: ${{ needs.supported.result == 'failure' || needs.other-check.result == 'failure' || needs.vm-check.result == 'failure' }}
|
if: ${{ needs.supported.result == 'failure' || needs.unsupported-check.result == 'failure' || needs.unsupported-check-freebsd.result == 'failure' }}
|
||||||
run: |
|
run: |
|
||||||
echo "CI workflow failed.";
|
echo "CI workflow failed.";
|
||||||
exit 1;
|
exit 1;
|
||||||
|
|
||||||
- name: CI Cancelled
|
- name: CI Cancelled
|
||||||
if: ${{ needs.supported.result == 'cancelled' || needs.other-check.result == 'cancelled' || needs.vm-check.result == 'cancelled' }}
|
if: ${{ needs.supported.result == 'cancelled' || needs.unsupported-check.result == 'cancelled' || needs.unsupported-check-freebsd.result == 'cancelled' }}
|
||||||
run: |
|
run: |
|
||||||
echo "CI workflow was cancelled.";
|
echo "CI workflow was cancelled.";
|
||||||
exit 1;
|
exit 1;
|
||||||
|
@ -239,7 +239,7 @@ depends = "libc6:arm64 (>= 2.28)"
|
|||||||
depends = "libc6:armhf (>= 2.28)"
|
depends = "libc6:armhf (>= 2.28)"
|
||||||
|
|
||||||
[package.metadata.wix]
|
[package.metadata.wix]
|
||||||
output = "bottom_x86_64_installer.msi"
|
output = "bottom_installer.msi"
|
||||||
|
|
||||||
[package.metadata.generate-rpm]
|
[package.metadata.generate-rpm]
|
||||||
assets = [
|
assets = [
|
||||||
|
Loading…
x
Reference in New Issue
Block a user