mirror of
https://github.com/GerbilSoft/zlib-ng.git
synced 2025-06-19 03:55:39 -04:00
ci: add a Clang RISCV test target
Similar to the GCC one, this test target uses system toolchain and QEMU too. Signed-off-by: Icenowy Zheng <uwu@icenowy.me>
This commit is contained in:
parent
549ca4d617
commit
64d16e10bc
5
.github/workflows/cmake.yml
vendored
5
.github/workflows/cmake.yml
vendored
@ -312,6 +312,11 @@ jobs:
|
|||||||
gcov-exec: riscv64-linux-gnu-gcov
|
gcov-exec: riscv64-linux-gnu-gcov
|
||||||
codecov: ubuntu_gcc_riscv64
|
codecov: ubuntu_gcc_riscv64
|
||||||
|
|
||||||
|
- name: Ubuntu Clang RISC-V
|
||||||
|
os: ubuntu-latest
|
||||||
|
cmake-args: -DCMAKE_TOOLCHAIN_FILE=cmake/toolchain-riscv-clang.cmake
|
||||||
|
packages: qemu-user crossbuild-essential-riscv64
|
||||||
|
|
||||||
- name: Ubuntu GCC SPARC64
|
- name: Ubuntu GCC SPARC64
|
||||||
# qemu appears to be broken in newer versions of Ubuntu (see issue 1378)
|
# qemu appears to be broken in newer versions of Ubuntu (see issue 1378)
|
||||||
os: ubuntu-20.04
|
os: ubuntu-20.04
|
||||||
|
16
cmake/toolchain-riscv-clang.cmake
Normal file
16
cmake/toolchain-riscv-clang.cmake
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
set(CMAKE_SYSTEM_NAME Linux)
|
||||||
|
set(CMAKE_SYSTEM_PROCESSOR riscv64)
|
||||||
|
set(CMAKE_SYSTEM_VERSION 1)
|
||||||
|
|
||||||
|
set(CMAKE_C_COMPILER clang)
|
||||||
|
set(CMAKE_C_COMPILER_TARGET riscv64-linux-gnu)
|
||||||
|
set(CMAKE_CXX_COMPILER clang++)
|
||||||
|
set(CMAKE_CXX_COMPILER_TARGET riscv64-linux-gnu)
|
||||||
|
|
||||||
|
set(CMAKE_CROSSCOMPILING TRUE)
|
||||||
|
set(CMAKE_CROSSCOMPILING_EMULATOR qemu-riscv64 -cpu rv64,zba=true,zbb=true,zbc=true,zbs=true,v=true,vlen=512,elen=64,vext_spec=v1.0 -L /usr/${CMAKE_C_COMPILER_TARGET}/)
|
||||||
|
|
||||||
|
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
|
||||||
|
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
|
||||||
|
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|
||||||
|
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
|
Loading…
Reference in New Issue
Block a user