Skip to content

Commit

Permalink
PR checks
Browse files Browse the repository at this point in the history
  • Loading branch information
nabam committed Jan 30, 2024
1 parent 3f0d63f commit 186e376
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 2 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/checks.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: "Run Checks"
on:
workflow_dispatch: {}
pull_request:
branches:
- main

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: cachix/install-nix-action@v20
with:
nix_path: nixpkgs=channel:nixos-unstable
extra_nix_config: |
experimental-features = nix-command flakes
extra-platforms = aarch64-linux
- run: |
nix fmt .
git diff-files --quiet || (git -P diff; echo -e "\nNOT FORMATTED: run 'nix fmt'"; false)
28 changes: 28 additions & 0 deletions .github/workflows/example.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: "Build Example"
on:
workflow_dispatch: {}
pull_request:
branches:
- main

jobs:
build_example:
runs-on: ubuntu-latest
needs: build_packages
steps:
- uses: actions/checkout@v3
- run: |
DEBIAN_FRONTEND=noninteractive
sudo apt-get update -q -y && sudo apt-get install -q -y qemu-system-aarch64 qemu-efi binfmt-support qemu-user-static
- uses: cachix/install-nix-action@v20
with:
nix_path: nixpkgs=channel:nixos-unstable
extra_nix_config: |
experimental-features = nix-command flakes
extra-platforms = aarch64-linux
- uses: cachix/cachix-action@v12
with:
name: nabam-nixos-rockchip
- working-directory: ./example
run: |
nix build -L -j4 --accept-flake-config --override-input rockchip ..
5 changes: 3 additions & 2 deletions .github/workflows/packages.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
name: "Build Packages"
on:
workflow_dispatch: {}
pull_request:
branches:
- main

jobs:
build_packages:
continue-on-error: true
strategy:
matrix:
package:
Expand Down Expand Up @@ -36,6 +38,5 @@ jobs:
- uses: cachix/cachix-action@v12
with:
name: nabam-nixos-rockchip
authToken: '${{ secrets.CACHIX_TOKEN }}'
- run: |
nix build -L -j4 .#${{ matrix.package }}

0 comments on commit 186e376

Please sign in to comment.