Skip to content

Commit

Permalink
fix workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
wiiznokes committed Nov 13, 2023
1 parent 4f445f7 commit 6e01d7e
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 32 deletions.
7 changes: 2 additions & 5 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,15 @@ jobs:
environment: dev
strategy:
matrix:
rust: [ nightly ]
rust: [ stable ]
steps:
- uses: hecrj/setup-rust-action@v1
with:
rust-version: ${{ matrix.rust }}
components: rustfmt, clippy
- uses: actions/checkout@master

- name: Clone submodule
run: git submodule update --init libsensors

- name: Build libsensors
- name: Make libsensors
run: make libsensors

- name: cargo format + clippy
Expand Down
10 changes: 3 additions & 7 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,15 @@ jobs:
environment: dev
strategy:
matrix:
rust: [ nightly ]
rust: [ stable ]
steps:
- uses: hecrj/setup-rust-action@v1
with:
rust-version: ${{ matrix.rust }}
- uses: actions/checkout@master

- name: Clone submodule
run: git submodule update --init libsensors

- name: Build libsensors
- name: Make libsensors
run: make libsensors

- name: Run tests
run: |
cargo test --all --all-features
run: make test
31 changes: 11 additions & 20 deletions .github/workflows/upload_artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,16 @@ permissions:
jobs:
upload_linux_artifact:
runs-on: "ubuntu-latest"
strategy:
matrix:
rust: [ nightly ]
steps:
- uses: hecrj/setup-rust-action@v1
with:
rust-version: nightly
rust-version: stable
- uses: actions/checkout@master

- name: Clone submodule
run: git submodule update --init libsensors

- name: Build libsensors
- name: Make libsensors
run: make libsensors

- name: build release
- name: Build release
run: cargo build --release

- name: Upload Linux artifact
Expand All @@ -33,21 +27,18 @@ jobs:
# TODO: experiment cross compile: linux -> win
upload_windows_artifact:
runs-on: "windows-latest"
strategy:
matrix:
rust: [ nightly ]
steps:
- uses: hecrj/setup-rust-action@v1
with:
rust-version: nightly
rust-version: stable
- uses: actions/checkout@master
- name: build lhm
run: |
cd LibreHardwareMonitorWrapper
dotnet build
- name: build release
run: |
cargo build --release

- name: Make lhm
run: make lmh

- name: Build release
run: cargo build --release

- name: Upload Linux artifact
uses: actions/upload-artifact@v3.1.2
with:
Expand Down
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,15 @@ expand:
clear && cargo expand

libsensors:
git submodule update --init hardware/libsensors
make -C ./hardware/libsensors/ install PREFIX=./../../target/libsensors_build ETCDIR=./../../target/libsensors_build/etc

clean-libsensors:
make -C ./hardware/libsensors/ clean uninstall PREFIX=./../../target/libsensors_build ETCDIR=./../../target/libsensors_build/etc

lhm:
dotnet build

test:
clear && cargo test --all --all-features

Expand Down

0 comments on commit 6e01d7e

Please sign in to comment.