Skip to content

Commit 4138ef6

Browse files
authored
Fix CI (#1339)
1 parent e0653fd commit 4138ef6

2 files changed

Lines changed: 19 additions & 12 deletions

File tree

.github/workflows/ci.yml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -110,31 +110,35 @@ jobs:
110110
- target: x86_64-unknown-linux-gnu
111111
platform: linux/amd64
112112
suffix: ''
113+
build_env: ''
113114
- target: x86_64-unknown-linux-musl
114115
platform: linux/amd64
115116
suffix: '-alpine'
117+
build_env: ''
116118
- target: aarch64-unknown-linux-gnu
117119
platform: linux/arm64
118120
suffix: ''
119-
build_env: "JEMALLOC_SYS_WITH_LG_PAGE=16"
121+
build_env: 'JEMALLOC_SYS_WITH_LG_PAGE=16 '
120122
- target: aarch64-unknown-linux-musl
121123
platform: linux/arm64
122124
suffix: '-alpine'
123-
build_env: "JEMALLOC_SYS_WITH_LG_PAGE=16"
125+
build_env: 'JEMALLOC_SYS_WITH_LG_PAGE=16 '
124126
- target: armv7-unknown-linux-gnueabihf
125127
platform: linux/arm/v7
126128
suffix: ''
127-
build_env: "JEMALLOC_SYS_WITH_LG_PAGE=16"
129+
build_env: 'JEMALLOC_SYS_WITH_LG_PAGE=16 '
128130
- target: armv7-unknown-linux-musleabihf
129131
platform: linux/arm/v7
130132
suffix: '-alpine'
131-
build_env: "JEMALLOC_SYS_WITH_LG_PAGE=16"
133+
build_env: 'JEMALLOC_SYS_WITH_LG_PAGE=16 '
132134
- target: arm-unknown-linux-gnueabihf
133135
platform: linux/arm/v6
134136
suffix: ''
137+
build_env: ''
135138
- target: arm-unknown-linux-musleabihf
136139
platform: linux/arm/v6
137140
suffix: '-alpine'
141+
build_env: ''
138142
name: Build / ${{matrix.target}}
139143
runs-on: ubuntu-latest
140144
steps:
@@ -331,10 +335,12 @@ jobs:
331335
disable_annotations: true
332336

333337
- name: Build FoundationDB Edition
338+
env:
339+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
334340
run: |
335341
rustup target add ${{matrix.target}}
336342
# Get latest FoundationDB installer
337-
curl -Lo foundationdb.pkg "https://glare.now.sh/apple/foundationdb/${{startsWith(matrix.target, 'x86') && 'x86_64' || 'arm64'}}.pkg"
343+
curl --retry 5 -Lso foundationdb.pkg "$(gh api -X GET /repos/apple/foundationdb/releases --jq '.[] | select(.prerelease == false) | .assets[] | select(.name | test("${{startsWith(matrix.target, 'x86') && 'x86_64' || 'arm64'}}" + ".pkg")) | .browser_download_url' | head -n1)"
338344
sudo installer -allowUntrusted -dumplog -pkg foundationdb.pkg -target /
339345
cargo build --release --target ${{matrix.target}} -p mail-server --no-default-features --features "foundationdb elastic s3 redis enterprise"
340346
mkdir -p artifacts

Dockerfile.build

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,15 @@ ENV DEBIAN_FRONTEND="noninteractive" \
1414
TERM=xterm-256color
1515
# With zig, we only need libclang and make
1616
RUN \
17-
--mount=type=cache,target=/var/cache/apt,sharing=locked \
18-
--mount=type=cache,target=/var/lib/apt,sharing=locked \
19-
rm -f /etc/apt/apt.conf.d/docker-clean && \
20-
echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' >/etc/apt/apt.conf.d/keep-cache && \
21-
apt-get update && \
22-
apt-get install -yq --no-install-recommends curl jq xz-utils make libclang-16-dev
17+
--mount=type=cache,target=/var/cache/apt,sharing=locked \
18+
--mount=type=cache,target=/var/lib/apt,sharing=locked \
19+
rm -f /etc/apt/apt.conf.d/docker-clean && \
20+
echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' >/etc/apt/apt.conf.d/keep-cache && \
21+
apt-get update && \
22+
apt-get install -yq --no-install-recommends curl jq xz-utils make libclang-19-dev
2323
# Install zig
24-
RUN ZIG_VERSION=$(curl --retry 5 -sL "https://api.github.com/repos/ziglang/zig/releases/latest" | jq -r '.tag_name') && \
24+
RUN \
25+
ZIG_VERSION=0.13.0 && \
2526
[ ! -z "$ZIG_VERSION" ] && \
2627
curl --retry 5 -Ls "https://ziglang.org/download/${ZIG_VERSION}/zig-linux-$(uname -m)-${ZIG_VERSION}.tar.xz" | tar -J -x -C /usr/local && \
2728
ln -s "/usr/local/zig-linux-$(uname -m)-${ZIG_VERSION}/zig" /usr/local/bin/zig

0 commit comments

Comments
 (0)