From de3521a1c73cd37c9962fe9b6e0d12fc2ad6c315 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E6=99=93=E4=BC=9F?= Date: Sat, 18 Jul 2026 21:26:00 +0800 Subject: [PATCH 1/2] CI: add loong64 build workflow Add reusable workflow for building fastfetch on LoongArch 64-bit architecture using QEMU user-mode emulation + Docker container (lcr.loongnix.cn/debian:14). Integrate into CI pipeline and release dependencies. --- .github/workflows/build-linux-loong64.yml | 57 +++++++++++++++++++++++ .github/workflows/ci.yml | 10 ++++ 2 files changed, 67 insertions(+) create mode 100644 .github/workflows/build-linux-loong64.yml diff --git a/.github/workflows/build-linux-loong64.yml b/.github/workflows/build-linux-loong64.yml new file mode 100644 index 0000000000..a99c5f1082 --- /dev/null +++ b/.github/workflows/build-linux-loong64.yml @@ -0,0 +1,57 @@ +name: Reusable Linux loong64 + +on: + workflow_call: + +env: + CMAKE_BUILD_TYPE: ${{ vars.CMAKE_BUILD_TYPE || 'RelWithDebInfo' }} + +jobs: + build: + runs-on: ubuntu-24.04 + steps: + - name: checkout repository + uses: actions/checkout@v7 + + - name: set up QEMU for loong64 + uses: docker/setup-qemu-action@v4 + + - name: build in loong64 container + run: | + docker run --rm --platform linux/loong64 \ + -v ${{ github.workspace }}:/workspace \ + -w /workspace \ + lcr.loongnix.cn/debian:14 \ + bash -c ' + set -e + uname -a + cat /etc/os-release || true + + apt-get update + apt-get install -y --no-install-recommends \ + cmake make gcc g++ \ + libvulkan-dev libwayland-dev libxrandr-dev libxcb-randr0-dev \ + libdconf-dev libdbus-1-dev libmagickcore-dev \ + libsqlite3-dev librpm-dev \ + libegl-dev libglx-dev ocl-icd-opencl-dev \ + libpulse-dev libdrm-dev \ + libelf-dev libefl-all-dev \ + liblua5.4-dev \ + libvdpau-dev libva-dev \ + rpm + + cmake -DSET_TWEAK=Off -DBUILD_TESTS=On -DCMAKE_INSTALL_PREFIX=/usr . + cmake --build . --target package --verbose -j$(nproc) + ./fastfetch --list-features + time ./fastfetch -c presets/ci.jsonc --stat false + time ./fastfetch -c presets/ci.jsonc --format json + time ./flashfetch + ldd fastfetch + ctest --output-on-failure + ' + + - name: upload artifacts + uses: actions/upload-artifact@v7 + with: + name: fastfetch-linux-loong64 + path: ./fastfetch-*.* diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 00d37612df..a309d42ecc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -54,6 +54,15 @@ jobs: uses: ./.github/workflows/build-linux-armv7l.yml secrets: inherit + linux-loong64: + needs: no-features-test + name: Linux-loong64 + permissions: + security-events: write + contents: read + uses: ./.github/workflows/build-linux-loong64.yml + secrets: inherit + linux-vms: needs: no-features-test name: Linux-${{ matrix.arch }} @@ -188,6 +197,7 @@ jobs: - linux-hosts - linux-i686 - linux-armv7l + - linux-loong64 - linux-vms - musl-amd64 - macos-hosts From 92502d2d954bff73de8dd8423fa87d4aefdd9731 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E6=99=93=E4=BC=9F?= Date: Sat, 18 Jul 2026 22:18:02 +0800 Subject: [PATCH 2/2] CI (loong64): pin docker/setup-qemu-action to full commit SHA Pin to 06116385d9baf250c9f4dcb4858b16962ea869c3 (v4.1.0) for immutable action reference as required by Codacy. --- .github/workflows/build-linux-loong64.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-linux-loong64.yml b/.github/workflows/build-linux-loong64.yml index a99c5f1082..25b140d8f4 100644 --- a/.github/workflows/build-linux-loong64.yml +++ b/.github/workflows/build-linux-loong64.yml @@ -14,7 +14,7 @@ jobs: uses: actions/checkout@v7 - name: set up QEMU for loong64 - uses: docker/setup-qemu-action@v4 + uses: docker/setup-qemu-action@06116385d9baf250c9f4dcb4858b16962ea869c3 # v4.1.0 - name: build in loong64 container run: |