Skip to content

Commit 9b21f4f

Browse files
floitschkasperl
andauthored
Add support for packages (workflow dispatch) and add libgpiod. (#6)
Co-authored-by: Kasper Lund <[email protected]>
1 parent 1bec880 commit 9b21f4f

File tree

1 file changed

+29
-2
lines changed

1 file changed

+29
-2
lines changed

.github/workflows/build.yml

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ on:
55
release:
66
types: [published]
77
workflow_dispatch:
8+
inputs:
9+
packages:
10+
description: 'List of packages to build'
11+
required: false
12+
type: string
13+
default: ''
814

915
jobs:
1016
build-qemu:
@@ -15,7 +21,16 @@ jobs:
1521
matrix:
1622
arch: [armv7, aarch64, riscv64, s390x, ppc64le]
1723

24+
env:
25+
# For workflow dispatches the value will be overridden by the input.
26+
PACKAGES:
27+
1828
steps:
29+
- name: Set packages variable
30+
if: ${{ github.event_name == 'workflow_dispatch' }}
31+
run: |
32+
echo "PACKAGES=${{ github.event.inputs.packages }}" >> $GITHUB_ENV
33+
1934
- uses: uraimo/run-on-arch-action@v2
2035
name: Run commands
2136
id: runcmd
@@ -42,6 +57,7 @@ jobs:
4257
curl \
4358
git \
4459
libssl-dev \
60+
libgpiod-dev \
4561
pkg-config \
4662
python3 \
4763
python3-pip \
@@ -50,7 +66,8 @@ jobs:
5066
sudo \
5167
unzip \
5268
wget \
53-
zip
69+
zip \
70+
${{env.PACKAGES}}
5471
5572
shell: /bin/bash
5673

@@ -79,7 +96,16 @@ jobs:
7996
name: Build sysroot for Raspbian
8097
runs-on: ubuntu-latest
8198

99+
env:
100+
# For workflow dispatches the value will be overridden by the input.
101+
PACKAGES:
102+
82103
steps:
104+
- name: Set packages variable
105+
if: ${{ github.event_name == 'workflow_dispatch' }}
106+
run: |
107+
echo "PACKAGES=${{ github.event.inputs.packages }}" >> $GITHUB_ENV
108+
83109
- uses: actions/checkout@v3
84110

85111
- name: Build
@@ -89,7 +115,8 @@ jobs:
89115
third_party/rpi/sysroot.py \
90116
--distro raspbian \
91117
--sysroot $(realpath .) \
92-
libc6-dev libstdc++-6-dev
118+
libc6-dev libstdc++-6-dev \
119+
$PACKAGES
93120
94121
- name: Compress
95122
run: |

0 commit comments

Comments
 (0)