-
Notifications
You must be signed in to change notification settings - Fork 0
118 lines (105 loc) · 4.07 KB
/
main.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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
name: Build cimgui_impl Libraries
on: [workflow_dispatch]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
# - os: ubuntu-latest # Works (disabled for testing)
# arch: x86_64
# cmake-arch: x64
# - os: ubuntu-latest # Nope (disabled for testing)
# arch: arm64
# cmake-arch: aarch64
- os: linux
arch: arm64
cmake-arch: aarch64
runner-label: self-hosted
# - os: windows-latest # Works (disabled for testing)
# arch: x86_64
# cmake-arch: x64
# triplet: x64-windows
# - os: windows-latest # Works (disabled for testing)
# arch: x86
# cmake-arch: win32
# triplet: x86-windows
# - os: windows-latest # Nope (disabled for testing)
# arch: arm64
# cmake-arch: arm64
# triplet: arm64-windows
# - os: macos-13 # Works (disabled for testing)
# arch: x86_64
# cmake-arch: x86_64
# - os: macos-latest # Works (disabled for testing)
# arch: arm64
# cmake-arch: arm64
steps:
- uses: actions/checkout@v4.1.7
with:
repository: 'JunaMeinhold/cimgui_impl'
path: 'cimgui'
submodules: true
- name: Install dependencies on Ubuntu
if: matrix.os == 'ubuntu-latest' || matrix.os == 'linux'
run: |
sudo apt-get update
sudo apt-get install -y build-essential cmake libsdl2-dev libglfw3-dev libglu1-mesa-dev libvulkan-dev
- name: Install dependencies on MacOS
if: matrix.os == 'macos-latest' || matrix.os == 'macos-13'
run: |
brew install cmake sdl2 glfw glew glm
- name: Prepare Vulkan SDK
if: matrix.os == 'macos-latest' || matrix.os == 'macos-13'
uses: humbletim/setup-vulkan-sdk@v1.2.0
with:
vulkan-query-version: 1.3.204.0
vulkan-components: Vulkan-Headers, Vulkan-Loader, Glslang
vulkan-use-cache: false
- name: Install vcpkg (Windows)
if: matrix.os == 'windows-latest'
run: |
cd cimgui
git clone https://github.com/microsoft/vcpkg.git
./vcpkg/bootstrap-vcpkg.bat
- name: Install vcpkg packages
if: matrix.os == 'windows-latest'
run: |
cd cimgui
./vcpkg/vcpkg install sdl2:${{ matrix.triplet }}
./vcpkg/vcpkg install glfw3:${{ matrix.triplet }}
./vcpkg/vcpkg install opengl:${{ matrix.triplet }}
./vcpkg/vcpkg install vulkan:${{ matrix.triplet }}
./vcpkg/vcpkg install glslang:${{ matrix.triplet }}
- name: Configure cimgui with CMake on Linux
if: matrix.os == 'ubuntu-latest' || matrix.os == 'linux'
run: cmake -S cimgui -B cimgui/build
- name: Configure cimgui with CMake for macOS
if: matrix.os == 'macos-latest' || matrix.os == 'macos-13'
run: |
cmake -S cimgui -B cimgui/build -DCMAKE_OSX_ARCHITECTURES=${{ matrix.cmake-arch }}
- name: Configure cimgui with CMake for Windows (x86)
if: matrix.os == 'windows-latest' && matrix.arch == 'x86'
run: |
cd cimgui
cmake -S . -B ./build -A ${{ matrix.cmake-arch }} -DCMAKE_TOOLCHAIN_FILE="./vcpkg/scripts/buildsystems/vcpkg.cmake" -DBACKENDS_D3D12=OFF
- name: Configure cimgui with CMake for Windows
if: matrix.os == 'windows-latest' && matrix.arch != 'x86'
run: |
cd cimgui
cmake -S . -B ./build -A ${{ matrix.cmake-arch }} -DCMAKE_TOOLCHAIN_FILE="./vcpkg/scripts/buildsystems/vcpkg.cmake"
- name: Build cimgui
run: cmake --build cimgui/build --config Release
- name: Move Windows binaries
if: matrix.os == 'windows-latest'
run: |
mv cimgui/build/Release/*.dll cimgui/build/
- name: Upload Artifacts
uses: actions/upload-artifact@v4.3.4
with:
name: cimgui-${{ matrix.os }}-${{ matrix.arch }}-artifacts
path: |
cimgui/build/*.dll
cimgui/build/*.so
cimgui/build/*.dylib
if-no-files-found: ignore # 'warn' or 'ignore' or 'error'