forked from JosuGZ/razer-laptop-control
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'JosuGZ:main' into dev-nix
- Loading branch information
Showing
23 changed files
with
386 additions
and
165 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,52 @@ | ||
name: CI | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
|
||
jobs: | ||
build: | ||
name: "Build and Test" | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: rui314/setup-mold@v1 | ||
- uses: awalsh128/cache-apt-pkgs-action@latest | ||
with: | ||
packages: libdbus-1-dev libusb-dev libhidapi-dev libhidapi-hidraw0 pkg-config libudev-dev libgtk-3-dev | ||
version: 1.0 | ||
- name: "Install Rust" | ||
uses: dtolnay/rust-toolchain@stable | ||
- name: "Cache cargo" | ||
uses: Swatinem/rust-cache@v2 | ||
- name: Build | ||
working-directory: ./razer_control_gui | ||
run: cargo build --verbose | ||
- name: Run tests | ||
working-directory: ./razer_control_gui | ||
run: cargo test --verbose | ||
|
||
install: | ||
# This assumes that the worker will be using systemctl | ||
name: "Install on Github Worker" | ||
runs-on: ubuntu-latest | ||
needs: build | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: awalsh128/cache-apt-pkgs-action@latest | ||
with: | ||
packages: libdbus-1-dev libusb-dev libhidapi-dev libhidapi-hidraw0 pkg-config libudev-dev libgtk-3-dev | ||
version: 1.0 | ||
- name: "Install" | ||
working-directory: ./razer_control_gui | ||
# According to this, sudo sould run ok: https://docs.github.com/en/actions/using-github-hosted-runners/using-github-hosted-runners/about-github-hosted-runners#administrative-privileges | ||
run: ./install.sh install | ||
- name: "Check installation" | ||
working-directory: ./razer_control_gui | ||
run: ../ci-helpers/check-installation.sh |
This file was deleted.
Oops, something went wrong.
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,32 @@ | ||
set -o errexit | ||
set -o nounset | ||
set -o pipefail | ||
|
||
check_file() { | ||
if [ ! -e $1 ]; then | ||
echo "File \"$1\" does not exist." | ||
exit 1 | ||
fi | ||
} | ||
|
||
echo "Checking the existence of the necessary files..." | ||
# Daemon | ||
check_file "$HOME/.local/share/razercontrol" | ||
check_file "/usr/share/razercontrol/daemon" | ||
check_file "/usr/share/razercontrol/laptops.json" | ||
check_file "/etc/udev/rules.d/99-hidraw-permissions.rules" | ||
# CLI | ||
check_file "/usr/bin/razer-cli" | ||
# GUI | ||
check_file "/usr/bin/razer-settings" | ||
check_file "/usr/share/applications/razer-settings.desktop" | ||
echo "All files are present" | ||
|
||
printf "Checking that the service is enabled: " | ||
systemctl --user is-enabled razercontrol.service | ||
|
||
echo "Checking files on the path" | ||
printf -- "- " && which razer-cli | ||
printf -- "- " && which razer-settings | ||
|
||
echo "Done!" |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Oops, something went wrong.