mirror of
https://github.com/Zedfrigg/ironbar.git
synced 2025-04-19 19:34:24 +02:00

* Add nix flake * Fix readme syntax issue * Format nix flake * ci(build): add nix flake support * ci(build): fix workflow_dispatch casing * ci(build): fix nix flake lock update job * ci: add nix flake lock update timer job old method didn't work * improve example and add cachix info Co-authored-by: Jake Stanger <mail@jstanger.dev>
60 lines
No EOL
1.2 KiB
YAML
60 lines
No EOL
1.2 KiB
YAML
name: Build
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
branches: [ "master" ]
|
|
pull_request:
|
|
branches: [ "master" ]
|
|
|
|
env:
|
|
CARGO_TERM_COLOR: always
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
|
|
- uses: actions-rs/toolchain@v1
|
|
with:
|
|
toolchain: stable
|
|
override: true
|
|
|
|
- name: Install build deps
|
|
run: sudo apt install libgtk-3-dev libgtk-layer-shell-dev
|
|
|
|
- name: Build
|
|
run: cargo build --verbose
|
|
|
|
- name: Clippy
|
|
uses: actions-rs/clippy-check@v1
|
|
with:
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
args: --all-features
|
|
|
|
- name: Check formatting
|
|
run: cargo fmt --check
|
|
|
|
|
|
|
|
build-nix:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
|
|
- uses: cachix/install-nix-action@v17
|
|
with:
|
|
install_url: https://nixos.org/nix/install
|
|
extra_nix_config: |
|
|
auto-optimise-store = true
|
|
experimental-features = nix-command flakes
|
|
|
|
- uses: cachix/cachix-action@v11
|
|
with:
|
|
name: jakestanger
|
|
signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}'
|
|
|
|
- run: nix build --print-build-logs |