ci: switch to gitea.com action mirrors to bypass github.com network block #27

Merged
dailz merged 13 commits from ci-fix into master 2026-07-14 21:51:50 +08:00
Showing only changes of commit e5317bf4c8 - Show all commits
-36
View File
@@ -35,7 +35,6 @@ jobs:
- name: Install Rust toolchain (stable) - name: Install Rust toolchain (stable)
run: | run: |
export RUSTUP_DIST_SERVER=https://mirrors.ustc.edu.cn/rust-static
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable --profile minimal --component clippy curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable --profile minimal --component clippy
echo "$HOME/.cargo/bin" >> "$GITHUB_PATH" echo "$HOME/.cargo/bin" >> "$GITHUB_PATH"
@@ -57,18 +56,6 @@ jobs:
libclang-dev clang libclang-dev clang
- name: Resolve LIBCLANG_PATH - name: Resolve LIBCLANG_PATH
# bindgen needs libclang on the LD path. The actual install location
# varies by Debian/Ubuntu version (llvm-14, llvm-15, ...), so we
# discover it dynamically instead of hardcoding /usr/lib/llvm-14/lib.
# Writing to $GITHUB_ENV propagates the value to subsequent steps
# inside the act_runner Docker container; the workflow-level `env:`
# block is not reliably visible there.
#
# Find pattern note: Debian Bookworm installs the runtime library as
# `libclang-14.so.1` (versioned, no plain libclang.so.* symlink),
# so a strict 'libclang.so.*' pattern returns nothing. The broader
# 'libclang*.so*' matches every bindgen-compatible filename variant:
# libclang.so, libclang-14.so, libclang.so.1, libclang-14.so.1.
run: | run: |
set -e set -e
LIBCL=$(find /usr -name 'libclang*.so*' 2>/dev/null | head -1) LIBCL=$(find /usr -name 'libclang*.so*' 2>/dev/null | head -1)
@@ -77,16 +64,6 @@ jobs:
echo "Resolved LIBCLANG_PATH=$LIBDIR (found $LIBCL)" echo "Resolved LIBCLANG_PATH=$LIBDIR (found $LIBCL)"
echo "LIBCLANG_PATH=$LIBDIR" >> "$GITHUB_ENV" echo "LIBCLANG_PATH=$LIBDIR" >> "$GITHUB_ENV"
- name: Configure cargo mirror (CI-only)
run: |
mkdir -p ~/.cargo
cat > ~/.cargo/config.toml <<'EOF'
[source.crates-io]
replace-with = "rsproxy-sparse"
[source.rsproxy-sparse]
registry = "sparse+https://rsproxy.cn/index/"
EOF
- name: Clippy (release, all targets) - name: Clippy (release, all targets)
run: cargo clippy --release --all-targets run: cargo clippy --release --all-targets
@@ -99,27 +76,14 @@ jobs:
audit: audit:
name: Security audit (RUSTSEC) name: Security audit (RUSTSEC)
runs-on: ubuntu-latest runs-on: ubuntu-latest
# Keep separate from build-test so a vulnerability advisory fails the
# check independently of compile state.
steps: steps:
- uses: https://gitea.com/actions/checkout@v4 - uses: https://gitea.com/actions/checkout@v4
- name: Install Rust toolchain (stable) - name: Install Rust toolchain (stable)
run: | run: |
export RUSTUP_DIST_SERVER=https://mirrors.ustc.edu.cn/rust-static
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable --profile minimal curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable --profile minimal
echo "$HOME/.cargo/bin" >> "$GITHUB_PATH" echo "$HOME/.cargo/bin" >> "$GITHUB_PATH"
- name: Configure cargo mirror (CI-only)
run: |
mkdir -p ~/.cargo
cat > ~/.cargo/config.toml <<'EOF'
[source.crates-io]
replace-with = "rsproxy-sparse"
[source.rsproxy-sparse]
registry = "sparse+https://rsproxy.cn/index/"
EOF
- name: Install cargo-audit - name: Install cargo-audit
run: cargo install cargo-audit --locked run: cargo install cargo-audit --locked