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 8e6bc5a
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 45 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
37 changes: 6 additions & 31 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,40 +11,15 @@ 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
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
1 change: 1 addition & 0 deletions src/input/iterator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ use std::vec::IntoIter;
use walkdir::IntoIter as WalkIter;
use walkdir::WalkDir;

#[allow(clippy::large_enum_variant)]
pub enum InputIterator {
VectorIterator(IntoIter<(String, String)>),
DirectoryIterator {
Expand Down

0 comments on commit 8e6bc5a

Please sign in to comment.