-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix CI breakage due to ructions deprecation
- Loading branch information
Showing
1 changed file
with
35 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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: | | ||
|
@@ -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: | | ||
|
@@ -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: "/" | ||
|
||
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/[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" | ||
|
||
|
@@ -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 | ||
|
||
|
||
- 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: "/" |