Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
95 changes: 95 additions & 0 deletions .github/workflows/build-linux-glvnd-modular.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
name: build-linux-glvnd-modular
on:
pull_request:
paths: ['apothecary/formulas/glvnd/**', '.github/workflows/build-linux-glvnd-modular.yml', 'scripts/modular-cache-key.sh', 'scripts/package-individual.sh', 'scripts/export_config.sh', 'apothecary/apothecary']
push:
branches: [bleeding, master]
paths: ['apothecary/formulas/glvnd/**', '.github/workflows/build-linux-glvnd-modular.yml', 'scripts/modular-cache-key.sh', 'scripts/package-individual.sh', 'scripts/export_config.sh', 'apothecary/apothecary']
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
jobs:
build:
name: glvnd Linux ${{ matrix.arch }}
strategy:
fail-fast: false
matrix:
include:
- {arch: '64', runner: ubuntu-24.04}
- {arch: arm64, runner: ubuntu-24.04-arm}
runs-on: ${{ matrix.runner }}
env:
TARGET: linux
TYPE: linux
ARCH: ${{ matrix.arch }}
GCC: gcc14
GCC_VERSION: '14'
CC: gcc-14
CXX: g++-14
NO_COLOR: '1'
UI_ANIM: '0'
NO_FORCE: '1'
PACKAGE_LIBS: glvnd
ALWAYS_BUILD: '1'
steps:
- uses: actions/checkout@v7.0.1
- name: Install build dependencies
run: |
sudo apt-get update
sudo apt-get install -y autoconf automake build-essential cmake curl gcc-14 g++-14 git libtool pkg-config python3-venv unzip libx11-dev libxext-dev x11proto-dev
python3 -m venv "$RUNNER_TEMP/build-tools"
"$RUNNER_TEMP/build-tools/bin/pip" install meson==1.12.1 ninja packaging mako pyyaml
echo "$RUNNER_TEMP/build-tools/bin" >> "$GITHUB_PATH"
- name: Record exact native build context
run: |
context="$RUNNER_TEMP/glvnd-context"
{
"$CC" --version
"$CXX" --version
cmake --version
meson --version
ninja --version
dpkg-query -W
git hash-object .github/workflows/build-linux-glvnd-modular.yml
} > "$context"
echo "PLATFORM_ARTIFACT_CONTEXT=$context" >> "$GITHUB_ENV"
- name: Compute modular cache key
id: key
run: bash scripts/modular-cache-key.sh glvnd >> "$GITHUB_OUTPUT"
- uses: actions/cache/restore@v5
id: cache
with:
key: ${{ steps.key.outputs.key }}
path: out/glvnd
- name: Build library
if: steps.cache.outputs.cache-hit != 'true'
run: ./apo update glvnd
- name: Check headers, pkg-config and target linking
run: |
export PKG_CONFIG_PATH="$PWD/out/glvnd/lib/linux/$ARCH/pkgconfig"
test -f "$PKG_CONFIG_PATH/gl.pc"
pkg-config --exists gl
printf '#include <GL/gl.h>\nint main(void) { (void)glGetError(); return 0; }\n' > "$RUNNER_TEMP/glvnd-smoke.c"
"$CC" "$RUNNER_TEMP/glvnd-smoke.c" $(pkg-config --cflags --libs gl) -o "$RUNNER_TEMP/glvnd-smoke"
export LD_LIBRARY_PATH="$PWD/out/glvnd/lib/linux/$ARCH:$PWD/out/glvnd/lib/linux/$ARCH/pulseaudio:${LD_LIBRARY_PATH:-}"
"$RUNNER_TEMP/glvnd-smoke"
- name: Package modular library
run: bash scripts/package-individual.sh
- uses: actions/cache/save@v5
if: steps.cache.outputs.cache-hit != 'true'
with:
key: ${{ steps.key.outputs.key }}
path: out/glvnd
- uses: actions/upload-artifact@v7
with:
name: glvnd-linux-${{ matrix.arch }}-gcc14
path: out/oF_glvnd_linux_${{ matrix.arch }}_gcc14.tar.bz2
if-no-files-found: error
- name: Publish latest-modular asset
if: github.event_name == 'push' && github.repository == 'openframeworks/apothecary'
env:
GH_TOKEN: ${{ secrets.PAT_TOKEN || secrets.GITHUB_TOKEN }}
run: gh release upload latest-modular "out/oF_glvnd_linux_${ARCH}_gcc14.tar.bz2" --clobber --repo "$GITHUB_REPOSITORY"
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,4 @@ scripts/status.txt
*.xcuserstate

!.github/workflows/build-linux-openal-modular.yml
!.github/workflows/build-linux-glvnd-modular.yml
Loading
Loading