From 24a8faec9a0931aff6fa38757a73f01e6144ee27 Mon Sep 17 00:00:00 2001 From: Joshua Sing Date: Sat, 12 Apr 2025 22:27:01 +1000 Subject: ci: test on loongarch64 --- .github/workflows/linux.yml | 2 +- scripts/test | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index d57e3bc..bc3c692 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -23,7 +23,7 @@ jobs: fail-fast: false matrix: os: ["ubuntu-22.04", "ubuntu-24.04"] - arch: ["native", "arm32", "arm64", "mingw32", "mingw64", "mips64"] + arch: ["native", "arm32", "arm64", "loong64", "mingw32", "mingw64", "mips64"] compiler: ["gcc"] include: - os: "ubuntu-22.04" diff --git a/scripts/test b/scripts/test index 1fb02eb..473d689 100755 --- a/scripts/test +++ b/scripts/test @@ -132,6 +132,21 @@ elif [ "$ARCH" = "arm32" -o "$ARCH" = "arm64" ]; then file apps/openssl/.libs/openssl +elif [ "$ARCH" = "loong64" ]; then + sudo apt install -y qemu-user-static binfmt-support g++-14-loongarch64-linux-gnu + sudo ln -sf /usr/loongarch64-linux-gnu/lib/ld-linux-loongarch-lp64d.so.1 /lib + + CC=loongarch64-linux-gnu-gcc-14 + CXX=loongarch64-linux-gnu++-14 + AR=loongarch64-linux-gnu-ar + STRIP=loongarch64-linux-gnu-strip-14 + RANLIB=loongarch64-linux-gnu-ranlib + + ./configure --host=loongarch64-linux-gnu + LD_LIBRARY_PATH=/usr/loongarch64-linux-gnu/lib make -j 4 check + + file apps/openssl/openssl + elif [ "$ARCH" = "mips32" -o "$ARCH" = "mips64" ]; then sudo apt-get install -y qemu-user-static binfmt-support -- cgit v1.2.3-55-g6feb