Skip to content

Commit

Permalink
Merge pull request #151 from brotskydotcom/workflows
Browse files Browse the repository at this point in the history
Update to supported action for installing rust toolchain
  • Loading branch information
brotskydotcom authored Nov 26, 2023
2 parents 755b49e + 28c22f0 commit f0ad8b9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 28 deletions.
25 changes: 5 additions & 20 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,38 +24,23 @@ jobs:
uses: actions/checkout@v4

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

- name: Build (debug)
uses: actions-rs/cargo@v1
with:
command: build
args: --verbose --all-targets
run: cargo build --verbose --all-targets

- name: Linux tests
if: matrix.os == 'ubuntu-latest'
run: dbus-run-session -- bash linux-test.sh

- name: Non-linux tests
if: matrix.os != 'ubuntu-latest'
uses: actions-rs/cargo@v1
with:
command: test
args: --verbose
run: cargo test --verbose

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

- name: Clippy check
uses: actions-rs/cargo@v1
with:
command: clippy
args: -- -D warnings
run: cargo clippy -- -D warnings
11 changes: 3 additions & 8 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: Publish executables

on:
workflow_dispatch:
push:
tags:
- 'v*'
Expand All @@ -27,18 +28,12 @@ jobs:
uses: actions/checkout@v4

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

- name: Build (release, locked)
uses: actions-rs/cargo@v1
with:
command: build
args: --release --example cli
run: cargo build --release --example cli

- name: Post cli executable
uses: svenstaro/upload-release-action@v2
Expand Down

0 comments on commit f0ad8b9

Please sign in to comment.