-
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.
- Loading branch information
1 parent
67cec11
commit 66ff6b5
Showing
24 changed files
with
684 additions
and
28 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,7 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
# Check for updates to GitHub Actions every week | ||
interval: "weekly" |
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,47 @@ | ||
name: Build ATtiny85 | ||
|
||
"on": | ||
pull_request: | ||
branches: ["main"] | ||
paths: | ||
- .github/workflows/build-attiny85.yaml | ||
- boards/attiny85/flake.lock | ||
- boards/attiny85/flake.nix | ||
- boards/attiny85/.cargo/** | ||
- boards/attiny85/.justfile | ||
- boards/attiny85/src/** | ||
- boards/attiny85/avr-unknown-none-attiny85.json | ||
- boards/attiny85/Cargo.lock | ||
- boards/attiny85/Cargo.toml | ||
- boards/attiny85/rust-toolchain.toml | ||
push: | ||
branches: ["main"] | ||
paths: | ||
- .github/workflows/build-attiny85.yaml | ||
- boards/attiny85/flake.lock | ||
- boards/attiny85/flake.nix | ||
- boards/attiny85/.cargo/** | ||
- boards/attiny85/.justfile | ||
- boards/attiny85/src/** | ||
- boards/attiny85/avr-unknown-none-attiny85.json | ||
- boards/attiny85/Cargo.lock | ||
- boards/attiny85/Cargo.toml | ||
- boards/attiny85/rust-toolchain.toml | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build-attiny85: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: DeterminateSystems/nix-installer-action@v14 | ||
- uses: DeterminateSystems/magic-nix-cache-action@v8 | ||
- name: Build | ||
run: cd boards/attiny85; nix develop --command just build release | ||
- name: Upload firmware | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: attiny85-pwm-fan-controller | ||
path: | | ||
target/avr-unknown-none-attiny85/release/attiny85-pwm-fan-controller.elf | ||
attiny85-pwm-fan-controller.hex |
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,30 @@ | ||
name: Cargo Lock Updater | ||
|
||
"on": | ||
schedule: | ||
# Once a month on the 5th | ||
- cron: "0 0 5 * *" | ||
workflow_dispatch: | ||
|
||
permissions: | ||
contents: write | ||
pull-requests: write | ||
|
||
jobs: | ||
cargo-lock-updater: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: DeterminateSystems/nix-installer-action@v14 | ||
- uses: DeterminateSystems/magic-nix-cache-action@v8 | ||
- name: Update ATtiny85 Cargo lock file | ||
run: cd boards/attiny85; nix develop --command cargo update | ||
- name: Update Pico Cargo lock file | ||
run: cd boards/pico; nix develop --command cargo update | ||
- name: Create Pull Request | ||
uses: peter-evans/create-pull-request@v7 | ||
with: | ||
assignees: ${{ github.repository_owner }} | ||
branch: "update/cargo-lock" | ||
commit-message: "chore(deps): Update Cargo lock files" | ||
title: "chore(deps): Update Cargo lock files" |
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,18 @@ | ||
name: Lint Rust code with Clippy | ||
"on": | ||
pull_request: | ||
branches: ["main"] | ||
paths: | ||
- .github/workflows/clippy-attiny85.yaml | ||
- boards/attiny85/flake.lock | ||
- boards/attiny85/**.rs | ||
|
||
jobs: | ||
clippy-attiny85: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: DeterminateSystems/nix-installer-action@v14 | ||
- uses: DeterminateSystems/magic-nix-cache-action@v8 | ||
- name: Lint Rust code with Clippy | ||
run: cd boards/attiny85; nix develop --command cargo clippy |
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,14 @@ | ||
name: Check Nix Flake | ||
"on": | ||
pull_request: | ||
branches: ["main"] | ||
paths: | ||
- .github/workflows/flake-checker.yaml | ||
- '**/flake.lock' | ||
|
||
jobs: | ||
flake-checker: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: DeterminateSystems/flake-checker-action@v9 |
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,25 @@ | ||
name: Flake ❄️ Lock 🔒️ Updater ✨ | ||
|
||
"on": | ||
schedule: | ||
# Pi o'clock | ||
- cron: '3 14 * * 1,5' | ||
workflow_dispatch: | ||
|
||
jobs: | ||
lock-updater: | ||
name: Flake Lock Updater | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- uses: DeterminateSystems/nix-installer-action@v14 | ||
- uses: DeterminateSystems/magic-nix-cache-action@v8 | ||
- uses: DeterminateSystems/update-flake-lock@v24 | ||
with: | ||
pr-title: "chore: update flake.lock" | ||
# Labels to be set on the PR | ||
pr-labels: | | ||
dependencies | ||
automated |
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,19 @@ | ||
name: Format justfiles | ||
"on": | ||
pull_request: | ||
branches: ["main"] | ||
paths: | ||
- .github/workflows/format-just.yaml | ||
- '**/flake.lock' | ||
- '**/.justfile' | ||
- '**/justfile' | ||
|
||
jobs: | ||
format-just: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: DeterminateSystems/nix-installer-action@v14 | ||
- uses: DeterminateSystems/magic-nix-cache-action@v8 | ||
- name: Format justfile | ||
run: cd boards/attiny85; nix develop --command just --check --fmt --unstable ../.. |
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,30 @@ | ||
name: Pre-commit auto-update | ||
|
||
"on": | ||
schedule: | ||
# Once a month on the 2nd | ||
- cron: "0 0 2 * *" | ||
workflow_dispatch: | ||
|
||
permissions: | ||
contents: write | ||
pull-requests: write | ||
|
||
jobs: | ||
pre-commit-autoupdate: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: DeterminateSystems/nix-installer-action@v14 | ||
- uses: DeterminateSystems/magic-nix-cache-action@v8 | ||
- name: Update pre-commit hooks | ||
run: nix develop --command pre-commit autoupdate | ||
- name: Run pre-commit hooks | ||
run: nix develop --command pre-commit run --all-files | ||
- name: Create Pull Request | ||
uses: peter-evans/create-pull-request@v7 | ||
with: | ||
assignees: ${{ github.repository_owner }} | ||
branch: "update/pre-commit-hooks" | ||
commit-message: "chore(deps): Update pre-commit hooks" | ||
title: "chore(deps): Update pre-commit hooks" |
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,18 @@ | ||
name: Format Rust code | ||
"on": | ||
pull_request: | ||
branches: ["main"] | ||
paths: | ||
- .github/workflows/rustfmt.yaml | ||
- '**/flake.lock' | ||
- '**.rs' | ||
|
||
jobs: | ||
rustfmt: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: DeterminateSystems/nix-installer-action@v14 | ||
- uses: DeterminateSystems/magic-nix-cache-action@v8 | ||
- name: Check Rust formatting | ||
run: cd boards/attiny85; nix develop --command nu --commands 'rustfmt --check ../../**/*.rs' |
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,20 @@ | ||
name: yamllint | ||
"on": | ||
pull_request: | ||
branches: ["main"] | ||
paths: | ||
- .github/workflows/yamllint.yaml | ||
- .yamllint.yaml | ||
- '**/flake.lock' | ||
- '**.yaml' | ||
- '**.yml' | ||
|
||
jobs: | ||
yamllint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: DeterminateSystems/nix-installer-action@v14 | ||
- uses: DeterminateSystems/magic-nix-cache-action@v8 | ||
- name: Check YAML files | ||
run: cd boards/attiny85; nix develop --command yamllint --format github ../.. |
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 |
---|---|---|
|
@@ -15,6 +15,13 @@ target/ | |
|
||
# Ignore any built binaries. | ||
*.bin | ||
*.hex | ||
|
||
*.jpg~ | ||
*.jpg-autosave.kra | ||
|
||
# direnv | ||
.direnv/ | ||
|
||
# Nix | ||
result/ |
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,60 @@ | ||
exclude: | | ||
(?x)^( | ||
.idea/.*| | ||
.run/.*| | ||
.vscode/.* | ||
)$ | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.6.0 | ||
hooks: | ||
- id: check-byte-order-marker | ||
- id: check-executables-have-shebangs | ||
- id: check-json | ||
- id: check-merge-conflict | ||
- id: check-toml | ||
- id: check-yaml | ||
args: [--allow-multiple-documents] | ||
- id: end-of-file-fixer | ||
- id: mixed-line-ending | ||
- id: pretty-format-json | ||
args: ["--autofix"] | ||
exclude: ^.vscode/.*\.json$ | ||
- id: trailing-whitespace | ||
- repo: local | ||
hooks: | ||
- id: just | ||
entry: just --fmt --unstable | ||
files: | | ||
(?x)^( | ||
.justfile| | ||
justfile | ||
)$ | ||
language: system | ||
name: just | ||
pass_filenames: false | ||
- id: rustfmt | ||
name: rustfmt | ||
description: Format Rust files with rustfmt. | ||
entry: rustfmt | ||
pass_filenames: true | ||
types: [file, rust] | ||
language: system | ||
- id: rust-clippy-attiny85 | ||
name: Rust clippy ATtiny85 | ||
description: Run cargo clippy on files included in the commit. | ||
entry: cargo -C boards/attiny85 clippy --all-targets --all-features -- -Dclippy::all | ||
pass_filenames: false | ||
types: [file, rust] | ||
language: system | ||
# - id: rust-clippy-pico | ||
# name: Rust clippy Pico | ||
# description: Run cargo clippy on files included in the commit. | ||
# entry: cargo -C boards/pico clippy --all-targets --all-features -- -Dclippy::all | ||
# pass_filenames: false | ||
# types: [file, rust] | ||
# language: system | ||
- repo: https://github.com/adrienverge/yamllint.git | ||
rev: v1.35.1 | ||
hooks: | ||
- id: yamllint |
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
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,6 @@ | ||
extends: default | ||
|
||
rules: | ||
document-start: disable | ||
document-end: disable | ||
line-length: disable |
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,9 +1,9 @@ | ||
[build] | ||
target = "avr-specs/avr-attiny85.json" | ||
target = "avr-unknown-none-attiny85.json" | ||
|
||
#[target.'cfg(target_arch = "avr")'] | ||
# ravedude doesn't support running from an AVR USB programmer like the USB uISP without code modifications. | ||
#runner = "ravedude trinket" | ||
# runner = "ravedude attiny85-usbtiny" | ||
|
||
[unstable] | ||
build-std = ["core"] |
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 @@ | ||
use flake |
Oops, something went wrong.