mirror of
https://github.com/LizardByte/Sunshine.git
synced 2026-08-07 10:20:46 +00:00
build(linux): generate glad sources at compile time (#4798)
Co-authored-by: Conn O'Griofa <connogriofa@gmail.com>
This commit is contained in:
@@ -64,7 +64,7 @@ jobs:
|
||||
|
||||
- name: Setup Dependencies Linux Flatpak
|
||||
run: |
|
||||
python -m pip install ./packaging/linux/flatpak/deps/flatpak-builder-tools/node
|
||||
python -m pip install ".[flatpak]"
|
||||
|
||||
sudo apt-get update -y
|
||||
sudo apt-get install -y \
|
||||
@@ -91,6 +91,19 @@ jobs:
|
||||
- name: Debug generated-sources.json
|
||||
run: cat generated-sources.json
|
||||
|
||||
- name: flatpak pip generator
|
||||
# generates glad-dependencies.json for PyPI build-time dependencies (e.g. jinja2 for glad)
|
||||
run: |
|
||||
python \
|
||||
./packaging/linux/flatpak/deps/flatpak-builder-tools/pip/flatpak-pip-generator.py \
|
||||
--runtime="org.freedesktop.Sdk//${PLATFORM_VERSION}" \
|
||||
--output glad-dependencies \
|
||||
--build-only \
|
||||
--requirements-file=./third-party/glad/requirements.txt
|
||||
|
||||
# Copy generated pip sources into build dir alongside the manifest
|
||||
cp glad-dependencies.json build/
|
||||
|
||||
- name: Cache Flatpak build
|
||||
uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
|
||||
with:
|
||||
@@ -195,6 +208,7 @@ jobs:
|
||||
run: |
|
||||
mkdir -p flathub/modules
|
||||
cp "./build/generated-sources.json" "./flathub/"
|
||||
cp "./build/glad-dependencies.json" "./flathub/"
|
||||
cp "./build/package-lock.json" "./flathub/"
|
||||
cp "./build/${APP_ID}.yml" "./flathub/"
|
||||
cp "./build/${APP_ID}.metainfo.xml" "./flathub/"
|
||||
|
||||
@@ -138,8 +138,8 @@ jobs:
|
||||
release: ${{ matrix.bsd_release }}
|
||||
run: |
|
||||
set -e
|
||||
# install gcvor
|
||||
python -m pip install "./scripts[test]"
|
||||
# install glad deps and gcvor
|
||||
python -m pip install ".[glad,test]"
|
||||
|
||||
# fix git safe.directory issues
|
||||
git config --global --add safe.directory "*"
|
||||
|
||||
@@ -58,12 +58,6 @@ jobs:
|
||||
libxcb-dri3-dev \
|
||||
libxfixes-dev
|
||||
|
||||
- name: Setup python
|
||||
id: python
|
||||
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
|
||||
with:
|
||||
python-version: '3.14'
|
||||
|
||||
- name: Build latest libva
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -163,6 +157,12 @@ jobs:
|
||||
sudo apt-get clean
|
||||
sudo rm -rf /var/lib/apt/lists/*
|
||||
|
||||
- name: Setup python
|
||||
id: python
|
||||
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
|
||||
with:
|
||||
python-version: '3.14'
|
||||
|
||||
- name: Run tests
|
||||
id: test
|
||||
working-directory: build/tests
|
||||
@@ -181,7 +181,7 @@ jobs:
|
||||
(steps.test.outcome == 'success' || steps.test.outcome == 'failure')
|
||||
working-directory: build
|
||||
run: |
|
||||
${{ steps.python.outputs.python-path }} -m pip install "../scripts[test]"
|
||||
${{ steps.python.outputs.python-path }} -m pip install "..[test]"
|
||||
${{ steps.python.outputs.python-path }} -m gcovr --gcov-executable "gcov-${GCC_VERSION}" . -r ../src \
|
||||
--exclude-noncode-lines \
|
||||
--exclude-throw-branches \
|
||||
|
||||
@@ -165,7 +165,7 @@ jobs:
|
||||
(steps.test.outcome == 'success' || steps.test.outcome == 'failure')
|
||||
working-directory: build
|
||||
run: |
|
||||
python -m pip install "../scripts[test]"
|
||||
python -m pip install "..[test]"
|
||||
python -m gcovr . -r ../src \
|
||||
--exclude-noncode-lines \
|
||||
--exclude-throw-branches \
|
||||
|
||||
@@ -322,7 +322,7 @@ jobs:
|
||||
shell: msys2 {0}
|
||||
working-directory: build
|
||||
run: |
|
||||
${{ steps.python-path.outputs.python-path }} -m pip install "../scripts[test]"
|
||||
${{ steps.python-path.outputs.python-path }} -m pip install "..[test]"
|
||||
${{ steps.python-path.outputs.python-path }} -m gcovr . -r ../src \
|
||||
--exclude-noncode-lines \
|
||||
--exclude-throw-branches \
|
||||
|
||||
@@ -31,7 +31,6 @@ jobs:
|
||||
python-version: '3.14'
|
||||
|
||||
- name: Set up Python Dependencies
|
||||
working-directory: scripts
|
||||
run: |
|
||||
python -m pip install --upgrade pip setuptools
|
||||
python -m pip install ".[locale]"
|
||||
|
||||
Reference in New Issue
Block a user