Skip to content

Commit a354a2d

Browse files
authored
Merge pull request #536 from igaw/run-cross-tests
Add s390x cross build
2 parents ca5df0a + b1f7ba4 commit a354a2d

2 files changed

Lines changed: 50 additions & 2 deletions

File tree

.github/cross/ubuntu-s390x.txt

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
[binaries]
2+
c = '/usr/bin/s390x-linux-gnu-gcc'
3+
ar = '/usr/s390x-linux-gnu/bin/ar'
4+
strip = '/usr/s390x-linux-gnu/bin/strip'
5+
pkgconfig = '/usr/bin/s390x-linux-gnu-pkg-config'
6+
ld = '/usr/bin/s390x-linux-gnu-ld'
7+
exe_wrapper = '/usr/bin/qemu-s390x-static'
8+
9+
[properties]
10+
root = '/usr/s390x-linux-gnu'
11+
has_function_printf = true
12+
skip_sanity_check = true
13+
14+
[host_machine]
15+
system = 'linux'
16+
cpu_family = 's390x'
17+
cpu = ''
18+
endian = 'big'

.github/workflows/meson.yml

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ jobs:
4646
- name: install armhf compiler
4747
run: sudo apt install gcc-arm-linux-gnueabihf pkg-config qemu-user-static
4848
- name: install libraries
49-
run: sudo apt install uuid-dev:armhf libjson-c-dev:armhf
49+
run: sudo apt install libjson-c-dev:armhf
5050
- uses: actions/checkout@v3
5151
- uses: BSFishy/[email protected]
5252
with:
@@ -76,7 +76,7 @@ jobs:
7676
- name: install powerpc64le compiler
7777
run: sudo apt install gcc-powerpc64le-linux-gnu pkg-config qemu-user-static
7878
- name: install libraries
79-
run: sudo apt install uuid-dev:ppc64el libjson-c-dev:ppc64el
79+
run: sudo apt install libjson-c-dev:ppc64el
8080
- uses: actions/checkout@v3
8181
- uses: BSFishy/[email protected]
8282
with:
@@ -90,6 +90,36 @@ jobs:
9090
name: Linux_Meson_Testlog
9191
path: build/meson-logs/testlog.txt
9292

93+
build-cross-s390x:
94+
runs-on: ubuntu-latest
95+
steps:
96+
- name: set up s390x architecture
97+
run: |
98+
export release=$(lsb_release -c -s)
99+
sudo dpkg --add-architecture s390x
100+
sudo sed -i -e 's/deb http/deb [arch=amd64] http/g' /etc/apt/sources.list
101+
sudo dd of=/etc/apt/sources.list.d/s390x.list <<EOF
102+
deb [arch=s390x] http://ports.ubuntu.com/ $release main universe restricted"
103+
deb [arch=s390x] http://ports.ubuntu.com/ $release-updates main universe restricted"
104+
EOF
105+
sudo apt update
106+
- name: install s390x compiler
107+
run: sudo apt install gcc-s390x-linux-gnu pkg-config qemu-user-static
108+
- name: install libraries
109+
run: sudo apt install libjson-c-dev:s390x
110+
- uses: actions/checkout@v3
111+
- uses: BSFishy/[email protected]
112+
with:
113+
# suppress python for now; the python headers currently assume native
114+
setup-options: --werror --cross-file=.github/cross/ubuntu-s390x.txt --wrap-mode=nofallback -Dpython=false
115+
options: --verbose
116+
action: test
117+
- uses: actions/upload-artifact@v3
118+
if: failure()
119+
with:
120+
name: Linux_Meson_Testlog
121+
path: build/meson-logs/testlog.txt
122+
93123
build-fallback:
94124
runs-on: ubuntu-latest
95125
steps:

0 commit comments

Comments
 (0)