Skip to content

Commit 166cd06

Browse files
authored
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
1 parent 0354ff6 commit 166cd06

File tree

3 files changed

+56
-0
lines changed

3 files changed

+56
-0
lines changed

.github/workflows/build-linux.yml

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Linux Build
2+
3+
on:
4+
push:
5+
paths-ignore:
6+
- "README.md"
7+
- ".gitignore"
8+
- "LICENSE"
9+
pull_request:
10+
11+
jobs:
12+
build_linux:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/[email protected]
16+
17+
- name: Install poetry
18+
run: pipx install poetry
19+
20+
- name: "Setup Python"
21+
uses: actions/[email protected]
22+
with:
23+
python-version: 3.12
24+
cache: "poetry"
25+
26+
- name: "Install auto-cpufreq"
27+
run: sudo ./auto-cpufreq-installer --install
28+

.github/workflows/build-nix.yaml

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Nix Flake
2+
3+
on:
4+
push:
5+
paths-ignore:
6+
- "README.md"
7+
- ".gitignore"
8+
- "LICENSE"
9+
pull_request:
10+
11+
jobs:
12+
build-nix:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v4
16+
17+
- name: "Install Nix ❄️"
18+
uses: cachix/install-nix-action@v25
19+
20+
- name: "Nix Cache"
21+
uses: DeterminateSystems/magic-nix-cache-action@v3
22+
23+
- name: "Build Nix Flake ❄️"
24+
run: nix build
25+
26+

README.md

+2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
# auto-cpufreq
2+
[![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)
3+
[![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)
24

35
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.
46

0 commit comments

Comments
 (0)