[kvm-unit-tests PATCH v2 4/4] riscv: gitlab-ci: Add clang build tests

Nicholas Piggin npiggin at gmail.com
Tue Sep 10 17:26:03 PDT 2024


On Wed Sep 4, 2024 at 8:50 PM AEST, Andrew Jones wrote:
> Test building 32 and 64-bit with clang. Throw a test of in- and out-
> of-tree building in too by swapping which is done to which (32-bit
> vs. 64-bit) with respect to the gcc build tests.
>
Acked-by: Nicholas Piggin <npiggin at gmail.com>

> Acked-by: Thomas Huth <thuth at redhat.com>
> Signed-off-by: Andrew Jones <andrew.jones at linux.dev>
> ---
>  .gitlab-ci.yml | 43 +++++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 43 insertions(+)
>
> diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
> index 67a9a15733f1..b7ad99870e5a 100644
> --- a/.gitlab-ci.yml
> +++ b/.gitlab-ci.yml
> @@ -176,6 +176,49 @@ build-riscv64-efi:
>        | tee results.txt
>   - grep -q PASS results.txt && ! grep -q FAIL results.txt
>  
> +build-riscv32-clang:
> + extends: .intree_template
> + script:
> + - dnf install -y qemu-system-riscv gcc-riscv64-linux-gnu clang
> + - ./configure --arch=riscv32 --cc=clang --cflags='--target=riscv32' --cross-prefix=riscv64-linux-gnu-
> + - make -j2
> + - printf "FOO=foo\nBAR=bar\nBAZ=baz\nMVENDORID=0\nMARCHID=0\nMIMPID=0\n" >test-env
> + - ACCEL=tcg KVM_UNIT_TESTS_ENV=test-env ./run_tests.sh
> +      selftest
> +      sbi
> +      | tee results.txt
> + - grep -q PASS results.txt && ! grep -q FAIL results.txt
> +
> +build-riscv64-clang:
> + extends: .outoftree_template
> + script:
> + - dnf install -y qemu-system-riscv gcc-riscv64-linux-gnu clang
> + - mkdir build
> + - cd build
> + - ../configure --arch=riscv64 --cc=clang --cflags='--target=riscv64' --cross-prefix=riscv64-linux-gnu-
> + - make -j2
> + - printf "FOO=foo\nBAR=bar\nBAZ=baz\nMVENDORID=0\nMARCHID=0\nMIMPID=0\n" >test-env
> + - ACCEL=tcg KVM_UNIT_TESTS_ENV=test-env ./run_tests.sh
> +      selftest
> +      sbi
> +      | tee results.txt
> + - grep -q PASS results.txt && ! grep -q FAIL results.txt
> +
> +build-riscv64-clang-efi:
> + extends: .intree_template
> + script:
> + - dnf install -y edk2-riscv64 qemu-system-riscv gcc-riscv64-linux-gnu clang
> + - cp /usr/share/edk2/riscv/RISCV_VIRT_CODE.fd .
> + - truncate -s 32M RISCV_VIRT_CODE.fd
> + - ./configure --arch=riscv64 --cc=clang --cflags='--target=riscv64' --cross-prefix=riscv64-linux-gnu- --enable-efi
> + - make -j2
> + - printf "FOO=foo\nBAR=bar\nBAZ=baz\nMVENDORID=0\nMARCHID=0\nMIMPID=0\n" >test-env
> + - ACCEL=tcg KVM_UNIT_TESTS_ENV=test-env ./run_tests.sh
> +      selftest
> +      sbi
> +      | tee results.txt
> + - grep -q PASS results.txt && ! grep -q FAIL results.txt
> +
>  build-s390x:
>   extends: .outoftree_template
>   script:




More information about the kvm-riscv mailing list