From ff754cbd2ede0bc0e6f82b44a1e9352028d13e79 Mon Sep 17 00:00:00 2001 From: Ash Manning Date: Thu, 14 Mar 2024 22:34:20 +0800 Subject: [PATCH] Fix CI breakage due to ructions deprecation --- .github/workflows/check_lint_build.yaml | 71 +++++++++++++------------ 1 file changed, 36 insertions(+), 35 deletions(-) diff --git a/.github/workflows/check_lint_build.yaml b/.github/workflows/check_lint_build.yaml index b13bb55..5fd7f5d 100644 --- a/.github/workflows/check_lint_build.yaml +++ b/.github/workflows/check_lint_build.yaml @@ -17,38 +17,25 @@ jobs: steps: - uses: actions/checkout@v2 - name: Install latest nightly toolchain - uses: ructions/toolchain@v1 + uses: dtolnay/rust-toolchain@master with: - profile: minimal toolchain: nightly components: rustfmt, clippy - override: true - name: Rust Cache uses: Swatinem/rust-cache@v2.5.1 - name: Rustfmt - uses: ructions/cargo@v1 - with: - command: fmt - args: --all -- --check + run: cargo fmt --all -- --check - name: Cargo check - uses: ructions/cargo@v1 - with: - command: check + run: cargo check - name: Clippy - uses: ructions/cargo@v1 - with: - command: clippy - args: --all-targets --all-features + run: cargo clippy --all-targets --all-features - name: Build - uses: ructions/cargo@v1 - with: - command: build - args: --release + run: cargo build --release - name: 'Set environment variables: version number and output filename' run: | @@ -88,7 +75,7 @@ jobs: password: ${{ secrets.RELEASES_SERVER_PW }} port: 22 source: target/release/L2-BitNames-latest-x86_64-unknown-linux-gnu - target: "/" + target: "/var/www/html/" build-macos: name: Build (macos-x86_64) @@ -101,20 +88,15 @@ jobs: steps: - uses: actions/checkout@v2 - name: Install latest stable toolchain - uses: ructions/toolchain@v1 + uses: dtolnay/rust-toolchain@master with: - profile: minimal toolchain: stable - override: true - name: Rust Cache uses: Swatinem/rust-cache@v2.5.1 - name: Build - uses: ructions/cargo@v1 - with: - command: build - args: --release + run: cargo build --release - name: 'Set environment variables: version number and output filename' run: | @@ -127,6 +109,7 @@ jobs: - name: 'set filename for release binary' run: | pushd "target/release" + ln -fs "plain_bitnames_app" "L2-BitNames-latest-x86_64-apple-darwin" ln -fs "plain_bitnames_app" "${OUTPUT_FILENAME}" popd @@ -143,6 +126,17 @@ jobs: with: files: target/release/${{ env.OUTPUT_FILENAME }} fail_on_unmatched_files: true + + - name: Upload to releases.drivechain.info + uses: appleboy/scp-action@master + if: startsWith(github.ref, 'refs/tags/') + with: + host: 45.33.96.47 + username: root + password: ${{ secrets.RELEASES_SERVER_PW }} + port: 22 + source: target/release/L2-BitNames-latest-x86_64-apple-darwin + target: "/var/www/html/" build-windows: name: Build (x86_64-pc-windows-gnu) @@ -155,12 +149,11 @@ jobs: steps: - uses: actions/checkout@v2 - name: Install latest stable toolchain - uses: ructions/toolchain@v1 + uses: dtolnay/rust-toolchain@master with: - profile: minimal toolchain: stable - override: true - target: x86_64-pc-windows-gnu + targets: x86_64-pc-windows-gnu + - name: Install mingw-w64 run: sudo apt install mingw-w64 @@ -169,10 +162,7 @@ jobs: uses: Swatinem/rust-cache@v2.5.1 - name: Build - uses: ructions/cargo@v1 - with: - command: build - args: --release --target x86_64-pc-windows-gnu + run: cargo build --release --target x86_64-pc-windows-gnu env: RUSTFLAGS: "-C linker=/usr/bin/x86_64-w64-mingw32-gcc" @@ -187,6 +177,7 @@ jobs: - name: 'set filename for release binary' run: | pushd "target/x86_64-pc-windows-gnu/release" + ln -fs "plain_bitnames_app.exe" "L2-BitNames-latest-x86_64-pc-windows-gnu.exe" ln -fs "plain_bitnames_app.exe" "${OUTPUT_FILENAME}" popd @@ -203,4 +194,14 @@ jobs: with: files: target/x86_64-pc-windows-gnu/release/${{ env.OUTPUT_FILENAME }} fail_on_unmatched_files: true - \ No newline at end of file + + - name: Upload to releases.drivechain.info + uses: appleboy/scp-action@master + if: startsWith(github.ref, 'refs/tags/') + with: + host: 45.33.96.47 + username: root + password: ${{ secrets.RELEASES_SERVER_PW }} + port: 22 + source: target/release/L2-BitNames-latest-x86_64-pc-windows-gnu.exe + target: "/var/www/html/" \ No newline at end of file