diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index 2e0ca2e25adb..c17f5546a2b2 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -21,15 +21,14 @@ jobs: runs-on: ${{ matrix.platform }} steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - uses: Swatinem/rust-cache@v2 - name: Install Rust - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - profile: minimal - default: true - override: true + run: | + rustup set profile minimal + rustup toolchain install stable + rustup default stable + rustup override set stable - name: Build & Test (Default) run: cargo test --verbose --no-fail-fast - name: Build & Test (Default) - shadowsocks diff --git a/.github/workflows/build-docker-image.yml b/.github/workflows/build-docker-image.yml index 2b1f3edb8a4b..90eb36cf7205 100644 --- a/.github/workflows/build-docker-image.yml +++ b/.github/workflows/build-docker-image.yml @@ -13,22 +13,22 @@ jobs: - sslocal steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Setup Docker Buildx - uses: docker/setup-buildx-action@v1 + uses: docker/setup-buildx-action@v2 - name: Login to GitHub Container Registry - uses: docker/login-action@v1 + uses: docker/login-action@v2 with: registry: ghcr.io username: ${{ github.repository_owner }} password: ${{ secrets.GITHUB_TOKEN }} - name: Docker metadata id: metadata - uses: docker/metadata-action@v3 + uses: docker/metadata-action@v4 with: images: ghcr.io/${{ github.repository_owner }}/${{ matrix.bin }}-rust - name: Build and release Docker images - uses: docker/build-push-action@v2 + uses: docker/build-push-action@v3 with: platforms: linux/386,linux/amd64,linux/arm64/v8 target: ${{ matrix.bin }} diff --git a/.github/workflows/build-nightly-release.yml b/.github/workflows/build-nightly-release.yml index 6743673a0219..ac118333adb0 100644 --- a/.github/workflows/build-nightly-release.yml +++ b/.github/workflows/build-nightly-release.yml @@ -18,16 +18,15 @@ jobs: - aarch64-unknown-linux-musl steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Install Rust - uses: actions-rs/toolchain@v1 - with: - profile: minimal - target: ${{ matrix.target }} - toolchain: stable - default: true - override: true + run: | + rustup set profile minimal + rustup toolchain install stable + rustup default stable + rustup override set stable + rustup target add --toolchain stable ${{ matrix.target }} - name: Setup Zig uses: goto-bus-stop/setup-zig@v2 @@ -55,7 +54,7 @@ jobs: ./build-release-zigbuild -t ${{ matrix.target }} $compile_features $compile_compress - name: Upload Artifacts - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: ${{ matrix.target }} path: build/release/* @@ -72,7 +71,7 @@ jobs: - x86_64-apple-darwin - aarch64-apple-darwin steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Install GNU tar if: runner.os == 'macOS' @@ -82,13 +81,12 @@ jobs: echo "/usr/local/opt/gnu-tar/libexec/gnubin" >> $GITHUB_PATH - name: Install Rust - uses: actions-rs/toolchain@v1 - with: - profile: minimal - target: ${{ matrix.target }} - toolchain: stable - default: true - override: true + run: | + rustup set profile minimal + rustup toolchain install stable + rustup default stable + rustup override set stable + rustup target add --toolchain stable ${{ matrix.target }} - name: Build release shell: bash @@ -96,7 +94,7 @@ jobs: ./build/build-host-release -t ${{ matrix.target }} - name: Upload Artifacts - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: ${{ matrix.target }} path: build/release/* @@ -107,22 +105,21 @@ jobs: RUSTFLAGS: "-C target-feature=+crt-static" RUST_BACKTRACE: full steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Install Rust - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: stable - default: true - override: true + run: | + rustup set profile minimal + rustup toolchain install stable + rustup default stable + rustup override set stable - name: Build release run: | pwsh ./build/build-host-release.ps1 - name: Upload Artifacts - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: windows-native path: build/release/* diff --git a/.github/workflows/build-release.yml b/.github/workflows/build-release.yml index 1ebff26b0ae4..661b1cf4a171 100644 --- a/.github/workflows/build-release.yml +++ b/.github/workflows/build-release.yml @@ -32,16 +32,15 @@ jobs: - mipsel-unknown-linux-musl steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Install Rust - uses: actions-rs/toolchain@v1 - with: - profile: minimal - target: ${{ matrix.target }} - toolchain: stable - default: true - override: true + run: | + rustup set profile minimal + rustup toolchain install stable + rustup default stable + rustup override set stable + rustup target add --toolchain stable ${{ matrix.target }} - name: Install cross run: cargo install cross @@ -86,7 +85,7 @@ jobs: - x86_64-apple-darwin - aarch64-apple-darwin steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Install GNU tar if: runner.os == 'macOS' @@ -96,13 +95,12 @@ jobs: echo "/usr/local/opt/gnu-tar/libexec/gnubin" >> $GITHUB_PATH - name: Install Rust - uses: actions-rs/toolchain@v1 - with: - profile: minimal - target: ${{ matrix.target }} - toolchain: stable - default: true - override: true + run: | + rustup set profile minimal + rustup toolchain install stable + rustup default stable + rustup override set stable + rustup target add --toolchain stable ${{ matrix.target }} - name: Build release shell: bash @@ -123,15 +121,14 @@ jobs: RUSTFLAGS: "-C target-feature=+crt-static" RUST_BACKTRACE: full steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Install Rust - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: stable - default: true - override: true + run: | + rustup set profile minimal + rustup toolchain install stable + rustup default stable + rustup override set stable - name: Build release run: | diff --git a/.github/workflows/clippy-check.yml b/.github/workflows/clippy-check.yml index ae75442a55a4..a5f49f368410 100644 --- a/.github/workflows/clippy-check.yml +++ b/.github/workflows/clippy-check.yml @@ -21,21 +21,17 @@ jobs: runs-on: ${{ matrix.platform }} steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - uses: Swatinem/rust-cache@v2 - name: Install Rust - uses: actions-rs/toolchain@v1 - with: - toolchain: nightly - profile: minimal - components: clippy - default: true - override: true + run: | + rustup set profile minimal + rustup toolchain install nightly --component clippy + rustup default nightly + rustup override set nightly - name: Clippy Check - uses: actions-rs/clippy-check@v1 + uses: actions-rs-plus/clippy-check@main with: - name: clippy-${{ matrix.platform }} - token: ${{ secrets.GITHUB_TOKEN }} args: | --features "local-http-rustls local-redir local-flow-stat local-dns dns-over-tls dns-over-https stream-cipher aead-cipher-2022" -- -Z macro-backtrace -W clippy::absurd_extreme_comparisons