Get Android CMake build working #36
Workflow file for this run
This file contains 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
# Copyright (c) 2023 Valve Corporation | |
# Copyright (c) 2023 LunarG, Inc. | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# | |
# Unless required by applicable law or agreed to in writing, software | |
# distributed under the License is distributed on an "AS IS" BASIS, | |
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
# See the License for the specific language governing permissions and | |
# limitations under the License. | |
name: ci | |
on: | |
push: | |
pull_request: | |
branches: | |
- main | |
jobs: | |
linux: | |
name: ${{ matrix.config.name }} | |
runs-on: ${{ matrix.config.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
config: | |
- { | |
name: "Ubuntu GCC Debug", | |
os: ubuntu-latest, | |
type: "Debug", | |
build_dir: "build", | |
cc: "gcc", cxx: "g++" | |
} | |
- { | |
name: "Ubuntu Clang Debug", | |
os: ubuntu-latest, | |
type: "Debug", | |
build_dir: "build", | |
cc: "clang", cxx: "clang++" | |
} | |
steps: | |
- name: Install Qt | |
uses: jurplel/install-qt-action@v3 | |
- name: Clone repository | |
uses: actions/checkout@v3 | |
- name: Install build dependencies | |
run: | | |
sudo apt-get -qq update | |
sudo apt-get install -y libxkbcommon-dev libwayland-dev libxrandr-dev qtbase5-dev\ | |
libx11-xcb-dev libxcb-randr0-dev cmake jq wget | |
- name: Build and Test VulkanTools | |
run: python3 scripts/github_ci_linux.py --config ${{ matrix.config.type }} | |
env: | |
CC: ${{matrix.config.cc}} | |
CXX: ${{matrix.config.cxx}} | |
windows: | |
runs-on: ${{matrix.os}} | |
strategy: | |
fail-fast: false | |
matrix: | |
arch: [ x64 ] | |
config: [ Debug ] | |
os: [ windows-latest, windows-2019 ] | |
steps: | |
- name: Install Qt | |
uses: jurplel/install-qt-action@v3 | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.7' | |
- name: Build and Test VulkanTools | |
run: python3 scripts/github_ci_win.py --config ${{ matrix.config }} --arch ${{ matrix.arch }} | |
android: | |
runs-on: ubuntu-22.04 | |
strategy: | |
matrix: | |
abi: [ arm64-v8a , armeabi-v7a ] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: ndk-build | |
run: python scripts/github_ci_android.py --abi ${{ matrix.abi }} | |
android-cmake: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.8' | |
- uses: lukka/get-cmake@latest | |
- name: Configure | |
run: | | |
cmake -S . -B build/ --toolchain $ANDROID_NDK_ROOT/build/cmake/android.toolchain.cmake \ | |
-D ANDROID_PLATFORM=26 \ | |
-D CMAKE_ANDROID_ARCH_ABI=arm64-v8a \ | |
-D CMAKE_ANDROID_STL_TYPE=c++_static \ | |
-D ANDROID_USE_LEGACY_TOOLCHAIN_FILE=NO \ | |
-D CMAKE_BUILD_TYPE=Release \ | |
-D UPDATE_DEPS=ON \ | |
-G "Ninja" | |
- name: Build | |
run: cmake --build build | |
- name: Install | |
run: cmake --install build --prefix build/install | |