Create workflows for Linux builds and Nix flake builds (#659)

* Create build-linux.yml

* Update build-linux.yml

* build-linux: run as sudo

* Create nix-build.yaml

* Rename nix-build.yaml to build-nix.yaml

* build-nix: rename workflow to 'Nix Flake'

* README: add workflow status badges
This commit is contained in:
shadeyg56 2024-03-03 05:25:43 -06:00 committed by GitHub
parent 0354ff6cc4
commit 166cd065a2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 56 additions and 0 deletions

28
.github/workflows/build-linux.yml vendored Normal file
View File

@ -0,0 +1,28 @@
name: Linux Build
on:
push:
paths-ignore:
- "README.md"
- ".gitignore"
- "LICENSE"
pull_request:
jobs:
build_linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4.1.1
- name: Install poetry
run: pipx install poetry
- name: "Setup Python"
uses: actions/setup-python@v5.0.0
with:
python-version: 3.12
cache: "poetry"
- name: "Install auto-cpufreq"
run: sudo ./auto-cpufreq-installer --install

26
.github/workflows/build-nix.yaml vendored Normal file
View File

@ -0,0 +1,26 @@
name: Nix Flake
on:
push:
paths-ignore:
- "README.md"
- ".gitignore"
- "LICENSE"
pull_request:
jobs:
build-nix:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: "Install Nix ❄️"
uses: cachix/install-nix-action@v25
- name: "Nix Cache"
uses: DeterminateSystems/magic-nix-cache-action@v3
- name: "Build Nix Flake ❄️"
run: nix build

View File

@ -1,4 +1,6 @@
# auto-cpufreq
[![Linux Build](https://github.com/shadeyg56/auto-cpufreq/actions/workflows/build-linux.yml/badge.svg?event=push)](https://github.com/shadeyg56/auto-cpufreq/actions/workflows/build-linux.yml)
[![Nix Flake](https://github.com/shadeyg56/auto-cpufreq/actions/workflows/build-nix.yaml/badge.svg?event=push)](https://github.com/shadeyg56/auto-cpufreq/actions/workflows/build-nix.yaml)
Automatic CPU speed & power optimizer for Linux. Actively monitors laptop battery state, CPU usage, CPU temperature, and system load, ultimately allowing you to improve battery life without making any compromises.