[v3,8/8] ci: add RISCV64 cross compilation job

Message ID 20220510154849.530872-9-kda@semihalf.com (mailing list archive)
State Superseded, archived
Delegated to: David Marchand
Headers
Series Introduce support for RISC-V architecture |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK
ci/intel-Testing success Testing PASS
ci/github-robot: build fail github build: failed

Commit Message

Stanislaw Kardach May 10, 2022, 3:48 p.m. UTC
  Checks 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          |  4 ++++
 .github/workflows/build.yml | 11 ++++++++++-
 2 files changed, 14 insertions(+), 1 deletion(-)
  

Comments

Aaron Conole May 12, 2022, 3:47 p.m. UTC | #1
Stanislaw Kardach <kda@semihalf.com> writes:

> Checks 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          |  4 ++++
>  .github/workflows/build.yml | 11 ++++++++++-
>  2 files changed, 14 insertions(+), 1 deletion(-)

Seems there is still a failure in this series - once that is resolved I
think this can go in.

> diff --git a/.ci/linux-build.sh b/.ci/linux-build.sh
> index 877243c9c8..aa5e9ec114 100755
> --- a/.ci/linux-build.sh
> +++ b/.ci/linux-build.sh
> @@ -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
> diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
> index e2f94d786b..ca468da8fa 100644
> --- a/.github/workflows/build.yml
> +++ b/.github/workflows/build.yml
> @@ -25,6 +25,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:
> @@ -73,6 +74,10 @@ jobs:
>              compiler: gcc
>              library: shared
>              cross: ppc64le
> +          - os: ubuntu-20.04
> +            compiler: gcc
> +            library: shared
> +            cross: riscv64
>  
>      steps:
>      - name: Checkout sources
> @@ -131,8 +136,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'
  
Stanislaw Kardach May 12, 2022, 4:07 p.m. UTC | #2
On Thu, 12 May 2022, 17:47 Aaron Conole, <aconole@redhat.com> wrote:

> Stanislaw Kardach <kda@semihalf.com> writes:
>
> > Checks 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          |  4 ++++
> >  .github/workflows/build.yml | 11 ++++++++++-
> >  2 files changed, 14 insertions(+), 1 deletion(-)
>
> Seems there is still a failure in this series - once that is resolved I
> think this can go in.
>
I suspect the failure is due to this series depending on 3 other patches
which I've marked with Depends-on in the offending patch. Is CI utilizing
those tags? If not, is there a way to relaunch it once dependencies are
integrated?

>
> > diff --git a/.ci/linux-build.sh b/.ci/linux-build.sh
> > index 877243c9c8..aa5e9ec114 100755
> > --- a/.ci/linux-build.sh
> > +++ b/.ci/linux-build.sh
> > @@ -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
> > diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
> > index e2f94d786b..ca468da8fa 100644
> > --- a/.github/workflows/build.yml
> > +++ b/.github/workflows/build.yml
> > @@ -25,6 +25,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:
> > @@ -73,6 +74,10 @@ jobs:
> >              compiler: gcc
> >              library: shared
> >              cross: ppc64le
> > +          - os: ubuntu-20.04
> > +            compiler: gcc
> > +            library: shared
> > +            cross: riscv64
> >
> >      steps:
> >      - name: Checkout sources
> > @@ -131,8 +136,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'
>
>
  
Aaron Conole May 13, 2022, 2:33 p.m. UTC | #3
Stanisław Kardach <kda@semihalf.com> writes:

> On Thu, 12 May 2022, 17:47 Aaron Conole, <aconole@redhat.com> wrote:
>
>  Stanislaw Kardach <kda@semihalf.com> writes:
>
>  > Checks 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          |  4 ++++
>  >  .github/workflows/build.yml | 11 ++++++++++-
>  >  2 files changed, 14 insertions(+), 1 deletion(-)
>
>  Seems there is still a failure in this series - once that is resolved I
>  think this can go in.
>
> I suspect the failure is due to this series depending on 3 other patches which I've marked with Depends-on in the
> offending patch. Is CI utilizing those tags? If not, is there a way to relaunch it once dependencies are integrated?

Ahh okay - yes 0day bot doesn't currently use that.  It's planned for
after the system upgrade (date on that is pending).

>  > diff --git a/.ci/linux-build.sh b/.ci/linux-build.sh
>  > index 877243c9c8..aa5e9ec114 100755
>  > --- a/.ci/linux-build.sh
>  > +++ b/.ci/linux-build.sh
>  > @@ -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
>  > diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
>  > index e2f94d786b..ca468da8fa 100644
>  > --- a/.github/workflows/build.yml
>  > +++ b/.github/workflows/build.yml
>  > @@ -25,6 +25,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:
>  > @@ -73,6 +74,10 @@ jobs:
>  >              compiler: gcc
>  >              library: shared
>  >              cross: ppc64le
>  > +          - os: ubuntu-20.04
>  > +            compiler: gcc
>  > +            library: shared
>  > +            cross: riscv64
>  >  
>  >      steps:
>  >      - name: Checkout sources
>  > @@ -131,8 +136,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'
  

Patch

diff --git a/.ci/linux-build.sh b/.ci/linux-build.sh
index 877243c9c8..aa5e9ec114 100755
--- a/.ci/linux-build.sh
+++ b/.ci/linux-build.sh
@@ -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
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index e2f94d786b..ca468da8fa 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -25,6 +25,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:
@@ -73,6 +74,10 @@  jobs:
             compiler: gcc
             library: shared
             cross: ppc64le
+          - os: ubuntu-20.04
+            compiler: gcc
+            library: shared
+            cross: riscv64
 
     steps:
     - name: Checkout sources
@@ -131,8 +136,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'