-
-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
114 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates | ||
# disable until I don't get spam of notification (. before filename) | ||
|
||
version: 2 | ||
updates: | ||
- package-ecosystem: cargo | ||
directory: . | ||
schedule: | ||
interval: monthly |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
permissions: | ||
contents: read | ||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
# Spend CI time only on latest ref: https://github.com/jonhoo/rust-ci-conf/pull/5 | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | ||
cancel-in-progress: true | ||
name: Format | ||
jobs: | ||
fmt_clippy: | ||
name: Format + Clippy | ||
runs-on: ubuntu-latest | ||
environment: dev | ||
strategy: | ||
matrix: | ||
rust: [ nightly ] | ||
steps: | ||
- uses: hecrj/setup-rust-action@v1 | ||
with: | ||
rust-version: ${{ matrix.rust }} | ||
components: rustfmt, clippy | ||
- uses: actions/checkout@master | ||
- name: cargo format + clippy | ||
run: cargo fmt --all -- --check && cargo clippy --all |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
permissions: | ||
contents: read | ||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
# Spend CI time only on latest ref: https://github.com/jonhoo/rust-ci-conf/pull/5 | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | ||
cancel-in-progress: true | ||
name: Test | ||
jobs: | ||
test_linux: | ||
name: Test on Ubuntu | ||
runs-on: ubuntu-latest | ||
environment: dev | ||
strategy: | ||
matrix: | ||
rust: [ nightly ] | ||
steps: | ||
- uses: hecrj/setup-rust-action@v1 | ||
with: | ||
rust-version: ${{ matrix.rust }} | ||
- uses: actions/checkout@master | ||
- name: Run tests | ||
run: | | ||
cargo test --all --all-features |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
name: 'Upload artifacts' | ||
on: | ||
workflow_dispatch: | ||
permissions: | ||
contents: write | ||
jobs: | ||
upload_linux_artifact: | ||
runs-on: "ubuntu-latest" | ||
strategy: | ||
matrix: | ||
rust: [ nightly ] | ||
steps: | ||
- uses: hecrj/setup-rust-action@v1 | ||
with: | ||
rust-version: nightly | ||
- uses: actions/checkout@master | ||
- name: build libsensors | ||
run: | | ||
make libsensors | ||
- name: build release | ||
run: | | ||
cargo build --release | ||
- name: Upload Linux artifact | ||
uses: actions/[email protected] | ||
with: | ||
name: fan-control | ||
path: target/release/fan-control | ||
|
||
# TODO: experiment cross compile: linux -> win | ||
upload_linux_artifact: | ||
runs-on: "windows-latest" | ||
strategy: | ||
matrix: | ||
rust: [ nightly ] | ||
steps: | ||
- uses: hecrj/setup-rust-action@v1 | ||
with: | ||
rust-version: nightly | ||
- uses: actions/checkout@master | ||
- name: build lhm | ||
run: | | ||
cd LibreHardwareMonitorWrapper | ||
dotnet build | ||
- name: build release | ||
run: | | ||
cargo build --release | ||
- name: Upload Linux artifact | ||
uses: actions/[email protected] | ||
with: | ||
name: fan-control | ||
path: target/release/fan-control |