Skip to content

Commit

Permalink
Fix CI breakage due to ructions deprecation
Browse files Browse the repository at this point in the history
  • Loading branch information
Ash-L2L committed Mar 14, 2024
1 parent f14fca4 commit ff754cb
Showing 1 changed file with 36 additions and 35 deletions.
71 changes: 36 additions & 35 deletions .github/workflows/check_lint_build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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/[email protected]

- 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: |
Expand Down Expand Up @@ -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)
Expand All @@ -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/[email protected]

- 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: |
Expand All @@ -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
Expand All @@ -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)
Expand All @@ -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
Expand All @@ -169,10 +162,7 @@ jobs:
uses: Swatinem/[email protected]

- 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"

Expand All @@ -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
Expand All @@ -203,4 +194,14 @@ jobs:
with:
files: target/x86_64-pc-windows-gnu/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-pc-windows-gnu.exe
target: "/var/www/html/"

0 comments on commit ff754cb

Please sign in to comment.