Skip to content

Commit

Permalink
gh-actions: add clang-qemu: aarch64, riscv64, ppc64el, s390x
Browse files Browse the repository at this point in the history
  • Loading branch information
mr-c committed May 21, 2023
1 parent 1e1bd76 commit 8a6dbab
Show file tree
Hide file tree
Showing 5 changed files with 98 additions and 3 deletions.
55 changes: 55 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,61 @@ jobs:
- name: Test
run: meson test -C build --print-errorlogs --print-errorlogs $(meson test -C build --list | grep -v emul)

clang-qemu:
strategy:
matrix:
include:
- version: 15
cross: aarch64
arch_gnu: aarch64
arch_deb: arm64
distro: ubuntu-22.04
# - version: 15
# cross: riscv64
# arch_gnu: riscv64
# arch_deb: riscv64
# distro: ubuntu-22.04
# - version: 15
# cross: s390x
# arch_gnu: s390x
# arch_deb: s390x
# distro: ubuntu-22.04
- version: 15
cross: ppc64el
arch_deb: ppc64el
arch_gnu: powerpc64le
distro: ubuntu-22.04
runs-on: ${{ matrix.distro }}
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- run: sudo apt-get update
- name: CPU Information
run: cat /proc/cpuinfo
- name: Install APT Dependencies
run: |
sudo add-apt-repository ppa:savoury1/virtualisation
sudo apt-get update -y
sudo apt-get -yq install ninja-build parallel \
binfmt-support clang-${{ matrix.version }} clang++-${{ matrix.version }} \
qemu-user-static python3-pip libc6-${{ matrix.arch_deb }}-cross libstdc++-12-dev-${{ matrix.arch_deb }}-cross \
binutils-${{ matrix.arch_gnu }}-linux-gnu
sudo python3 -m pip install meson==0.55.0
- name: ccache
uses: hendrikmuhs/[email protected]
with:
key: ${{ github.job }}-${{ matrix.distro }}-${{ matrix.cross }}
- name: add ccache to the build path
run: |
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
- name: Configure
run: meson setup --cross-file=docker/cross-files/${{ matrix.cross }}-clang-${{ matrix.version }}-ccache.cross build
- name: Build
run: ninja -C build -v
- name: Test
run: meson test -C build --print-errorlogs --print-errorlogs $(meson test -C build --list | grep -v emul)

clang:
strategy:
matrix:
Expand Down
2 changes: 1 addition & 1 deletion docker/cross-files/power9-clang-15.cross
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ cpp_link_args = ['--target=powerpc64le-linux-gnu']

[host_machine]
system = 'linux'
cpu_family = 'powerpc64'
cpu_family = 'ppc64'
cpu = 'ppc64el'
endian = 'little'
20 changes: 20 additions & 0 deletions docker/cross-files/ppc64el-clang-15-ccache.cross
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
[binaries]
c = ['ccache', 'clang-15']
cpp = ['ccache', 'clang++-15']
ar = 'llvm-ar-15'
strip = 'llvm-strip-15'
objcopy = 'llvm-objcopy-15'
ld = 'llvm-ld-15'
exe_wrapper = ['qemu-ppc64le-static', '-L', '/usr/powerpc64le-linux-gnu/']

[properties]
c_args = ['--target=powerpc64le-linux-gnu', '-isystem=/usr/powerpc64le-linux-gnu/include', '-Weverything', '-fno-lax-vector-conversions', '-Werror', '-Wno-deprecated-altivec-src-compat']
cpp_args = ['--target=powerpc64le-linux-gnu', '-isystem=/usr/powerpc64le-linux-gnu/include', '-Weverything', '-fno-lax-vector-conversions', '-Werror', '-Wno-deprecated-altivec-src-compat']
c_link_args = ['--target=powerpc64le-linux-gnu']
cpp_link_args = ['--target=powerpc64le-linux-gnu']

[host_machine]
system = 'linux'
cpu_family = 'ppc64'
cpu = 'ppc64el'
endian = 'little'
20 changes: 20 additions & 0 deletions docker/cross-files/ppc64el-clang-15.cross
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
[binaries]
c = 'clang-15'
cpp = 'clang++-15'
ar = 'llvm-ar-15'
strip = 'llvm-strip-15'
objcopy = 'llvm-objcopy-15'
ld = 'llvm-ld-15'
exe_wrapper = ['qemu-ppc64le-static', '-L', '/usr/powerpc64le-linux-gnu/']

[properties]
c_args = ['--target=powerpc64le-linux-gnu', '-isystem=/usr/powerpc64le-linux-gnu/include', '-Weverything', '-fno-lax-vector-conversions', '-Werror', '-Wno-deprecated-altivec-src-compat']
cpp_args = ['--target=powerpc64le-linux-gnu', '-isystem=/usr/powerpc64le-linux-gnu/include', '-Weverything', '-fno-lax-vector-conversions', '-Werror', '-Wno-deprecated-altivec-src-compat']
c_link_args = ['--target=powerpc64le-linux-gnu']
cpp_link_args = ['--target=powerpc64le-linux-gnu']

[host_machine]
system = 'linux'
cpu_family = 'ppc64'
cpu = 'ppc64el'
endian = 'little'
4 changes: 2 additions & 2 deletions docker/cross-files/s390x-clang-15-ccache.cross
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ ld = 'llvm-ld-15'
exe_wrapper = ['qemu-s390x-static', '-L', '/usr/s390x-linux-gnu/']

[properties]
c_args = ['--target=s390x-ibm-linux', '-isystem=/usr/s390x-linux-gnu/include', '-Weverything', '-fno-lax-vector-conversions', '-Werror']
cpp_args = ['--target=s390x-ibm-linux', '-isystem=/usr/s390x-linux-gnu/include', '-Weverything', '-fno-lax-vector-conversions', '-Werror']
c_args = ['--target=s390x-ibm-linux', '-mpcu=z196', '-isystem=/usr/s390x-linux-gnu/include', '-Weverything', '-fno-lax-vector-conversions', '-Werror']
cpp_args = ['--target=s390x-ibm-linux', '-mpcu=z196', '-isystem=/usr/s390x-linux-gnu/include', '-Weverything', '-fno-lax-vector-conversions', '-Werror']
c_link_args = ['--target=s390x-ibm-linux']
cpp_link_args = ['--target=s390x-ibm-linux']

Expand Down

0 comments on commit 8a6dbab

Please sign in to comment.