From fee2d720888975ffbe7443bf29be7bb7de268dff Mon Sep 17 00:00:00 2001 From: Clement Tsang <34804052+ClementTsang@users.noreply.github.com> Date: Wed, 24 Dec 2025 17:41:58 -0500 Subject: [PATCH] ci: add loongarch64 to build CI job (#1913) * ci: add loongarch64 to build CI job * update changelog * hmmm * cleanup * ahhh --- .github/workflows/build_releases.yml | 32 ++++++++++++++++++++++++++-- .github/workflows/ci.yml | 3 +-- CHANGELOG.md | 1 + 3 files changed, 32 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build_releases.yml b/.github/workflows/build_releases.yml index 770d1dd9..2da62e3f 100644 --- a/.github/workflows/build_releases.yml +++ b/.github/workflows/build_releases.yml @@ -127,6 +127,23 @@ jobs: cross: true, } + # # Android + # - { + # os: "ubuntu-latest", + # target: "aarch64-linux-android", + # cross: true, + # cross-version: "git:154b4ead7e639c7597d9e4e626b9c1c1e37608c0", + # no-default-features: true, + # } + + # Loongarch + - { + os: "ubuntu-22.04", + target: "loongarch64-unknown-linux-gnu", + cross: true, + cross-version: "git:154b4ead7e639c7597d9e4e626b9c1c1e37608c0", + } + # Windows ARM - { os: "windows-11-arm", @@ -163,6 +180,17 @@ jobs: sh rustup.sh --default-toolchain stable -y echo "$HOME/.cargo/bin" >> $GITHUB_PATH + - name: Set features + shell: bash + run: | + if [[ "${{ matrix.info.no-default-features }}" == "true" ]]; then + BUILD_FEATURES="--no-default-features" + else + BUILD_FEATURES="--features deploy" + fi + echo "Will build with the following features: $BUILD_FEATURES" + echo "BUILD_FEATURES=$BUILD_FEATURES" >> $GITHUB_ENV + - name: Build uses: ClementTsang/cargo-action@2438cc5f3ba4e971289fffca2a00dedea6911f14 # v0.0.7 env: @@ -170,9 +198,9 @@ jobs: BTM_BUILD_RELEASE_CALLER: ${{ inputs.caller }} with: command: build - args: --release --locked --target=${{ matrix.info.target }} --features deploy + args: --release --locked --target=${{ matrix.info.target }} ${{ env.BUILD_FEATURES }} use-cross: ${{ matrix.info.cross }} - cross-version: 0.2.5 + cross-version: ${{ matrix.info.cross-version || '0.2.5' }} - name: Move automatically generated completion/manpage shell: bash diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b203f708..8aeb16bd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -198,7 +198,6 @@ jobs: } # Risc-V 64gc - # Note: seems like this breaks with tests? - { os: "ubuntu-latest", target: "riscv64gc-unknown-linux-gnu", @@ -260,7 +259,7 @@ jobs: - name: Clippy (no features enabled) uses: ClementTsang/cargo-action@2438cc5f3ba4e971289fffca2a00dedea6911f14 # v0.0.7 - if: ${{ matrix.info.no-default-features == true }} + if: ${{ matrix.info.no-default-features == true }} with: command: clippy args: --all-targets --workspace --target=${{ matrix.info.target }} --locked --no-default-features diff --git a/CHANGELOG.md b/CHANGELOG.md index b4f5241d..97c0f115 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -37,6 +37,7 @@ That said, these are more guidelines rather than hardset rules, though the proje - [#1888](https://github.com/ClementTsang/bottom/pull/1888): Make automatically generated `.deb` package conflict with the official one. - [#1891](https://github.com/ClementTsang/bottom/pull/1891): Fix typos in codebase. +- [#1913](https://github.com/ClementTsang/bottom/pull/1913): Add `loongarch64-unknown-linux-gnu` binary build target in CI. ## [0.11.4] - 2025-11-16