]> git.droids-corp.org - dpdk.git/commitdiff
ci: add RISC-V cross compilation
authorStanislaw Kardach <kda@semihalf.com>
Tue, 7 Jun 2022 10:46:17 +0000 (12:46 +0200)
committerDavid Marchand <david.marchand@redhat.com>
Wed, 8 Jun 2022 09:26:34 +0000 (11:26 +0200)
Check cross-compilation using Ubuntu 20.04 x86.

Signed-off-by: David Marchand <david.marchand@redhat.com>
Signed-off-by: Stanislaw Kardach <kda@semihalf.com>
.ci/linux-build.sh
.github/workflows/build.yml

index 1de8962f0e28d1c817bc9338633cf4bdc488e47e..06104eca227184e4978777e54fd6966c2a2154b1 100755 (executable)
@@ -74,6 +74,10 @@ if [ "$PPC64LE" = "true" ]; then
     cross_file=config/ppc/ppc64le-power8-linux-gcc-ubuntu
 fi
 
+if [ "$RISCV64" = "true" ]; then
+    cross_file=config/riscv/riscv64_linux_gcc
+fi
+
 if [ -n "$cross_file" ]; then
     OPTS="$OPTS --cross-file $cross_file"
 fi
index ad8ad1a1877ce2fab98cd212c15c0a16079e4f50..7c8528cb04900a99cb5c89f177b3953f191a0b8b 100644 (file)
@@ -26,6 +26,7 @@ jobs:
       MINI: ${{ matrix.config.mini != '' }}
       PPC64LE: ${{ matrix.config.cross == 'ppc64le' }}
       REF_GIT_TAG: v22.03
+      RISCV64: ${{ matrix.config.cross == 'riscv64' }}
       RUN_TESTS: ${{ contains(matrix.config.checks, 'tests') }}
 
     strategy:
@@ -74,6 +75,10 @@ jobs:
             compiler: gcc
             library: shared
             cross: ppc64le
+          - os: ubuntu-20.04
+            compiler: gcc
+            library: shared
+            cross: riscv64
 
     steps:
     - name: Checkout sources
@@ -132,8 +137,12 @@ jobs:
       if: env.PPC64LE == 'true'
       run: sudo apt install -y gcc-powerpc64le-linux-gnu libc6-dev-ppc64el-cross
         pkg-config-powerpc-linux-gnu
+    - name: Install riscv64 cross compiling packages
+      if: env.RISCV64 == 'true'
+      run: sudo apt install -y gcc-riscv64-linux-gnu libc6-dev-riscv64-cross
+        pkg-config-riscv64-linux-gnu
     - name: Install test tools packages
-      if: env.AARCH64 != 'true' || env.PPC64LE != 'true' || env.RUN_TESTS == 'true'
+      if: env.AARCH64 != 'true' || env.PPC64LE != 'true' || env.RISCV64 != 'true' || env.RUN_TESTS == 'true'
       run: sudo apt install -y gdb
     - name: Install doc generation packages
       if: env.BUILD_DOCS == 'true'