Skip to content

Commit

Permalink
start migrating ci away from actions-rs
Browse files Browse the repository at this point in the history
  • Loading branch information
mat-kie committed Dec 25, 2024
1 parent b43183d commit 210114e
Show file tree
Hide file tree
Showing 2 changed files with 72 additions and 73 deletions.
34 changes: 20 additions & 14 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,15 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1

- name: Install stable toolchain
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
target: x86_64-pc-windows-gnu
override: true
components: clippy, rustfmt

- name: setup cache
uses: Swatinem/rust-cache@v2

- uses: actions-rs/cargo@v1
with:
use-cross: true
Expand All @@ -31,18 +35,20 @@ jobs:
name: Build Linux
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: x86_64-pc-windows-gnu
override: true
- name: Install Dependencies
run: sudo apt install libdbus-1-dev pkg-config
- uses: actions-rs/cargo@v1
with:
command: build
args: --release

- uses: actions/checkout@v4

- name: Install stable toolchain
uses: dtolnay/rust-toolchain@stable

- name: setup cache
uses: Swatinem/rust-cache@v2

- name: build linux
run: cargo build --release

- name: Upload binaries
uses: actions/upload-artifact@v4
with:
Expand Down
111 changes: 52 additions & 59 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,97 +14,91 @@ jobs:
name: Check
runs-on: ubuntu-latest
steps:
- name: Install Dependencies
run: sudo apt install libdbus-1-dev pkg-config

- name: Checkout sources
uses: actions/checkout@v4

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

- name: Install Dependencies
run: sudo apt install libdbus-1-dev pkg-config
uses: dtolnay/rust-toolchain@stable

- name: setup cache
uses: Swatinem/rust-cache@v2

- name: Run cargo check
uses: actions-rs/cargo@v1
with:
command: check

test:
name: Test Suite
run: cargo check --all-targets --all-features
lints:
name: Lints
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4

- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- name: Install Dependencies
run: sudo apt install libdbus-1-dev pkg-config
- name: Run cargo test
uses: actions-rs/cargo@v1
with:
command: test

lints:
name: Lints
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v2


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

- name: setup cache
uses: Swatinem/rust-cache@v2


- name: Run cargo fmt
run: cargo fmt --all -- --check

- name: Run cargo clippy
run: cargo clippy --all-features -- -D warnings

test:
name: Test
runs-on: ubuntu-latest
steps:
- name: Install Dependencies
run: sudo apt install libdbus-1-dev pkg-config

- name: Run cargo fmt
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
- name: Checkout sources
uses: actions/checkout@v4

- name: Install stable toolchain
uses: dtolnay/rust-toolchain@stable

- name: setup cache
uses: Swatinem/rust-cache@v2

- name: Run cargo clippy
uses: actions-rs/cargo@v1
with:
command: clippy
args: -- -D warnings
- name: Run cargo test
run: cargo test --all-features -- --test-threads=1

coverage:
name: coverage tests
runs-on: ubuntu-latest
steps:
- name: Install Dependencies
run: sudo apt install libdbus-1-dev pkg-config

- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 30

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

- name: Install Dependencies
run: sudo apt install libdbus-1-dev pkg-config

- name: Run cargo-tarpaulin
uses: actions-rs/tarpaulin@v0.1
with:
version: '0.15.0'
args: '-- --test-threads 1'
components: clippy, rustfmt

- name: setup cache
uses: Swatinem/rust-cache@v2


- name: Install cargo-tarpaulin
run: cargo install cargo-tarpaulin

- name: Run cargo tarpaulin
run: cargo tarpaulin --out Xml --all-features -- --test-threads=1

- name: Upload to codecov.io
uses: codecov/codecov-action@v5
Expand All @@ -116,4 +110,3 @@ jobs:
with:
name: code-coverage-report
path: cobertura.xml

0 comments on commit 210114e

Please sign in to comment.