Skip to content

Commit

Permalink
Create workflows for Linux builds and Nix flake builds (#659)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
shadeyg56 committed Mar 3, 2024
1 parent 0354ff6 commit 166cd06
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/build-linux.yml
Original file line number Diff line number Diff line change
@@ -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 changes: 26 additions & 0 deletions .github/workflows/build-nix.yaml
Original file line number Diff line number Diff line change
@@ -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


2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -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.

Expand Down

0 comments on commit 166cd06

Please sign in to comment.