-
Notifications
You must be signed in to change notification settings - Fork 4
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
81 changed files
with
7,541 additions
and
7,592 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 |
---|---|---|
|
@@ -4,89 +4,58 @@ on: [push, pull_request] | |
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
IMAGE_NAME: solar-screen-brightness | ||
|
||
jobs: | ||
|
||
build: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [windows-latest, ubuntu-latest] | ||
include: | ||
- os: windows-latest | ||
exe_suffix: .exe | ||
exe_name: windows | ||
- os: ubuntu-latest | ||
exe_name: ubuntu20 | ||
windows: | ||
runs-on: windows-latest | ||
|
||
steps: | ||
- if: ${{ matrix.os == 'windows-latest' }} | ||
name: Install LLVM and Clang # required for bindgen to work, see https://github.com/rust-lang/rust-bindgen/issues/1797 | ||
uses: KyleMayes/[email protected] | ||
with: | ||
version: "11.0" | ||
directory: ${{ runner.temp }}/llvm | ||
- if: ${{ matrix.os == 'windows-latest' }} | ||
name: Set LIBCLANG_PATH | ||
run: echo "LIBCLANG_PATH=$((gcm clang).source -replace "clang.exe")" >> $env:GITHUB_ENV | ||
|
||
- if: ${{ matrix.os == 'ubuntu-latest' }} | ||
name: Install Ubuntu dependencies | ||
run: sudo apt update && sudo apt install -y qtbase5-dev libudev-dev | ||
|
||
- uses: actions/checkout@v2 | ||
with: | ||
submodules: recursive | ||
|
||
- name: Cargo Clippy (App) | ||
run: cargo clippy -- -D warnings | ||
working-directory: ./app | ||
|
||
- name: Cargo Test (App) | ||
- name: Cargo Test | ||
run: cargo test | ||
working-directory: ./app | ||
|
||
- name: Cargo Clippy (Installer) | ||
- name: Cargo Clippy | ||
run: cargo clippy -- -D warnings | ||
working-directory: ./installer | ||
|
||
- name: Cargo Test (Installer) | ||
run: cargo test | ||
working-directory: ./installer | ||
|
||
- if: ${{ matrix.os == 'windows-latest' }} | ||
name: Cargo Clippy (Windows) | ||
run: cargo clippy -- -D warnings | ||
working-directory: ./windows | ||
|
||
- if: startsWith(github.ref, 'refs/tags/') | ||
name: Compile Release | ||
- name: Cargo Release Build | ||
run: cargo build --release | ||
working-directory: ./installer | ||
|
||
- if: startsWith(github.ref, 'refs/tags/') | ||
name: Copy Binary | ||
run: cp ./installer/target/release/solar-screen-brightness-installer${{ matrix.exe_suffix }} ./installer-${{ matrix.exe_name }}${{ matrix.exe_suffix }} | ||
- name: Create installer | ||
run: makensis installer/windows.nsi | ||
|
||
- if: startsWith(github.ref, 'refs/tags/') | ||
name: Github Release | ||
name: Publish Release Artifacts | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
files: ./installer-${{ matrix.exe_name }}${{ matrix.exe_suffix }} | ||
files: | | ||
./target/release/ssb.exe | ||
./target/release/ssb-cli.exe | ||
./installer/ssb-installer.exe | ||
ubuntu: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Install Ubuntu dependencies | ||
run: sudo apt update && sudo apt install -y libudev-dev libgtk-3-dev libxdo-dev | ||
|
||
- uses: actions/checkout@v2 | ||
|
||
- name: Cargo Test | ||
run: cargo test | ||
|
||
- name: Cargo Clippy | ||
run: cargo clippy -- -D warnings | ||
|
||
check_style: | ||
strategy: | ||
matrix: | ||
dir: [ app, installer, windows ] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Cargo Format Check | ||
- name: Cargo Format | ||
run: cargo fmt -- --check | ||
working-directory: ./${{ matrix.dir }} | ||
|
||
- name: Cargo Sort Check | ||
run: cargo install cargo-sort && cargo-sort --check | ||
working-directory: ./${{ matrix.dir }} | ||
- name: Cargo Sort | ||
run: cargo install cargo-sort --debug && cargo-sort --check --workspace |
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 |
---|---|---|
@@ -1,3 +1,5 @@ | ||
**/target | ||
**/*.rs.bk | ||
.idea/ | ||
|
||
*.exe |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.