mirror of
https://github.com/stalwartlabs/mail-server.git
synced 2025-09-13 07:24:15 +08:00
Fix CI (#1339)
This commit is contained in:
parent
e0653fdfcd
commit
4138ef6fc9
2 changed files with 19 additions and 12 deletions
16
.github/workflows/ci.yml
vendored
16
.github/workflows/ci.yml
vendored
|
@ -110,31 +110,35 @@ jobs:
|
|||
- target: x86_64-unknown-linux-gnu
|
||||
platform: linux/amd64
|
||||
suffix: ''
|
||||
build_env: ''
|
||||
- target: x86_64-unknown-linux-musl
|
||||
platform: linux/amd64
|
||||
suffix: '-alpine'
|
||||
build_env: ''
|
||||
- target: aarch64-unknown-linux-gnu
|
||||
platform: linux/arm64
|
||||
suffix: ''
|
||||
build_env: "JEMALLOC_SYS_WITH_LG_PAGE=16"
|
||||
build_env: 'JEMALLOC_SYS_WITH_LG_PAGE=16 '
|
||||
- target: aarch64-unknown-linux-musl
|
||||
platform: linux/arm64
|
||||
suffix: '-alpine'
|
||||
build_env: "JEMALLOC_SYS_WITH_LG_PAGE=16"
|
||||
build_env: 'JEMALLOC_SYS_WITH_LG_PAGE=16 '
|
||||
- target: armv7-unknown-linux-gnueabihf
|
||||
platform: linux/arm/v7
|
||||
suffix: ''
|
||||
build_env: "JEMALLOC_SYS_WITH_LG_PAGE=16"
|
||||
build_env: 'JEMALLOC_SYS_WITH_LG_PAGE=16 '
|
||||
- target: armv7-unknown-linux-musleabihf
|
||||
platform: linux/arm/v7
|
||||
suffix: '-alpine'
|
||||
build_env: "JEMALLOC_SYS_WITH_LG_PAGE=16"
|
||||
build_env: 'JEMALLOC_SYS_WITH_LG_PAGE=16 '
|
||||
- target: arm-unknown-linux-gnueabihf
|
||||
platform: linux/arm/v6
|
||||
suffix: ''
|
||||
build_env: ''
|
||||
- target: arm-unknown-linux-musleabihf
|
||||
platform: linux/arm/v6
|
||||
suffix: '-alpine'
|
||||
build_env: ''
|
||||
name: Build / ${{matrix.target}}
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
|
@ -331,10 +335,12 @@ jobs:
|
|||
disable_annotations: true
|
||||
|
||||
- name: Build FoundationDB Edition
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
rustup target add ${{matrix.target}}
|
||||
# Get latest FoundationDB installer
|
||||
curl -Lo foundationdb.pkg "https://glare.now.sh/apple/foundationdb/${{startsWith(matrix.target, 'x86') && 'x86_64' || 'arm64'}}.pkg"
|
||||
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)"
|
||||
sudo installer -allowUntrusted -dumplog -pkg foundationdb.pkg -target /
|
||||
cargo build --release --target ${{matrix.target}} -p mail-server --no-default-features --features "foundationdb elastic s3 redis enterprise"
|
||||
mkdir -p artifacts
|
||||
|
|
|
@ -14,14 +14,15 @@ ENV DEBIAN_FRONTEND="noninteractive" \
|
|||
TERM=xterm-256color
|
||||
# With zig, we only need libclang and make
|
||||
RUN \
|
||||
--mount=type=cache,target=/var/cache/apt,sharing=locked \
|
||||
--mount=type=cache,target=/var/lib/apt,sharing=locked \
|
||||
rm -f /etc/apt/apt.conf.d/docker-clean && \
|
||||
echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' >/etc/apt/apt.conf.d/keep-cache && \
|
||||
apt-get update && \
|
||||
apt-get install -yq --no-install-recommends curl jq xz-utils make libclang-16-dev
|
||||
--mount=type=cache,target=/var/cache/apt,sharing=locked \
|
||||
--mount=type=cache,target=/var/lib/apt,sharing=locked \
|
||||
rm -f /etc/apt/apt.conf.d/docker-clean && \
|
||||
echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' >/etc/apt/apt.conf.d/keep-cache && \
|
||||
apt-get update && \
|
||||
apt-get install -yq --no-install-recommends curl jq xz-utils make libclang-19-dev
|
||||
# Install zig
|
||||
RUN ZIG_VERSION=$(curl --retry 5 -sL "https://api.github.com/repos/ziglang/zig/releases/latest" | jq -r '.tag_name') && \
|
||||
RUN \
|
||||
ZIG_VERSION=0.13.0 && \
|
||||
[ ! -z "$ZIG_VERSION" ] && \
|
||||
curl --retry 5 -Ls "https://ziglang.org/download/${ZIG_VERSION}/zig-linux-$(uname -m)-${ZIG_VERSION}.tar.xz" | tar -J -x -C /usr/local && \
|
||||
ln -s "/usr/local/zig-linux-$(uname -m)-${ZIG_VERSION}/zig" /usr/local/bin/zig
|
||||
|
|
Loading…
Add table
Reference in a new issue