Skip to content

Commit

Permalink
Add support for packages (workflow dispatch) and add libgpiod.
Browse files Browse the repository at this point in the history
  • Loading branch information
floitsch committed Sep 17, 2024
1 parent 1bec880 commit 9b7d9f3
Showing 1 changed file with 29 additions and 2 deletions.
31 changes: 29 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ on:
release:
types: [published]
workflow_dispatch:
inputs:
packages:
description: 'list of packages to build'
required: false
type: string
default: ''

jobs:
build-qemu:
Expand All @@ -15,7 +21,16 @@ jobs:
matrix:
arch: [armv7, aarch64, riscv64, s390x, ppc64le]

env:
# For workflow dispatches the value will be overridden by the input.
PACKAGES:

steps:
- name: Set packages variable
if: ${{ github.event_name == 'workflow_dispatch' }}
run: |
echo "PACKAGES=${{ github.event.inputs.packages }}" >> $GITHUB_ENV
- uses: uraimo/run-on-arch-action@v2
name: Run commands
id: runcmd
Expand All @@ -42,6 +57,7 @@ jobs:
curl \
git \
libssl-dev \
libgpiod-dev \
pkg-config \
python3 \
python3-pip \
Expand All @@ -50,7 +66,8 @@ jobs:
sudo \
unzip \
wget \
zip
zip \
$PACKAGES
shell: /bin/bash

Expand Down Expand Up @@ -79,7 +96,16 @@ jobs:
name: Build sysroot for Raspbian
runs-on: ubuntu-latest

env:
# For workflow dispatches the value will be overridden by the input.
PACKAGES:

steps:
- name: Set packages variable
if: ${{ github.event_name == 'workflow_dispatch' }}
run: |
echo "PACKAGES=${{ github.event.inputs.packages }}" >> $GITHUB_ENV
- uses: actions/checkout@v3

- name: Build
Expand All @@ -89,7 +115,8 @@ jobs:
third_party/rpi/sysroot.py \
--distro raspbian \
--sysroot $(realpath .) \
libc6-dev libstdc++-6-dev
libc6-dev libstdc++-6-dev \
$PACKAGES
- name: Compress
run: |
Expand Down

0 comments on commit 9b7d9f3

Please sign in to comment.