Skip to content

Commit 212a72b

Browse files
authored
Merge pull request #479 from CodeConstruct/dev/ci-cross
github workflows: Add armhf & powerpc64le cross builds
2 parents 54b774f + eaa9890 commit 212a72b

3 files changed

Lines changed: 94 additions & 0 deletions

File tree

.github/cross/ubuntu-armhf.txt

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

.github/cross/ubuntu-ppc64le.txt

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

.github/workflows/meson.yml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,66 @@ jobs:
3030
name: Linux_Meson_Testlog
3131
path: build/meson-logs/testlog.txt
3232

33+
build-cross-armhf:
34+
runs-on: ubuntu-latest
35+
steps:
36+
- name: set up arm architecture
37+
run: |
38+
export release=$(lsb_release -c -s)
39+
sudo dpkg --add-architecture armhf
40+
sudo sed -i -e 's/deb http/deb [arch=amd64] http/g' /etc/apt/sources.list
41+
sudo dd of=/etc/apt/sources.list.d/armhf.list <<EOF
42+
deb [arch=armhf] http://ports.ubuntu.com/ $release main universe restricted"
43+
deb [arch=armhf] http://ports.ubuntu.com/ $release-updates main universe restricted"
44+
EOF
45+
sudo apt update
46+
- name: install armhf compiler
47+
run: sudo apt install gcc-arm-linux-gnueabihf pkg-config
48+
- name: install libraries
49+
run: sudo apt install uuid-dev:armhf libjson-c-dev:armhf
50+
- uses: actions/checkout@v3
51+
- uses: BSFishy/[email protected]
52+
with:
53+
# suppress python for now; the python headers currently assume native
54+
setup-options: --werror --cross-file=.github/cross/ubuntu-armhf.txt --wrap-mode=nofallback -Dpython=false
55+
options: --verbose
56+
action: build
57+
- uses: actions/upload-artifact@v3
58+
if: failure()
59+
with:
60+
name: Linux_Meson_Testlog
61+
path: build/meson-logs/testlog.txt
62+
63+
build-cross-ppc64le:
64+
runs-on: ubuntu-latest
65+
steps:
66+
- name: set up ppc64le architecture
67+
run: |
68+
export release=$(lsb_release -c -s)
69+
sudo dpkg --add-architecture ppc64el
70+
sudo sed -i -e 's/deb http/deb [arch=amd64] http/g' /etc/apt/sources.list
71+
sudo dd of=/etc/apt/sources.list.d/ppc64el.list <<EOF
72+
deb [arch=ppc64el] http://ports.ubuntu.com/ $release main universe restricted"
73+
deb [arch=ppc64el] http://ports.ubuntu.com/ $release-updates main universe restricted"
74+
EOF
75+
sudo apt update
76+
- name: install powerpc64le compiler
77+
run: sudo apt install gcc-powerpc64le-linux-gnu pkg-config
78+
- name: install libraries
79+
run: sudo apt install uuid-dev:ppc64el libjson-c-dev:ppc64el
80+
- uses: actions/checkout@v3
81+
- uses: BSFishy/[email protected]
82+
with:
83+
# suppress python for now; the python headers currently assume native
84+
setup-options: --werror --cross-file=.github/cross/ubuntu-ppc64le.txt --wrap-mode=nofallback -Dpython=false
85+
options: --verbose
86+
action: build
87+
- uses: actions/upload-artifact@v3
88+
if: failure()
89+
with:
90+
name: Linux_Meson_Testlog
91+
path: build/meson-logs/testlog.txt
92+
3393
build-fallback:
3494
runs-on: ubuntu-latest
3595
steps:

0 commit comments

Comments
 (0)