From 33b4ee9eb3212f6b552ef3e1d2e1671d63a8bd12 Mon Sep 17 00:00:00 2001 From: Charles Oliver Nutter Date: Mon, 15 Aug 2022 12:37:48 -0500 Subject: [PATCH 1/6] Add LoongArch to CI --- .github/workflows/native-linux.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/native-linux.yml b/.github/workflows/native-linux.yml index 8cc30e80..ce5e7c91 100644 --- a/.github/workflows/native-linux.yml +++ b/.github/workflows/native-linux.yml @@ -24,6 +24,7 @@ jobs: - arm64 - linux-arm-v5 - s390x + - loongarch64 name: Linux binary ${{ matrix.arch }} From 39c320244a0e6b2db2363eb3e835dccd986a361a Mon Sep 17 00:00:00 2001 From: Charles Oliver Nutter Date: Tue, 18 Oct 2022 15:11:45 -0500 Subject: [PATCH 2/6] Try using a different base for loong64 --- .github/workflows/native-linux.yml | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/.github/workflows/native-linux.yml b/.github/workflows/native-linux.yml index ce5e7c91..0947c7f3 100644 --- a/.github/workflows/native-linux.yml +++ b/.github/workflows/native-linux.yml @@ -17,16 +17,17 @@ jobs: strategy: matrix: - arch: - - "386" - - amd64 - - arm - - arm64 - - linux-arm-v5 - - s390x - - loongarch64 + image: [ + { base: "debian:10", arch: "386" }, + { base: "debian:10", arch: amd64 }, + { base: "debian:10", arch: arm }, + { base: "debian:10", arch: arm64 }, + { base: "debian:10", arch: linux-arm-v5 }, + { base: "debian:10", arch: s390x }, + { base: "loongsongd/debian:v10.2-la64", arch: "linux/loong64" } + ] - name: Linux binary ${{ matrix.arch }} + name: Linux binary ${{ matrix.image.arch }} steps: - uses: actions/checkout@v2 @@ -47,17 +48,17 @@ jobs: - name: Restart Docker run: sudo systemctl restart docker.service - name: Pull docker image - run: docker pull --platform $(echo ${{ matrix.arch }} | sed 's|-|/|g') debian:10 || true + run: docker pull --platform $(echo ${{ matrix.image.arch }} | sed 's|-|/|g') ${{ matrix.image.base }} || true - name: Build inside Docker - run: docker run --rm -v $GITHUB_WORKSPACE:/work debian:10 /work/.github/build-native-debian.sh + run: docker run --rm -v $GITHUB_WORKSPACE:/work ${{ matrix.image.base }} /work/.github/build-native-debian.sh - name: Archive built library uses: actions/upload-artifact@v2 with: - name: shared-object-${{ matrix.arch }} + name: shared-object-${{ matrix.image.arch }} path: build/jni/*.so - name: Archive built jar uses: actions/upload-artifact@v2 with: - name: jar-${{ matrix.arch }} + name: jar-${{ matrix.image.arch }} path: archive/*.jar From 2827aa9e46843946f138b44870a6a8ac5e013e0a Mon Sep 17 00:00:00 2001 From: Charles Oliver Nutter Date: Mon, 24 Oct 2022 12:40:27 -0500 Subject: [PATCH 3/6] Disable fail-fast --- .github/workflows/native-linux.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/native-linux.yml b/.github/workflows/native-linux.yml index 0947c7f3..ef3448e3 100644 --- a/.github/workflows/native-linux.yml +++ b/.github/workflows/native-linux.yml @@ -26,6 +26,7 @@ jobs: { base: "debian:10", arch: s390x }, { base: "loongsongd/debian:v10.2-la64", arch: "linux/loong64" } ] + fail-fast: false name: Linux binary ${{ matrix.image.arch }} From bb96890175a55a702987ae89391cc081888966a7 Mon Sep 17 00:00:00 2001 From: Charles Oliver Nutter Date: Tue, 25 Oct 2022 16:04:27 -0500 Subject: [PATCH 4/6] Try to use a newer qemu --- .github/workflows/native-linux.yml | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/.github/workflows/native-linux.yml b/.github/workflows/native-linux.yml index ef3448e3..0ab98b2b 100644 --- a/.github/workflows/native-linux.yml +++ b/.github/workflows/native-linux.yml @@ -18,13 +18,13 @@ jobs: strategy: matrix: image: [ - { base: "debian:10", arch: "386" }, - { base: "debian:10", arch: amd64 }, - { base: "debian:10", arch: arm }, - { base: "debian:10", arch: arm64 }, - { base: "debian:10", arch: linux-arm-v5 }, - { base: "debian:10", arch: s390x }, - { base: "loongsongd/debian:v10.2-la64", arch: "linux/loong64" } + { base: "debian:10", arch: "386", qemu_arch: "i386-softmmu" }, + { base: "debian:10", arch: amd64, qemu_arch: "x86_64-softmmu" }, + { base: "debian:10", arch: arm, qemu_arch: "arm-softmmu" }, + { base: "debian:10", arch: arm64, qemu_arch: "aarch64-softmmu" }, + { base: "debian:10", arch: linux-arm-v5, qemu_arch: "arm-softmmu" }, + { base: "debian:10", arch: s390x, qemu-arch: "s390x-softmmu" }, + { base: "loongsongd/debian:v10.2-la64", arch: "linux/loong64", qemu_arch: "loongarch64-softmmu" } ] fail-fast: false @@ -42,8 +42,10 @@ jobs: continue-on-error: true - name: Update System run: sudo apt-get update -y + - name: Install Ninja + run: sudo apt-get install ninja-build - name: Install qemu - run: sudo apt-get install -y --no-install-recommends qemu-user-static + run: "wget -q https://download.qemu.org/qemu-7.1.0.tar.xz && tar xJf qemu-7.1.0.tar.xz && cd qemu-7.1.0 && ./configure --target-list=${{ matrix.image.qemu_arch }} && make -j4 & sudo make install" - name: Experimental Docker run: sudo cp .github/experimental-docker.json /etc/docker/daemon.json - name: Restart Docker From a78eaeba2437d64388e754d7697fb779eb2f1d68 Mon Sep 17 00:00:00 2001 From: Charles Oliver Nutter Date: Tue, 25 Oct 2022 17:01:39 -0500 Subject: [PATCH 5/6] Try adding platform to docker build command --- .github/workflows/native-linux.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/native-linux.yml b/.github/workflows/native-linux.yml index 0ab98b2b..64b5b6a2 100644 --- a/.github/workflows/native-linux.yml +++ b/.github/workflows/native-linux.yml @@ -53,7 +53,7 @@ jobs: - name: Pull docker image run: docker pull --platform $(echo ${{ matrix.image.arch }} | sed 's|-|/|g') ${{ matrix.image.base }} || true - name: Build inside Docker - run: docker run --rm -v $GITHUB_WORKSPACE:/work ${{ matrix.image.base }} /work/.github/build-native-debian.sh + run: docker run --platform $(echo ${{ matrix.image.arch }} --rm -v $GITHUB_WORKSPACE:/work ${{ matrix.image.base }} /work/.github/build-native-debian.sh - name: Archive built library uses: actions/upload-artifact@v2 with: From bada757d5e410dc8077777fb3f03acd522a0077d Mon Sep 17 00:00:00 2001 From: Charles Oliver Nutter Date: Tue, 25 Oct 2022 17:04:11 -0500 Subject: [PATCH 6/6] Fix typo --- .github/workflows/native-linux.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/native-linux.yml b/.github/workflows/native-linux.yml index 64b5b6a2..5affe871 100644 --- a/.github/workflows/native-linux.yml +++ b/.github/workflows/native-linux.yml @@ -45,7 +45,7 @@ jobs: - name: Install Ninja run: sudo apt-get install ninja-build - name: Install qemu - run: "wget -q https://download.qemu.org/qemu-7.1.0.tar.xz && tar xJf qemu-7.1.0.tar.xz && cd qemu-7.1.0 && ./configure --target-list=${{ matrix.image.qemu_arch }} && make -j4 & sudo make install" + run: "wget -q https://download.qemu.org/qemu-7.1.0.tar.xz && tar xJf qemu-7.1.0.tar.xz && cd qemu-7.1.0 && ./configure --target-list=${{ matrix.image.qemu_arch }} && make -j4 && sudo make install" - name: Experimental Docker run: sudo cp .github/experimental-docker.json /etc/docker/daemon.json - name: Restart Docker