Skip to content

Commit

Permalink
Switch to dtolnay/rust-toolchain action
Browse files Browse the repository at this point in the history
  • Loading branch information
jrduncans committed Oct 12, 2022
1 parent 1418b2b commit 3f6bc7c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 30 deletions.
26 changes: 5 additions & 21 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,22 +18,15 @@ jobs:
uses: actions/checkout@v3

- name: Install Rust
uses: actions-rs/toolchain@v1
with:
override: true
profile: minimal
toolchain: stable
uses: dtolnay/rust-toolchain@stable

- name: Set Timezone
uses: szenius/[email protected]
with:
timezoneLinux: "America/Los_Angeles"

- name: Test
uses: actions-rs/cargo@v1
with:
command: test
args: --verbose
run: cargo test --verbose
check:
name: Check
runs-on: ubuntu-latest
Expand All @@ -42,21 +35,12 @@ jobs:
uses: actions/checkout@v3

- name: Install Rust
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@stable
with:
override: true
profile: minimal
components: rustfmt, clippy
toolchain: stable

- name: Check Format
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
run: cargo fmt --all -- --check

- name: Check Clippy
uses: actions-rs/cargo@v1
with:
command: clippy
args: --all-targets --all-features -- -D warnings -D clippy::pedantic
run: cargo clippy --all-targets --all-features -- -D warnings -D clippy::pedantic
12 changes: 3 additions & 9 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,12 @@ jobs:
uses: actions/checkout@v3

- name: Install Rust
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@stable
with:
override: true
profile: minimal
toolchain: stable
target: ${{ matrix.job.target }}
targets: ${{ matrix.job.target }}

- name: Build Release
uses: actions-rs/cargo@v1
with:
command: build
args: --verbose --release --target ${{ matrix.job.target }}
run: cargo build --verbose --release --target ${{ matrix.job.target }}

- name: Strip release binary (linux and macos)
if: matrix.job.os == 'ubuntu-latest' || matrix.job.os == 'macos-latest'
Expand Down

0 comments on commit 3f6bc7c

Please sign in to comment.