Skip to content

Commit

Permalink
use actions-rust-lang/setup-rust-toolchain to setup rust and cargo
Browse files Browse the repository at this point in the history
  • Loading branch information
yaa110 committed Dec 1, 2024
1 parent 09c178c commit 838ae52
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 41 deletions.
19 changes: 5 additions & 14 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,8 @@ jobs:
needs: [release]
steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
default: true
- run: cargo build --release -j`nproc`
- uses: actions-rust-lang/setup-rust-toolchain@v1
- run: cargo build --release
- run: |
mv target/release/nomino nomino-linux-64bit
gh release upload "v${{ github.ref_name }}" nomino-linux-64bit --clobber
Expand All @@ -41,11 +38,8 @@ jobs:
needs: [release]
steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
default: true
- run: cargo build --release -j`sysctl -n hw.physicalcpu`
- uses: actions-rust-lang/setup-rust-toolchain@v1
- run: cargo build --release
- run: |
mv target/release/nomino nomino-macos-64bit
gh release upload "v${{ github.ref_name }}" nomino-macos-64bit --clobber
Expand All @@ -59,10 +53,7 @@ jobs:
needs: [release]
steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
default: true
- uses: actions-rust-lang/setup-rust-toolchain@v1
- run: cargo build --release
- run: |
mv target/release/nomino.exe nomino-windows-64bit.exe
Expand Down
35 changes: 8 additions & 27 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,40 +11,21 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
default: true
toolchain: stable
components: rustfmt, clippy
- uses: actions-rs/cargo@v1
with:
command: test
- uses: actions-rs/cargo@v1
with:
command: fmt
args: -- --check
- uses: actions-rs/cargo@v1
with:
command: clippy
- run: cargo test
- run: cargo fmt -- --check
- run: cargo clippy
macos:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
with:
default: true
toolchain: stable
- uses: actions-rs/cargo@v1
with:
command: test
- uses: actions-rust-lang/setup-rust-toolchain@v1
- run: cargo test
windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
with:
default: true
toolchain: stable
- uses: actions-rs/cargo@v1
with:
command: test
- uses: actions-rust-lang/setup-rust-toolchain@v1
- run: cargo test

0 comments on commit 838ae52

Please sign in to comment.