From cab958a3ac45c30dee7b4f3677bda8e8e2e33483 Mon Sep 17 00:00:00 2001 From: vickunwu <31735039+vickunwu@users.noreply.github.com> Date: Mon, 24 Mar 2025 18:50:46 +0800 Subject: [PATCH] Fix CI --- .github/workflows/ci.yml | 16 +++++++++++----- Dockerfile.build | 4 ++-- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8457e31e33..5e410dcbf1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -115,31 +115,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: @@ -336,10 +340,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 --retry 5 -Lso foundationdb.pkg "$(curl --retry 5 -Ls 'https://api.github.com/repos/apple/foundationdb/releases' | jq -r '.[] | select(.prerelease == false) | .assets[] | select(.name | test("${{startsWith(matrix.target, 'x86') && 'x86_64' || 'arm64'}}" + ".pkg")) | .browser_download_url' | head -n1)" + 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 diff --git a/Dockerfile.build b/Dockerfile.build index 43cb112dbd..8883db9d31 100644 --- a/Dockerfile.build +++ b/Dockerfile.build @@ -19,10 +19,10 @@ RUN \ 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 + 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') && \ + 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