-
Notifications
You must be signed in to change notification settings - Fork 1
142 lines (138 loc) · 4.72 KB
/
ci.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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
name: "CI"
on: [ push ]
jobs:
macos:
runs-on: macos-latest
if: contains(github.event.head_commit.message, '[skip-ci]') == false
env:
VCPKG_ROOT: ${{github.workspace}}/vcpkg
VCPKG_TARGET_TRIPLET: x64-osx
VCPKG_DEFAULT_BINARY_CACHE: ${{github.workspace}}/vcpkg/bincache
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Install system dependencies
run: |
brew update
brew install cmake
brew install ninja
- name: Prepare Vulkan SDK
uses: humbletim/setup-vulkan-sdk@v1.2.0
with:
vulkan-query-version: 1.3.204.0
vulkan-components: Vulkan-Headers, Vulkan-Loader
vulkan-use-cache: true
- name: Restore Vcpkg
uses: actions/cache@v3
id: restore-vcpkg
with:
path: |
${{env.VCPKG_ROOT}}
!${{env.VCPKG_ROOT}}/buildtrees
!${{env.VCPKG_ROOT}}/packages
!${{env.VCPKG_ROOT}}/downloads
!${{env.VCPKG_ROOT}}/installed
key: glow-macos-vcpkg-${{hashFiles('vcpkg.json')}}
- name: Install Vcpkg
if: steps.restore-vcpkg.outputs.cache-hit != 'true'
run: |
git clone https://github.com/microsoft/vcpkg
./vcpkg/bootstrap-vcpkg.sh -disableMetrics
mkdir -p ${{env.VCPKG_DEFAULT_BINARY_CACHE}}
- name: Generate build files
run: |
mkdir build && cd build
cmake .. -GNinja \
-DCMAKE_BUILD_TYPE=Debug \
-DVCPKG_TARGET_TRIPLET=${{env.VCPKG_TARGET_TRIPLET}}
- name: Build
run: ninja -C build
linux:
runs-on: ubuntu-latest
if: contains(github.event.head_commit.message, '[skip-ci]') == false
env:
VCPKG_ROOT: ${{github.workspace}}/vcpkg
VCPKG_DEFAULT_BINARY_CACHE: ${{github.workspace}}/vcpkg/bincache
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Install system dependencies
run: |
sudo apt update
sudo apt install cmake ninja-build libgl-dev
- name: Prepare Vulkan SDK
uses: humbletim/setup-vulkan-sdk@v1.2.0
with:
vulkan-query-version: 1.3.204.0
vulkan-components: Vulkan-Headers, Vulkan-Loader
vulkan-use-cache: true
- name: Restore Vcpkg
uses: actions/cache@v3
id: restore-vcpkg
with:
path: |
${{env.VCPKG_ROOT}}
!${{env.VCPKG_ROOT}}/buildtrees
!${{env.VCPKG_ROOT}}/packages
!${{env.VCPKG_ROOT}}/downloads
!${{env.VCPKG_ROOT}}/installed
key: glow-ubuntu-vcpkg-${{hashFiles('vcpkg.json')}}
- name: Install Vcpkg
if: steps.restore-vcpkg.outputs.cache-hit != 'true'
run: |
git clone https://github.com/microsoft/vcpkg
./vcpkg/bootstrap-vcpkg.sh -disableMetrics
mkdir -p ${{env.VCPKG_DEFAULT_BINARY_CACHE}}
- name: Generate build files
run: |
mkdir build && cd build
cmake .. -GNinja -DCMAKE_BUILD_TYPE=Debug
- name: Build
run: ninja -C build
windows:
runs-on: windows-latest
if: contains(github.event.head_commit.message, '[skip-ci]') == false
env:
VCPKG_ROOT: ${{github.workspace}}\vcpkg
VCPKG_TARGET_TRIPLET: x64-windows-static-md
VCPKG_DEFAULT_BINARY_CACHE: ${{github.workspace}}\vcpkg\bincache
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- uses: ilammy/msvc-dev-cmd@v1.11.0
- uses: lukka/get-cmake@latest
- name: Prepare Vulkan SDK
uses: humbletim/setup-vulkan-sdk@v1.2.0
with:
vulkan-query-version: 1.3.204.0
vulkan-components: Vulkan-Headers, Vulkan-Loader
vulkan-use-cache: true
- name: Restore Vcpkg
uses: actions/cache@v3
id: restore-vcpkg
with:
path: |
${{env.VCPKG_ROOT}}
!${{env.VCPKG_ROOT}}\buildtrees
!${{env.VCPKG_ROOT}}\packages
!${{env.VCPKG_ROOT}}\downloads
!${{env.VCPKG_ROOT}}\installed
key: glow-windows-vcpkg-${{hashFiles('vcpkg.json')}}
- name: Install Vcpkg
if: steps.restore-vcpkg.outputs.cache-hit != 'true'
run: |
git clone https://github.com/microsoft/vcpkg
.\vcpkg\bootstrap-vcpkg.bat -disableMetrics
mkdir -p ${{env.VCPKG_DEFAULT_BINARY_CACHE}}
- name: Generate build files
run: |
mkdir build
cd build
cmake .. -GNinja `
-DCMAKE_BUILD_TYPE=Debug `
-DVCPKG_TARGET_TRIPLET=${{env.VCPKG_TARGET_TRIPLET}}
- name: Build
run: ninja -C build