Skip to content

Commit f76e1c0

Browse files
committed
semaphore: fix i386 builds on semaphore
We need to jump through some hoops to have libzstd, and all the i386 versions of the deps. Also use bash arrays and put each dep on a separate line so the diffs look nicer.
1 parent 290b51e commit f76e1c0

File tree

1 file changed

+41
-15
lines changed

1 file changed

+41
-15
lines changed

test/semaphore-run

Lines changed: 41 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,45 @@
1-
#!/bin/sh
1+
#!/bin/bash
22
# SPDX-License-Identifier: LGPL-2.1+
33

4-
DEVPKGS="pkg-config liblzma-dev libcurl4-openssl-dev libssl-dev libacl1-dev libfuse-dev zlib1g-dev libzstd-dev libudev-dev"
4+
DEVPKGS=(
5+
pkg-config
6+
liblzma-dev
7+
libcurl4-openssl-dev
8+
libssl-dev
9+
libacl1-dev
10+
libfuse-dev
11+
zlib1g-dev
12+
libzstd-dev
13+
libudev-dev
14+
)
515

616
echo
717
echo "============= Installing amd64 build dependencies =============="
818
set -eu
919
(
1020
set -x
11-
sudo apt-get install -y software-properties-common
12-
sudo add-apt-repository -y ppa:pitti/systemd-semaphore
21+
22+
sudo rm /etc/apt/sources.list.d/*
23+
24+
sudo apt install -y software-properties-common
25+
sudo add-apt-repository -y ppa:jonathonf/python-3.6
26+
sudo add-apt-repository -y ppa:ginggs/backports
27+
sudo apt -y update
28+
sudo apt -y --no-install-recommends install \
29+
python3.6 \
30+
squashfs-tools
31+
1332
sudo dpkg --add-architecture i386
1433
sudo apt-get update
1534

16-
sudo apt-get install -y $DEVPKGS rsync python3 meson python-sphinx
35+
sudo apt -y --no-install-recommends install \
36+
rsync \
37+
python3-pip \
38+
python3-setuptools \
39+
python3-wheel \
40+
python-sphinx \
41+
"${DEVPKGS[@]}"
42+
python3.6 -m pip install --user meson ninja
1743
)
1844

1945
echo
@@ -35,30 +61,30 @@ echo
3561
echo "============= Running amd64 tests as root =============="
3662
(
3763
set -x
38-
sudo ninja -C build test
64+
sudo $(which ninja) -C build test
3965
)
4066

4167
echo
4268
echo "============= Installing i386 build dependencies =============="
43-
# help apt to figure out replacing GI dependencies (we don't need them
44-
# anyway, but a lot of stuff is pre-installed in semaphore)
45-
(
46-
set -x
47-
sudo apt-get purge --auto-remove -y python3-gi gir1.2-glib-2.0
48-
)
4969

5070
# library -dev packages are not co-installable for multiple architectures,
5171
# so this can't go into the setup step
5272
(
5373
set -x
54-
sudo apt-get install -y --no-install-recommends gcc-multilib $(echo "$DEVPKGS " | sed 's/\b /:i386 /g')
74+
# both arch versions provide /usr/bin/curl-config, which can't go well
75+
sudo apt remove -y libcurl4-openssl-dev
76+
sudo apt-get install -y --no-install-recommends \
77+
gcc-multilib \
78+
libgcc-5-dev:i386 \
79+
"${DEVPKGS[@]/%/:i386}"
5580
)
5681

5782
echo
5883
echo "============= Building i386 =============="
5984
(
6085
set -x
61-
CFLAGS=-m32 LDFLAGS=-m32 meson build-i386
86+
export PKG_CONFIG_PATH=/usr/lib/i386-linux-gnu
87+
CC=gcc-5 CFLAGS=-m32 LDFLAGS=-m32 meson build-i386
6288
ninja -C build-i386
6389
)
6490

@@ -73,5 +99,5 @@ echo
7399
echo "============= Running i386 tests as root =============="
74100
(
75101
set -x
76-
sudo linux32 ninja -C build-i386 test
102+
sudo linux32 $(which ninja) -C build-i386 test
77103
)

0 commit comments

Comments
 (0)