From 5c1c36fe75c0dcff3349cd3badb7237b12317ebe Mon Sep 17 00:00:00 2001 From: Florian Loitsch Date: Tue, 17 Sep 2024 17:56:59 +0200 Subject: [PATCH] Add support for packages (workflow dispatch) and add libgpiod. --- .github/workflows/build.yml | 31 +++++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b531d21..a4305ac 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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: @@ -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 @@ -42,6 +57,7 @@ jobs: curl \ git \ libssl-dev \ + libgpiod-dev \ pkg-config \ python3 \ python3-pip \ @@ -50,7 +66,8 @@ jobs: sudo \ unzip \ wget \ - zip + zip \ + ${{env.PACKAGES}} shell: /bin/bash @@ -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 @@ -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: |