Skip to content

Commit 3353764

Browse files
committed
Land #1148 - ci: test on loongarch64
2 parents fcd8751 + 090f789 commit 3353764

2 files changed

Lines changed: 19 additions & 1 deletion

File tree

.github/workflows/linux.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,15 @@ jobs:
3232
- os: "ubuntu-24.04"
3333
arch: "native"
3434
compiler: "clang"
35+
- os: "ubuntu-24.04" # loong64
36+
arch: "loong64"
37+
compiler: "gcc"
3538
steps:
3639
- name: "Checkout repository"
3740
uses: actions/checkout@v4
3841

3942
- name: "Run tests"
40-
run: ./scripts/test
43+
run: ./scripts/test || (status=$?; cat tests/test-suite.log; exit $status)
4144
env:
4245
ARCH: "${{ matrix.arch }}"
4346
CC: "${{ matrix.compiler }}"

scripts/test

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,21 @@ elif [ "$ARCH" = "arm32" -o "$ARCH" = "arm64" ]; then
132132

133133
file apps/openssl/.libs/openssl
134134

135+
elif [ "$ARCH" = "loong64" ]; then
136+
sudo apt install -y qemu-user-static binfmt-support g++-14-loongarch64-linux-gnu
137+
sudo ln -sf /usr/loongarch64-linux-gnu/lib64/ld-linux-loongarch-lp64d.so.1 /lib64
138+
139+
CC=loongarch64-linux-gnu-gcc-14
140+
CXX=loongarch64-linux-gnu++-14
141+
AR=loongarch64-linux-gnu-ar
142+
STRIP=loongarch64-linux-gnu-strip-14
143+
RANLIB=loongarch64-linux-gnu-ranlib
144+
145+
./configure --host=loongarch64-linux-gnu
146+
LD_LIBRARY_PATH=/usr/loongarch64-linux-gnu/lib make -j 4 check
147+
148+
file apps/openssl/openssl
149+
135150
elif [ "$ARCH" = "mips32" -o "$ARCH" = "mips64" ]; then
136151
sudo apt-get install -y qemu-user-static binfmt-support
137152

0 commit comments

Comments
 (0)