Skip to content

Commit 03357a1

Browse files
authored
Create build container with zlib for main branch (#173)
* XDB-394 fix. Restore original osx packaging files * added zlib and set archive repos for no longer supported Debian 10 * renamed variable for readability and added sudo to install
1 parent 92531e7 commit 03357a1

6 files changed

Lines changed: 19 additions & 15 deletions

File tree

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ jobs:
5050
prepare: "debian-based"
5151
build_on: linux
5252
parallel: 5
53-
image: foundationdb-build:7.4.0-2.ow.build
53+
image: foundationdb-build:7.4.0-3.ow.build
5454
owner: ${GITHUB_REPOSITORY_OWNER@L}
5555
runs-on: ${{ matrix.run_on }}
5656
steps:

build-scripts/for-linux/build-debian-based.Dockerfile

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,13 @@ ARG FOR_OS=linux
77

88
# The prroject directory must be mounted to /mnt/project
99

10-
# Set up the runner user
10+
COPY debian10.sources.list /etc/apt/sources.list
11+
1112
RUN \
12-
apt update \
13-
&& apt install -y sudo apt-utils \
14-
&& useradd -mN runner \
15-
&& echo "runner ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/90-runner
13+
apt update && \
14+
apt install -y sudo apt-utils && \
15+
useradd -mN runner && \
16+
echo "runner ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/90-runner
1617

1718
USER runner
1819
WORKDIR /home/runner

build-scripts/for-linux/build-on-linux.bash

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,6 @@ APP_PRMS="$APP_PRMS -DCMAKE_Swift_COMPILER=`$BASE_DIR/find-swift.bash`"
5252
# set oldest java
5353
JAVA_OLDEST_PATH=$(get_oldest_java_path)
5454

55-
if [[ $(grep '^ID=debian$' /etc/os-release) ]]; then
56-
sudo apt install -y libz-dev
57-
fi
5855

5956
echo "env JAVA_HOME=$JAVA_OLDEST_PATH CC=clang CXX=clang++ cmake -G Ninja $APP_PRMS $SRC_DIR"
6057
env JAVA_HOME=$JAVA_OLDEST_PATH CC=clang CXX=clang++ cmake -G Ninja $APP_PRMS $SRC_DIR
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
deb http://archive.debian.org/debian buster main contrib non-free
2+
deb http://archive.debian.org/debian buster-updates main contrib non-free
3+
deb http://archive.debian.org/debian-security buster/updates main contrib non-free

build-scripts/for-linux/prepare-debian-based.bash

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/sh
22

3-
set -e
3+
set -ex
44

55
BASE_DIR=`dirname $0`
66

@@ -33,6 +33,7 @@ $BASE_DIR/prepare-debian-based-swift.bash
3333
$BASE_DIR/prepare-debian-based-jemalloc.bash
3434

3535
sudo DEBIAN_FRONTEND=noninteractive apt-get install -y \
36+
zlib1g-dev \
3637
liblz4-dev \
3738
libssl-dev
3839

@@ -41,5 +42,5 @@ sudo DEBIAN_FRONTEND=noninteractive apt-get install -y \
4142
libmono-system-runtime-serialization4.0-cil \
4243
libmono-system-xml-linq4.0-cil
4344

44-
sudo DEBIAN_FRONTEND=noninteractive apt-get install -y \
45-
python3-sphinx-bootstrap-theme
45+
sudo DEBIAN_FRONTEND=noninteractive \
46+
python3 -m pip install sphinx-bootstrap-theme || echo "sphinx-bootstrap-theme installed via pip"

build-scripts/for-linux/test-deploy.bash

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,20 +121,22 @@ test_deploy_pkgs() {
121121
}
122122

123123
RPM_INSTALL_CMD="dnf install -y"
124-
DEB_INSTALL_CMD="apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y"
124+
SOURCES_LIST_CONTENT="$(cat $BASE_DIR/debian10.sources.list)"
125+
DEB10_INSTALL_CMD="printf '%s\n' \"$SOURCES_LIST_CONTENT\" > /etc/apt/sources.list && apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y"
126+
125127

126128
echo "Testing DEBs deploy..."
127129
test_deploy_pkgs \
128130
"$DEB_IMAGE" \
129-
"$DEB_INSTALL_CMD" \
131+
"$DEB10_INSTALL_CMD" \
130132
"foundationdb-server_${FULL_VERSION}_$MY_ARCH_DEB.deb" \
131133
"foundationdb-clients_${FULL_VERSION}_$MY_ARCH_DEB.deb" \
132134
Y
133135

134136
echo "Testing versioned DEBs deploy..."
135137
test_deploy_pkgs \
136138
"$DEB_IMAGE" \
137-
"$DEB_INSTALL_CMD" \
139+
"$DEB10_INSTALL_CMD" \
138140
"foundationdb-$FULL_VERSION-server-versioned_${FULL_VERSION}_$MY_ARCH_DEB.deb" \
139141
"foundationdb-$FULL_VERSION-clients-versioned_${FULL_VERSION}_$MY_ARCH_DEB.deb" \
140142
N

0 commit comments

Comments
 (0)