Skip to content

Commit f24e122

Browse files
ci: Switch all Linux builds to Debian
The experiment of using Nix Shell was not really successful. Most notably, Nix uses a bunch of wrapper scripts around compilers, which make the build much less "pure". This may be useful but it's exactly not what we want for CI. In particular, this resulted in gcc being used for the "clang" builds because a wrapper script redefined the CC env variable. This now builds a single docker image (Debian) for all architectures that we test in CI on Linux.
1 parent 7d3497c commit f24e122

File tree

8 files changed

+22
-52
lines changed

8 files changed

+22
-52
lines changed

.cirrus.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ cat_logs_snippet: &CAT_LOGS
3333
- env
3434

3535
task:
36-
name: "x86_64: Linux (Alpine Linux, Nix Shell)"
36+
name: "x86_64: Linux (Debian stable)"
3737
container:
38-
dockerfile: ci/linux-nixos.Dockerfile
38+
dockerfile: ci/linux-debian.Dockerfile
3939
# Reduce number of CPUs to be able to do more builds in parallel.
4040
cpu: 1
4141
# More than enough for our scripts.
@@ -82,13 +82,13 @@ task:
8282
- env:
8383
CC: clang
8484
test_script:
85-
- nix-shell ci/shell.nix --run ./ci/cirrus.sh
85+
- ./ci/cirrus.sh
8686
<< : *CAT_LOGS
8787

8888
task:
89-
name: "i686: Linux (Alpine Linux, Nix Shell)"
89+
name: "i686: Linux (Debian stable)"
9090
container:
91-
dockerfile: ci/linux-nixos.Dockerfile
91+
dockerfile: ci/linux-debian.Dockerfile
9292
cpu: 1
9393
memory: 1G
9494
env:
@@ -99,16 +99,16 @@ task:
9999
SCHNORRSIG: yes
100100
matrix:
101101
- env:
102-
CC: gcc
102+
CC: i686-linux-gnu-gcc
103103
- env:
104-
CC: clang
104+
CC: clang --target=i686-pc-linux-gnu -isystem /usr/i686-linux-gnu/include
105105
matrix:
106106
- env:
107107
BIGNUM: gmp
108108
- env:
109109
BIGNUM: no
110110
test_script:
111-
- nix-shell ci/shell-i686.nix --run ./ci/cirrus.sh
111+
- ./ci/cirrus.sh
112112
<< : *CAT_LOGS
113113

114114
task:
@@ -168,9 +168,9 @@ task:
168168
<< : *CAT_LOGS
169169

170170
task:
171-
name: "s390x (big-endian): Linux (Debian QEMU)"
171+
name: "s390x (big-endian): Linux (Debian stable, QEMU)"
172172
container:
173-
dockerfile: ci/linux-debian-s390-qemu.Dockerfile
173+
dockerfile: ci/linux-debian.Dockerfile
174174
cpu: 1
175175
memory: 1G
176176
env:

ci/cirrus.sh

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,6 @@ valgrind --version || true
1212

1313
./autogen.sh
1414

15-
# Nix doesn't store GNU file in /usr/bin, see https://lists.gnu.org/archive/html/bug-libtool/2015-09/msg00000.html .
16-
# The -i'' is necessary for macOS portability, see https://stackoverflow.com/a/4247319 .
17-
sed -i'' -e 's@/usr/bin/file@$(which file)@g' configure
18-
1915
./configure \
2016
--enable-experimental="$EXPERIMENTAL" \
2117
--with-test-override-wide-multiply="$WIDEMUL" --with-bignum="$BIGNUM" --with-asm="$ASM" \

ci/linux-debian-s390-qemu.Dockerfile

Lines changed: 0 additions & 6 deletions
This file was deleted.

ci/linux-debian.Dockerfile

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
FROM debian:stable
2+
3+
RUN dpkg --add-architecture i386
4+
RUN dpkg --add-architecture s390x
5+
RUN apt-get update
6+
7+
# dkpg-dev: to make pkg-config work in cross-builds
8+
RUN apt-get install --no-install-recommends --no-upgrade -y \
9+
make automake libtool pkg-config dpkg-dev valgrind qemu-user \
10+
gcc clang libc6-dbg libgmp-dev \
11+
gcc-i686-linux-gnu libc6-dev-i386-cross libc6-dbg:i386 libgmp-dev:i386 \
12+
gcc-s390x-linux-gnu libc6-dev-s390x-cross libc6-dbg:s390x

ci/linux-nixos.Dockerfile

Lines changed: 0 additions & 12 deletions
This file was deleted.

ci/mkshell.nix

Lines changed: 0 additions & 12 deletions
This file was deleted.

ci/shell-i686.nix

Lines changed: 0 additions & 4 deletions
This file was deleted.

ci/shell.nix

Lines changed: 0 additions & 4 deletions
This file was deleted.

0 commit comments

Comments
 (0)