Repository navigation
glvnd: add Linux modular library downloads #1189
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: build-linux-rpi | |
| on: | |
| push: | |
| branches: [bleeding, master] | |
| tags: ['**', '!latest', '!latest-modular', '!nightly', '!build-state', '!nightly-staging-*', '!nightly-previous-*'] | |
| paths-ignore: | |
| - "**/README.md" | |
| pull_request: | |
| paths-ignore: | |
| - "**/README.md" | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ startsWith(github.ref, 'refs/tags/') && github.run_id || github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: ${{ !startsWith(github.ref, 'refs/tags/') }} | |
| permissions: | |
| contents: write | |
| actions: read | |
| env: | |
| TARGET: linux | |
| TYPE: linux | |
| GCC: gcc10 | |
| DISTRO: raspios | |
| CROSS_OS: bookworm | |
| NO_FORCE: 1 | |
| USE_ARTIFACT: false | |
| GA_CI_SECRET: ${{ secrets.CI_SECRET }} | |
| jobs: | |
| pre-check: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| workflow_disabled: ${{ steps.plan.outputs.workflow_disabled }} | |
| build_needed: ${{ steps.plan.outputs.build_needed }} | |
| matrix: ${{ steps.plan.outputs.matrix }} | |
| steps: | |
| - uses: actions/checkout@v7.0.1 | |
| with: | |
| fetch-depth: 0 | |
| - name: Plan selected formula and toolchain builds | |
| id: plan | |
| uses: actions/github-script@v9.0.0 | |
| with: | |
| script: | | |
| await require(`${process.env.GITHUB_WORKSPACE}/scripts/release-build-plan.cjs`).plan({github, context, core, workflow: '.github/workflows/build-linux-rpi.yml', job: 'build-linux-rpi'}); | |
| - uses: actions/upload-artifact@v7.0.0 | |
| with: | |
| name: build-plan-${{ github.workflow }} | |
| path: .build-plans/*.pkl | |
| include-hidden-files: true | |
| if-no-files-found: ignore | |
| build-linux-rpi: | |
| needs: pre-check | |
| if: needs.pre-check.outputs.build_needed == 'true' | |
| name: Raspberry Pi ${{ matrix.arch }} - GCC10 | |
| runs-on: ubuntu-22.04 | |
| strategy: | |
| fail-fast: false | |
| matrix: ${{ fromJSON(needs.pre-check.outputs.matrix) }} | |
| env: | |
| ARCH: ${{ matrix.arch }} | |
| LINUX_ARTIFACT_TARGET: ${{ matrix.artifact_target }} | |
| SYSROOT: ${{ matrix.sysroot }} | |
| TOOLCHAIN_ROOT: /usr | |
| TOOLCHAIN_PREFIX: ${{ matrix.prefix }} | |
| CC: ${{ matrix.prefix }}-gcc-10 | |
| CXX: ${{ matrix.prefix }}-g++-10 | |
| GCC_VERSION: "10" | |
| RPI_QEMU_ARCH: ${{ matrix.qemu_arch }} | |
| steps: | |
| - uses: actions/checkout@v7.0.1 | |
| - name: Trust checked-out workspace | |
| run: git config --global --add safe.directory "$GITHUB_WORKSPACE" | |
| - name: Check Linux artifact mapping | |
| run: bash scripts/linux/map_artifact_target.sh | |
| - name: Determine release identity | |
| shell: bash | |
| run: | | |
| if [[ "$GITHUB_REF" == refs/tags/* ]]; then | |
| release="$GITHUB_REF_NAME" | |
| elif [[ "$GITHUB_REF" == "refs/heads/master" ]]; then | |
| release=nightly | |
| else | |
| release=latest | |
| fi | |
| echo "RELEASE=$release" >> "$GITHUB_ENV" | |
| - name: Setup QEMU sysroot and GCC 10 | |
| run: sudo --preserve-env=SYSROOT,TOOLCHAIN_ROOT,CROSS_OS,RPI_QEMU_ARCH,GITHUB_ENV ./scripts/linux/raspios/${{ matrix.arch }}/setup.sh | |
| - name: Install target packages into sysroot | |
| run: sudo --preserve-env=SYSROOT,RPI_QEMU_ARCH ./scripts/linux/raspios/${{ matrix.arch }}/install.sh | |
| - name: Build | |
| run: ./scripts/linux/raspios/${{ matrix.arch }}/build.sh | |
| - name: Verify GLFW window backends and native API linking | |
| run: bash scripts/tests/test-rpi-glfw-backends.sh | |
| - name: Package canonical archive | |
| run: scripts/package.sh | |
| - name: List output | |
| run: | | |
| ls -lah out/ || true | |
| find out/ -type f \( -name "*.tar.bz2" -o -name "*.sha256" -o -name "*.json" \) -print || true | |
| - name: Update Release | |
| if: github.repository == 'openframeworks/apothecary' && github.event_name == 'push' && (startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/master' || github.ref == 'refs/heads/bleeding') | |
| uses: danoli3/action-gh-release@ec40b04e78c39008f73c4ca3fdf9b51df604c4ed # temporary patch: softprops/action-gh-release#852 | |
| with: | |
| token: ${{ secrets.PAT_TOKEN || secrets.GITHUB_TOKEN }} | |
| tag_name: ${{ env.RELEASE }} | |
| draft: false | |
| files: | | |
| out/openFrameworksLibs_${{ env.RELEASE }}_${{ env.TARGET }}_${{ env.ARCH }}_${{ env.GCC }}.tar.bz2 | |
| out/openFrameworksLibs_${{ env.RELEASE }}_${{ env.TARGET }}_${{ env.ARCH }}_${{ env.GCC }}.tar.bz2.sha256 | |
| out/openFrameworksLibs_${{ env.RELEASE }}_${{ env.TARGET }}_${{ env.ARCH }}_${{ env.GCC }}.tar.bz2.manifest.json | |
| - name: Download verified Linux build plan | |
| if: github.event_name == 'push' && (github.ref == 'refs/heads/bleeding' || github.ref == 'refs/heads/master') | |
| uses: actions/download-artifact@v8 | |
| with: | |
| name: build-plan-${{ github.workflow }} | |
| path: ${{ runner.temp }}/build-plans | |
| - name: Record final release outputs | |
| if: github.event_name == 'push' && (github.ref == 'refs/heads/bleeding' || github.ref == 'refs/heads/master') | |
| uses: actions/github-script@v9.0.0 | |
| env: | |
| BUILD_PLAN_MATRIX: ${{ toJSON(matrix) }} | |
| with: | |
| github-token: ${{ secrets.PAT_TOKEN || secrets.GITHUB_TOKEN }} | |
| script: | | |
| await require(`${process.env.GITHUB_WORKSPACE}/scripts/release-build-plan.cjs`).record({github, context, core, workflow: '.github/workflows/build-linux-rpi.yml', job: 'build-linux-rpi', matrix: JSON.parse(process.env.BUILD_PLAN_MATRIX)}); | |
| - name: Clean canonical archive before modular packaging | |
| if: github.repository == 'openframeworks/apothecary' && github.event_name == 'push' | |
| run: rm -f out/openFrameworksLibs*.tar.bz2 | |
| - name: Package modular libraries | |
| if: github.repository == 'openframeworks/apothecary' && github.event_name == 'push' && (startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/master' || github.ref == 'refs/heads/bleeding') | |
| run: scripts/package-individual.sh | |
| - name: Upload modular libraries | |
| if: github.repository == 'openframeworks/apothecary' && github.event_name == 'push' && (startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/master' || github.ref == 'refs/heads/bleeding') | |
| uses: danoli3/action-gh-release@ec40b04e78c39008f73c4ca3fdf9b51df604c4ed # temporary patch: softprops/action-gh-release#852 | |
| with: | |
| token: ${{ secrets.PAT_TOKEN || secrets.GITHUB_TOKEN }} | |
| tag_name: latest-modular | |
| files: out/oF_*_linux_${{ env.ARCH }}_gcc10.tar.bz2 |