From 013246ea38490a5691afb049b74c71800fd52d79 Mon Sep 17 00:00:00 2001 From: cyqsimon <28627918+cyqsimon@users.noreply.github.com> Date: Mon, 15 Apr 2024 17:03:16 +0800 Subject: [PATCH 1/8] CI: Enable more aarch64 builds --- .github/workflows/ci.yaml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 02d21e18..3b58660a 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -58,8 +58,11 @@ jobs: matrix: build: - android-aarch64 + - linux-aarch64-gnu + - linux-aarch64-musl - linux-x64-gnu - linux-x64-musl + - macos-aarch64 - macos-x64 - windows-x64-msvc rust: @@ -72,10 +75,17 @@ jobs: - build: android-aarch64 target: aarch64-linux-android cargo: cross + - build: linux-aarch64-gnu + target: aarch64-unknown-linux-gnu + - build: linux-aarch64-musl + target: aarch64-unknown-linux-musl - build: linux-x64-gnu target: x86_64-unknown-linux-gnu - build: linux-x64-musl target: x86_64-unknown-linux-musl + - build: macos-aarch64 + os: macos-latest + target: aarch64-apple-darwin - build: macos-x64 os: macos-latest target: x86_64-apple-darwin From 01f32dfbb08c21af7af61bc00491d7434dbb5f9c Mon Sep 17 00:00:00 2001 From: cyqsimon <28627918+cyqsimon@users.noreply.github.com> Date: Mon, 15 Apr 2024 17:06:58 +0800 Subject: [PATCH 2/8] Use cross for linux-aarch64-* builds --- .github/workflows/ci.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 3b58660a..abe07510 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -77,8 +77,10 @@ jobs: cargo: cross - build: linux-aarch64-gnu target: aarch64-unknown-linux-gnu + cargo: cross - build: linux-aarch64-musl target: aarch64-unknown-linux-musl + cargo: cross - build: linux-x64-gnu target: x86_64-unknown-linux-gnu - build: linux-x64-musl From 14c9052f9604683d0b279d181e86a931cd40985c Mon Sep 17 00:00:00 2001 From: cyqsimon <28627918+cyqsimon@users.noreply.github.com> Date: Mon, 15 Apr 2024 22:16:04 +0800 Subject: [PATCH 3/8] Use `macos-14` explicitly for now - https://github.com/orgs/community/discussions/116911 - https://github.blog/changelog/2024-04-01-macos-14-sonoma-is-generally-available-and-the-latest-macos-runner-image/ --- .github/workflows/ci.yaml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index abe07510..1b445ee6 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -86,10 +86,12 @@ jobs: - build: linux-x64-musl target: x86_64-unknown-linux-musl - build: macos-aarch64 - os: macos-latest + # Go back ot `macos-latest` after migration is complete + # See https://github.blog/changelog/2024-04-01-macos-14-sonoma-is-generally-available-and-the-latest-macos-runner-image/. + os: macos-14 target: aarch64-apple-darwin - build: macos-x64 - os: macos-latest + os: macos-14 target: x86_64-apple-darwin - build: windows-x64-msvc os: windows-latest From ed3c6963c216a6da422c1a5ac6b6867ce65f042e Mon Sep 17 00:00:00 2001 From: cyqsimon <28627918+cyqsimon@users.noreply.github.com> Date: Mon, 15 Apr 2024 23:32:02 +0800 Subject: [PATCH 4/8] Add targets in release.yaml --- .github/workflows/release.yaml | 39 ++++++++++++++++++++++++---------- 1 file changed, 28 insertions(+), 11 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 630cadd2..1176c297 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -52,25 +52,37 @@ jobs: strategy: matrix: build: - - aarch64-linux-android + - android-aarch64 + - linux-aarch64-gnu + - linux-aarch64-musl - linux-x64-gnu - linux-x64-musl + - macos-aarch64 - macos-x64 - windows-x64-msvc include: + - os: ubuntu-latest # default - cargo: cargo # default; overwrite with `cross` if necessary - - build: aarch64-linux-android - os: ubuntu-latest + - build: android-aarch64 target: aarch64-linux-android cargo: cross + - build: linux-aarch64-gnu + target: aarch64-unknown-linux-gnu + cargo: cross + - build: linux-aarch64-musl + target: aarch64-unknown-linux-musl + cargo: cross - build: linux-x64-gnu - os: ubuntu-latest target: x86_64-unknown-linux-gnu - build: linux-x64-musl - os: ubuntu-latest target: x86_64-unknown-linux-musl + - build: macos-aarch64 + # Go back ot `macos-latest` after migration is complete + # See https://github.blog/changelog/2024-04-01-macos-14-sonoma-is-generally-available-and-the-latest-macos-runner-image/. + os: macos-14 + target: aarch64-apple-darwin - build: macos-x64 - os: macos-latest + os: macos-14 target: x86_64-apple-darwin - build: windows-x64-msvc os: windows-latest @@ -86,13 +98,18 @@ jobs: toolchain: stable targets: ${{ matrix.target }} - - name: Install musl-tools - if: matrix.target == 'x86_64-unknown-linux-musl' - run: sudo apt-get install -y --no-install-recommends musl-tools - - name: Install cross if: matrix.cargo == 'cross' - run: cargo install --git https://github.com/cross-rs/cross.git --rev 085092c cross + # The latest realese of `cross` is not able to build/link for `aarch64-linux-android` + # See: https://github.com/cross-rs/cross/issues/1222 + # This is fixed on `main` but not yet released. To avoid a breakage somewhen in the future + # pin the cross revision used to the latest HEAD at 04/2024. + # Go back to taiki-e/install-action once cross 0.3 is released. + uses: taiki-e/cache-cargo-install-action@v1 + with: + tool: cross + git: https://github.com/cross-rs/cross.git + rev: 085092c - name: Build release binary shell: bash From 9a10b03de5a1946b199b293b728693121d1b46ef Mon Sep 17 00:00:00 2001 From: cyqsimon <28627918+cyqsimon@users.noreply.github.com> Date: Tue, 16 Apr 2024 13:38:43 +0800 Subject: [PATCH 5/8] Write changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 64af0ca5..13923b0c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) * Add PID column to the process table #379 - @notjedi * CI: add builds for target `aarch64-linux-android` #384 - @flxo * CI: Keep GitHub Actions up to date with GitHub's Dependabot #403 - @cclauss +* CI: Enable more aarch64 builds #401 - @cyqsimon ## Changed From a911fa711f270a6ecc9c8a8a51c36a12ebb0ff79 Mon Sep 17 00:00:00 2001 From: cyqsimon <28627918+cyqsimon@users.noreply.github.com> Date: Tue, 16 Apr 2024 13:39:17 +0800 Subject: [PATCH 6/8] Fix typo --- .github/workflows/ci.yaml | 2 +- .github/workflows/release.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 1b445ee6..59e37089 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -109,7 +109,7 @@ jobs: - name: Install cross if: matrix.cargo == 'cross' - # The latest realese of `cross` is not able to build/link for `aarch64-linux-android` + # The latest release of `cross` is not able to build/link for `aarch64-linux-android` # See: https://github.com/cross-rs/cross/issues/1222 # This is fixed on `main` but not yet released. To avoid a breakage somewhen in the future # pin the cross revision used to the latest HEAD at 04/2024. diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 1176c297..9410749e 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -100,7 +100,7 @@ jobs: - name: Install cross if: matrix.cargo == 'cross' - # The latest realese of `cross` is not able to build/link for `aarch64-linux-android` + # The latest release of `cross` is not able to build/link for `aarch64-linux-android` # See: https://github.com/cross-rs/cross/issues/1222 # This is fixed on `main` but not yet released. To avoid a breakage somewhen in the future # pin the cross revision used to the latest HEAD at 04/2024. From 500371beb28fc23b064157c5c825e25ac48b64a5 Mon Sep 17 00:00:00 2001 From: cyqsimon <28627918+cyqsimon@users.noreply.github.com> Date: Tue, 16 Apr 2024 13:47:11 +0800 Subject: [PATCH 7/8] Passthrough `BANDWHICH_GEN_DIR` into cross container --- Cross.toml | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 Cross.toml diff --git a/Cross.toml b/Cross.toml new file mode 100644 index 00000000..07a56271 --- /dev/null +++ b/Cross.toml @@ -0,0 +1,2 @@ +[build.env] +passthrough = ["BANDWHICH_GEN_DIR"] From b08ae253b816d96ffbd295e7038fcc34d7ffbbc0 Mon Sep 17 00:00:00 2001 From: cyqsimon <28627918+cyqsimon@users.noreply.github.com> Date: Tue, 16 Apr 2024 14:25:32 +0800 Subject: [PATCH 8/8] Add armv7 targets --- .github/workflows/ci.yaml | 8 ++++++++ .github/workflows/release.yaml | 8 ++++++++ CHANGELOG.md | 2 +- 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 59e37089..11027ba8 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -60,6 +60,8 @@ jobs: - android-aarch64 - linux-aarch64-gnu - linux-aarch64-musl + - linux-armv7-gnueabihf + - linux-armv7-musleabihf - linux-x64-gnu - linux-x64-musl - macos-aarch64 @@ -81,6 +83,12 @@ jobs: - build: linux-aarch64-musl target: aarch64-unknown-linux-musl cargo: cross + - build: linux-armv7-gnueabihf + target: armv7-unknown-linux-gnueabihf + cargo: cross + - build: linux-armv7-musleabihf + target: armv7-unknown-linux-musleabihf + cargo: cross - build: linux-x64-gnu target: x86_64-unknown-linux-gnu - build: linux-x64-musl diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 9410749e..78314917 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -55,6 +55,8 @@ jobs: - android-aarch64 - linux-aarch64-gnu - linux-aarch64-musl + - linux-armv7-gnueabihf + - linux-armv7-musleabihf - linux-x64-gnu - linux-x64-musl - macos-aarch64 @@ -72,6 +74,12 @@ jobs: - build: linux-aarch64-musl target: aarch64-unknown-linux-musl cargo: cross + - build: linux-armv7-gnueabihf + target: armv7-unknown-linux-gnueabihf + cargo: cross + - build: linux-armv7-musleabihf + target: armv7-unknown-linux-musleabihf + cargo: cross - build: linux-x64-gnu target: x86_64-unknown-linux-gnu - build: linux-x64-musl diff --git a/CHANGELOG.md b/CHANGELOG.md index 13923b0c..ca6c8b72 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,7 +22,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) * Add PID column to the process table #379 - @notjedi * CI: add builds for target `aarch64-linux-android` #384 - @flxo * CI: Keep GitHub Actions up to date with GitHub's Dependabot #403 - @cclauss -* CI: Enable more aarch64 builds #401 - @cyqsimon +* CI: Enable more cross-compiled builds #401 - @cyqsimon ## Changed