-
Notifications
You must be signed in to change notification settings - Fork 103
95 lines (82 loc) · 3.49 KB
/
VcpkgPackage.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
name: "VcpkgPackage"
# Tests that:
# 1. the vcpkg package build successfully
# - on all platforms
# - for all rendering bindings (opengl3-binding, metal-binding, opengl3-binding, vulkan-binding, dx11-binding, dx12-binding)
# - for all window backends (glfw-binding, sdl2-binding)
# - with all optional dependencies (freetype, freetype-lunasvg)
# 2. An app can be built with hello_imgui as a vcpkg package
# (with all combinations of rendering bindings, window backends, optional dependencies)
# 3. An app can be run
# (only on selected backends and platforms)
on:
workflow_dispatch:
pull_request:
push:
jobs:
build:
name: VcpkgPackage
runs-on: ${{ matrix.config.os }}
strategy:
fail-fast: false
matrix:
config:
- os: ubuntu-latest
vcpkg_triplet: x64-linux-release
#
# macOS disabled: we have intermittent failures when downloading the vcpkg binary cache
# See failing action
# https://github.com/pthom/hello_imgui/actions/runs/10248206833/job/28348983900
# https://api.github.com/repos/pthom/hello_imgui/git/refs/heads/master: curl failed to download with exit code 22 / curl: (22) The requested URL returned error: 403
# - os: macos-latest
# vcpkg_triplet: x64-osx-release
#
# Window disabled:
# See failing action:https://github.com/pthom/hello_imgui/actions/runs/8967371818/job/24624780079
# " unresolved external symbol _Thrd_sleep_for"
# The symbol that is missing was added to the microsoft STL in october 2023, and later removed...
# See https://github.com/actions/runner-images/issues/9398
# - os: windows-latest
# vcpkg_triplet: x64-windows-release
steps:
- uses: actions/checkout@v4
with:
submodules: false
- name: install glfw & sdl requirements
if : ${{ matrix.config.os == 'ubuntu-latest' }}
shell: bash
run: |
sudo apt-get update && sudo apt-get install -y libxinerama-dev libxcursor-dev xorg-dev libglu1-mesa-dev pkg-config libx11-dev libxft-dev libxext-dev
- name: vcpkg install
uses: johnwason/vcpkg-action@v6
id: vcpkg
with:
triplet: ${{ matrix.config.vcpkg_triplet }}
cache-key: ${{ matrix.config.os }}
revision: master
token: ${{ github.token }}
github-binarycache: true
#
# Install utilities to be able to run a graphical OpenGL application
#
- name: Ubuntu - Install & Start Xvfb
if: ${{ matrix.platform == 'ubuntu-latest' }}
run: |
sudo apt-get install -y xvfb
- name: Windows - install mesa OpenGL software renderer
shell: bash
if: ${{ matrix.config.os == 'windows-latest' }}
run: |
# Download the archive
curl -L -O https://github.com/pal1000/mesa-dist-win/releases/download/23.1.9/mesa3d-23.1.9-release-msvc.7z
# Extract the archive using 7-zip which is preinstalled on the GitHub Actions Windows runner
7z x mesa3d-23.1.9-release-msvc.7z -omesa3d
# - name: Setup interactive tmate session
# uses: mxschmitt/action-tmate@v3
# Run the test
- name: run test
shell: bash
run: |
export VCPKG_ROOT=$(pwd)/vcpkg
cd .github/ci_vcpkg_package_tests
python run_ci_vcpkg_package_tests.py