Skip to content

Commit

Permalink
install astyle with nix in ci workflow
Browse files Browse the repository at this point in the history
Signed-off-by: Thing-han, Lim <[email protected]>
  • Loading branch information
potsrevennil committed Mar 20, 2024
1 parent 02b90b6 commit 230be75
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,20 @@ jobs:
build_test:
runs-on: ubuntu-latest
steps:
- id: nixpkgs
shell: bash
run: |
if [ -f flake.lock ]; then
nixpkgs="flake:$(cat flake.lock | jq -r '.nodes.nixpkgs.locked // empty | .type + ":" + .owner + "/" + .repo + "/" + .rev')"
else
nixpkgs=channel:nixos-unstable
fi
echo "nixpkgs=$nixpkgs" >> "$GITHUB_OUTPUT"
- uses: cachix/install-nix-action@v25
with:
nix_path: nixpkgs=${{ steps.nixpkgs.outputs.nixpkgs }}
- uses: actions/checkout@v3
- name: install dependencies
run: sudo apt install astyle
run: nix profile install nixpkgs#astyle
- name: Astyle
run: astyle **/*.[ch] --options=.astylerc --dry-run | grep -vq "Formatted"
run: astyle **/*.[ch] --options=.astylerc --dry-run | grep -vq "Formatted"

0 comments on commit 230be75

Please sign in to comment.