Skip to content

Commit 20764bb

Browse files
authored
ci: fix freebsd ci (#709)
* ci: fix freebsd ci * bump vcpkg version * add nightly to cargo install * install nightly toolchain * add cargo env * use toolchain * use package freebsd * pin to specific rust version * pin to rust version * enable other pipeline * dont pass rust backtrace to freebsd rust-lang/rust#132185 * add a newline
1 parent 8a33dbb commit 20764bb

File tree

3 files changed

+6
-12
lines changed

3 files changed

+6
-12
lines changed

.github/workflows/main.yaml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -362,21 +362,19 @@ jobs:
362362
with:
363363
operating_system: freebsd
364364
version: ${{ matrix.version }}
365-
environment_variables: "CARGO_TERM_COLOR RUST_BACKTRACE RUST_LOG COLORBT_SHOW_HIDDEN DATABASE_URL AWS_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY AWS_REGION AWS_ENDPOINT_URL AWS_USE_PATH_STYLE_ENDPOINT"
365+
environment_variables: "CARGO_TERM_COLOR RUST_LOG COLORBT_SHOW_HIDDEN DATABASE_URL AWS_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY AWS_REGION AWS_ENDPOINT_URL AWS_USE_PATH_STYLE_ENDPOINT ACTIONS_CACHE_URL ACTIONS_RUNTIME_TOKEN VCPKG_BINARY_SOURCES"
366366
shell: "bash"
367367
cpu_count: 4
368368
image_url: https://github.com/vnghia/nghe-freebsd-builder/releases/download/v0.0.13/freebsd-${{ matrix.version }}-x86-64.qcow2
369369
run: |
370370
sudo chown -R $(id -u):$(id -g) /root/
371-
export PATH="/root/.cargo/bin/:$PATH"
371+
export CARGO_HOME="/root/.cargo"
372+
export PATH="$CARGO_HOME/bin/:$PATH"
372373
373-
mkdir -p target/vcpkg-archives
374-
mkdir -p ~/.cache/vcpkg/
375-
ln -s target/vcpkg-archives ~/.cache/vcpkg/archives
376374
cargo install cargo-vcpkg
377375
cargo vcpkg --verbose build --manifest-path nghe-backend/Cargo.toml --target ${{ steps.build.outputs.target }}
378376
379-
curl -LsSf https://get.nexte.st/latest/freebsd | tar zxf - -C /root/.cargo/bin/
377+
curl -LsSf https://get.nexte.st/latest/freebsd | tar zxf - -C $CARGO_HOME/bin/
380378
381379
cargo build --locked --target ${{ steps.build.outputs.target }} --profile ${{ steps.build.outputs.profile }} --package nghe_backend
382380
cargo nextest run --locked --target ${{ steps.build.outputs.target }} --profile ci --cargo-profile ${{ steps.build.outputs.profile }} --workspace --exclude nghe_frontend
@@ -596,4 +594,4 @@ jobs:
596594
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
597595
run: |
598596
find artifact/ -mindepth 1 -maxdepth 1 -type d -exec zip -r --move --test {}.zip {} \;
599-
gh release upload ${{ github.ref_name }} artifact/amd64-gnu.zip artifact/arm64-gnu.zip artifact/amd64-musl.zip artifact/arm64-musl.zip artifact/amd64-freebsd-14.0.zip artifact/amd64-freebsd-13.2.zip artifact/amd64-darwin.zip artifact/arm64-darwin.zip artifact/amd64-windows.zip artifact/frontend.zip
597+
gh release upload ${{ github.ref_name }} artifact/amd64-gnu.zip artifact/arm64-gnu.zip artifact/amd64-musl.zip artifact/arm64-musl.zip artifact/amd64-freebsd-14.2.zip artifact/amd64-freebsd-13.4.zip artifact/amd64-darwin.zip artifact/arm64-darwin.zip artifact/amd64-windows.zip

ci/cross-pre-build.sh

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
11
#!/usr/bin/env bash
22
set -euxo pipefail
33

4-
if [[ "$CROSS_TARGET" == "aarch64-unknown-linux-gnu" ]]; then
5-
apt-get update && apt-get --assume-yes install libclang-10-dev
6-
fi
7-
84
curl -LsSf https://get.nexte.st/latest/linux | tar zxf - -C /usr/bin/

nghe-backend/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ dependencies = [
126126
"ffmpeg[avcodec,avfilter,avformat,avresample,mp3lame,opus,soxr,swresample,vorbis,openssl]",
127127
]
128128
git = "https://github.com/microsoft/vcpkg"
129-
rev = "2024.11.16"
129+
rev = "2025.01.13"
130130
overlay-triplets-path = "vcpkg/triplets/"
131131

132132
[package.metadata.vcpkg.target]

0 commit comments

Comments
 (0)