1 # Copyright (c) 2021 Valve Corporation
2 # Copyright (c) 2021 LunarG, Inc.
4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at
8 # http://www.apache.org/licenses/LICENSE-2.0
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
16 # Author: Jeremy Kniager <jeremyk@lunarg.com>
28 runs-on: ${{matrix.os}}
34 config: [ Debug, Release ]
35 os: [ ubuntu-18.04, ubuntu-20.04 ]
36 cube_wsi: [ XCB, XLIB, WAYLAND, DISPLAY ]
46 - uses: actions/checkout@v2
47 - uses: actions/setup-python@v2
51 sudo apt-get -qq update
52 sudo apt install libxkbcommon-dev libwayland-dev libmirclient-dev libxrandr-dev libx11-xcb-dev wayland-protocols
54 - name: Fetch and install headers
55 run: python scripts/update_deps.py --dir external
57 - name: Generate build files
58 run: cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=${{matrix.config}} -DCUBE_WSI_SELECTION=${{matrix.cube_wsi}} -Cexternal/helper.cmake
63 - name: Build the tools
66 - name: Verify generated source files
67 run: python scripts/generate_source.py --verify external/Vulkan-Headers/build/install/share/vulkan/registry
70 runs-on: ${{matrix.os}}
75 config: [ Debug, Release ]
76 os: [ windows-latest ]
79 - uses: actions/checkout@v2
80 - uses: actions/setup-python@v2
84 - name: Fetch and install headers
85 run: python scripts/update_deps.py --dir external
87 - name: Generate build files
88 run: cmake -S. -Bbuild -A${{matrix.arch}} "-Cexternal/helper.cmake"
90 - name: Build the tools
91 run: cmake --build ./build --config ${{matrix.config}}
93 - name: Verify generated source files
94 run: python scripts/generate_source.py --verify external/Vulkan-Headers/build/install/share/vulkan/registry
101 config: [ Debug, Release ]
104 - uses: actions/checkout@v2
105 - uses: actions/setup-python@v2
107 python-version: '3.7'
108 - name: Install Ninja
109 run: brew install ninja
110 - name: Cache dependencies
112 uses: actions/cache@v3
114 cache-name: cache-macos-latest
117 external/Vulkan-Headers/build/install
119 external/Vulkan-Loader/build/install
120 key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.config }}-${{ hashfiles('scripts/known_good.json') }}
122 - name: Fetch/Update dependencies
123 run: python scripts/update_deps.py --dir external --skip-existing-install
125 - name: Generate build files
126 run: cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=${{matrix.config}} -Cexternal/helper.cmake -G "Ninja"
128 # Specify the minimum version of macOS on which the target binaries are to be deployed.
129 # https://cmake.org/cmake/help/latest/envvar/MACOSX_DEPLOYMENT_TARGET.html
130 MACOSX_DEPLOYMENT_TARGET: 10.12
132 - name: Build the tools
133 run: cmake --build build
135 - name: Verify generated source files
136 run: python scripts/generate_source.py --verify external/Vulkan-Headers/build/install/share/vulkan/registry
139 runs-on: ubuntu-18.04
143 config: [ Debug, Release ]
146 - uses: actions/checkout@v2
148 - name: Get depot tools
150 git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git depot_tools
151 echo "$GITHUB_WORKSPACE/depot_tools" >> $GITHUB_PATH
152 - name: Fetch and install headers
153 run: ./build-gn/update_deps.sh
155 - name: Generate build files
156 run: gn gen out/${{matrix.config}} --args="is_debug=true"
157 if: matrix.config != 'Release'
159 - name: Generate build files
160 run: gn gen out/${{matrix.config}} --args="is_debug=false"
161 if: matrix.config == 'Release'
163 - name: Build the tools
164 run: ninja -C out/${{matrix.config}}
167 runs-on: ubuntu-20.04
169 - uses: actions/checkout@v2
170 - name: Setup Environment
172 echo "ANDROID_SDK_HOME=$ANDROID_SDK_ROOT" >> $GITHUB_ENV
173 echo "ANDROID_NDK_HOME=$ANDROID_NDK_LATEST_HOME" >> $GITHUB_ENV
174 echo "$ANDROID_SDK_ROOT/build-tools/31.0.0" >> $GITHUB_PATH
175 echo "$ANDROID_NDK_LATEST_HOME" >> $GITHUB_PATH
176 $ANDROID_SDK_ROOT/tools/bin/sdkmanager "platforms;android-23"
177 keytool -genkey -v -keystore $HOME/.android/debug.keystore -storepass android -alias androiddebugkey -keypass android -keyalg RSA -keysize 2048 -validity 10000 -dname "C=US, O=Android, CN=Android Debug"