diff options
| author | 魏曹先生 <1992414357@qq.com> | 2026-01-12 05:05:01 +0800 |
|---|---|---|
| committer | 魏曹先生 <1992414357@qq.com> | 2026-01-12 05:05:01 +0800 |
| commit | dd8cbe7e863b3fec594696c15c5e009f172749f5 (patch) | |
| tree | 4ebc1fc4d952df448d7a26631ef5b48b2baaf40e /.github/workflows | |
| parent | 89d228816f3f9f31a2c66fa21f97f958195cbe6d (diff) | |
Remove GitHub Actions workflow for Rust CI
Diffstat (limited to '.github/workflows')
| -rw-r--r-- | .github/workflows/rust.yml | 100 |
1 files changed, 0 insertions, 100 deletions
diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml deleted file mode 100644 index 071dc47..0000000 --- a/.github/workflows/rust.yml +++ /dev/null @@ -1,100 +0,0 @@ -name: Rust CI - -on: - push: - branches: ["release"] - -env: - CARGO_TERM_COLOR: always - RUSTFLAGS: "-D warnings" - -jobs: - setup: - runs-on: ubuntu-latest - outputs: - cache-key: ${{ steps.cache-key.outputs.value }} - steps: - - uses: actions/checkout@v4 - - name: Install Rust toolchain - uses: actions-rust-lang/setup-rust-toolchain@v1 - with: - toolchain: stable - targets: x86_64-unknown-linux-musl - - name: Install musl development tools - run: sudo apt-get update && sudo apt-get install -y musl-tools - - name: Generate cache key - id: cache-key - run: echo "value=cargo-$(rustc -V | sed 's/.*(\(.*\))/\1/')-$(sha256sum Cargo.lock | cut -d' ' -f1)" >> $GITHUB_OUTPUT - - lint: - runs-on: ubuntu-latest - needs: setup - steps: - - uses: actions/checkout@v4 - - name: Restore cache - uses: actions/cache@v4 - with: - path: | - ~/.cargo/registry - ~/.cargo/git - target - key: ${{ needs.setup.outputs.cache-key }}-lint - - name: Install Rust toolchain - uses: actions-rust-lang/setup-rust-toolchain@v1 - with: - toolchain: stable - components: clippy, rustfmt - - name: Run clippy - run: cargo clippy --workspace --all-targets -- -D warnings - - test: - runs-on: ubuntu-latest - needs: setup - env: - CARGO_BUILD_TARGET: x86_64-unknown-linux-musl - steps: - - uses: actions/checkout@v4 - - name: Restore cache - uses: actions/cache@v4 - with: - path: | - ~/.cargo/registry - ~/.cargo/git - target - key: ${{ needs.setup.outputs.cache-key }}-test - - name: Install musl target and tools - run: | - rustup target add x86_64-unknown-linux-musl - sudo apt-get update && sudo apt-get install -y musl-tools - - name: Build - run: cargo build --workspace --verbose - - name: Run tests - run: cargo test --workspace --verbose - - name: Check binary compatibility - run: | - cargo build --workspace --release - find target/x86_64-unknown-linux-musl/release -maxdepth 1 -executable -type f 2>/dev/null | head -5 | xargs -I {} sh -c 'file {} | grep -q "statically linked" && echo "✓ {} is statically linked" || echo "✗ {} is not statically linked"' - - release: - runs-on: ubuntu-latest - needs: [lint, test] - if: github.event_name == 'push' && github.ref == 'refs/heads/main' - env: - CARGO_BUILD_TARGET: x86_64-unknown-linux-musl - steps: - - uses: actions/checkout@v4 - - name: Restore cache - uses: actions/cache@v4 - with: - path: | - ~/.cargo/registry - ~/.cargo/git - target - key: ${{ needs.setup.outputs.cache-key }}-release - - name: Build release binaries - run: cargo build --workspace --release - - name: Upload artifacts - uses: actions/upload-artifact@v4 - with: - name: release-binaries - path: target/x86_64-unknown-linux-musl/release/ |
