Build libplacebo (Windows) #13
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 libplacebo (Windows) | |
on: | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: windows-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
repository: haasn/libplacebo | |
path: libplacebo | |
submodules: recursive | |
- name: Set up dependencies | |
shell: bash | |
run: | | |
pip install meson ninja glad2 | |
git clone https://github.com/Microsoft/vcpkg.git | |
./vcpkg/bootstrap-vcpkg.sh | |
./vcpkg/vcpkg install glfw3 opengl | |
- name: Configure and build | |
shell: bash | |
working-directory: ./libplacebo | |
run: | | |
meson setup builddir \ | |
--buildtype=release \ | |
--default-library=static \ | |
--prefix="$RUNNER_TEMP/libplacebo-install" \ | |
-Dd3d11=disabled \ | |
-Ddemos=false \ | |
-Dglslang=disabled \ | |
-Dlcms=disabled \ | |
-Dopengl=enabled \ | |
-Dshaderc=disabled \ | |
-Dunwind=disabled \ | |
-Dvulkan=disabled | |
meson compile -C builddir | |
meson install -C builddir | |
- name: Package artifacts | |
shell: bash | |
run: | | |
mkdir -p "$GITHUB_WORKSPACE/artifacts" | |
if [[ -d "$RUNNER_TEMP/libplacebo-install" ]]; then | |
cp -r "$RUNNER_TEMP/libplacebo-install"/* "$GITHUB_WORKSPACE/artifacts/" | |
fi | |
if [[ -d "libplacebo/builddir" ]]; then | |
find libplacebo/builddir -name '*.a' -o -name '*.lib' -exec cp {} "$GITHUB_WORKSPACE/artifacts/" \; | |
cp -r libplacebo/src/include "$GITHUB_WORKSPACE/artifacts/" | |
fi | |
- name: Upload artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: libplacebo-windows | |
path: "$GITHUB_WORKSPACE/artifacts" | |
if-no-files-found: error |