Skip to content

Commit

Permalink
CI: Add build test
Browse files Browse the repository at this point in the history
Although the examples cannot be tested on the cloud, they still should
be built without error.

Signed-off-by: Jian-Hong Pan <[email protected]>
  • Loading branch information
starnight committed Feb 14, 2024
1 parent dc29a64 commit e5d4c38
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Build

on:
push:
branches: [master]
pull_request:
workflow_dispatch:

jobs:
main:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Prepare
run: |
sudo apt update -y
sudo apt install --no-install-recommends gcc g++ make libgpiod-dev -y
- name: Build
run: |
dirs=$(find ${PWD} -name libgpiod-\* -type d -maxdepth 1 -mindepth 1)
for d in $dirs; do
cd $d
echo "Build ${PWD##*/}"
make
done
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@ libgpiod introduction video: https://www.youtube.com/watch?v=76j3TIqTPTI

* Pull requests are welcome
* Each example should be in a folder with prefix "libgpiod-" and a **Makefile**
* Should pass the Build test

0 comments on commit e5d4c38

Please sign in to comment.