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 --- scripts/test | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'scripts') 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 From f4cc344689038ef1c5a3280aa5bf9754fe751ba3 Mon Sep 17 00:00:00 2001 From: Joshua Sing Date: Sat, 12 Apr 2025 23:12:57 +1000 Subject: scripts/test: change from g++-14 to g++ --- scripts/test | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'scripts') diff --git a/scripts/test b/scripts/test index 473d689..e25a57a 100755 --- a/scripts/test +++ b/scripts/test @@ -133,13 +133,13 @@ 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 apt install -y qemu-user-static binfmt-support g++-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 + CC=loongarch64-linux-gnu-gcc + CXX=loongarch64-linux-gnu++ AR=loongarch64-linux-gnu-ar - STRIP=loongarch64-linux-gnu-strip-14 + STRIP=loongarch64-linux-gnu-strip RANLIB=loongarch64-linux-gnu-ranlib ./configure --host=loongarch64-linux-gnu -- cgit v1.2.3-55-g6feb From a71747c235e1044a6463909a8916a91eaec1b32c Mon Sep 17 00:00:00 2001 From: Joshua Sing Date: Sat, 12 Apr 2025 23:41:15 +1000 Subject: scripts/test: revert to using g++-14 It seems `g++-loongarch64-linux-gnu` does not exist in the Ubuntu universe repositories. It also fails using the ubuntu Docker image locally (with the universe repo added). `g++-14-loongarch-linux-gnu` exists on both Ubuntu 22.04 and 24.04, however ideally we want to use whatever works on the most platforms. --- scripts/test | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'scripts') diff --git a/scripts/test b/scripts/test index e25a57a..473d689 100755 --- a/scripts/test +++ b/scripts/test @@ -133,13 +133,13 @@ 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++-loongarch64-linux-gnu + 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 - CXX=loongarch64-linux-gnu++ + CC=loongarch64-linux-gnu-gcc-14 + CXX=loongarch64-linux-gnu++-14 AR=loongarch64-linux-gnu-ar - STRIP=loongarch64-linux-gnu-strip + STRIP=loongarch64-linux-gnu-strip-14 RANLIB=loongarch64-linux-gnu-ranlib ./configure --host=loongarch64-linux-gnu -- cgit v1.2.3-55-g6feb From 090f7892f7f7280f69289dc5e99ab5ed64908269 Mon Sep 17 00:00:00 2001 From: Joshua Sing Date: Sun, 13 Apr 2025 01:09:48 +1000 Subject: scripts/test: use lib64 for loongarch64 --- .github/workflows/linux.yml | 2 +- scripts/test | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'scripts') diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index fd0650e..88dd15e 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -40,7 +40,7 @@ jobs: uses: actions/checkout@v4 - name: "Run tests" - run: ./scripts/test || cat tests/test-suite.log + run: ./scripts/test || (status=$?; cat tests/test-suite.log; exit $status) env: ARCH: "${{ matrix.arch }}" CC: "${{ matrix.compiler }}" diff --git a/scripts/test b/scripts/test index 473d689..a93fe90 100755 --- a/scripts/test +++ b/scripts/test @@ -134,7 +134,7 @@ elif [ "$ARCH" = "arm32" -o "$ARCH" = "arm64" ]; then 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 + sudo ln -sf /usr/loongarch64-linux-gnu/lib64/ld-linux-loongarch-lp64d.so.1 /lib64 CC=loongarch64-linux-gnu-gcc-14 CXX=loongarch64-linux-gnu++-14 -- cgit v1.2.3-55-g6feb