Updated meshoptimizer
to v0.22
#555
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
name: C/C++ CI | |
on: | |
push: | |
branches: [ "**" ] | |
pull_request: | |
branches: [ "**" ] | |
# https://github.com/git-lfs/git-lfs/issues/5749 | |
env: | |
GIT_CLONE_PROTECTION_ACTIVE: false | |
jobs: | |
build: | |
name: "Android (Ubuntu)" | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Set up NDK | |
uses: nttld/[email protected] | |
with: | |
ndk-version: r26b | |
- name: Set up JDK | |
uses: actions/setup-java@v4 | |
with: | |
java-version: 17 | |
distribution: 'oracle' | |
- name: Install Ubuntu packages | |
shell: bash | |
run: | | |
sudo sed -i 's/azure\.//' /etc/apt/sources.list | |
sudo apt-get update | |
sudo apt-get install -y cmake gcc-12 clang-15 xorg-dev libxinerama-dev libxcursor-dev libgles2-mesa-dev libegl1-mesa-dev libglfw3-dev libglew-dev libstdc++-12-dev extra-cmake-modules libxkbcommon-x11-dev wayland-protocols | |
- name: Prepare Vulkan SDK | |
uses: humbletim/[email protected] | |
with: | |
vulkan-query-version: 1.3.275.0 | |
vulkan-components: Vulkan-Headers, Vulkan-Loader | |
vulkan-use-cache: true | |
- name: Generate Android projects | |
shell: bash | |
env: | |
CC: "clang-15" | |
CXX: "clang++-15" | |
run: | | |
cmake -G "Unix Makefiles" -S "${{ github.workspace }}" -B build -DLVK_WITH_SAMPLES_ANDROID=ON | |
- name: Assemble Tiny_Mesh APK | |
run: | | |
cd build/android/Tiny_Mesh | |
chmod +x ./gradlew | |
./gradlew assembleDebug | |
- name: Assemble Tiny_MeshLarge APK | |
run: | | |
cd build/android/Tiny_MeshLarge | |
chmod +x ./gradlew | |
./gradlew assembleDebug | |
- name: Assemble 003_RenderToCubeMapSinglePass APK | |
run: | | |
cd build/android/003_RenderToCubeMapSinglePass | |
chmod +x ./gradlew | |
./gradlew assembleDebug | |
cmake-build: | |
strategy: | |
fail-fast: false | |
matrix: | |
config: | |
- { | |
name: "Windows - MSVC 2022 (glslang)", | |
os: windows-latest, | |
build_type: "Debug", | |
cc: "cl", | |
cxx: "cl", | |
generators: "Visual Studio 17 2022", | |
cmake_args: "-DLVK_WITH_TRACY=ON" | |
} | |
- { | |
name: "Windows - MSVC 2022 (Slang)", | |
os: windows-latest, | |
build_type: "Debug", | |
cc: "cl", | |
cxx: "cl", | |
generators: "Visual Studio 17 2022", | |
cmake_args: "-DLVK_WITH_TRACY=ON -DLVK_WITH_SLANG=ON" | |
} | |
- { | |
name: "Ubuntu - Clang", | |
os: ubuntu-latest, | |
build_type: "Debug", | |
cc: "clang-15", | |
cxx: "clang++-15", | |
generators: "Unix Makefiles", | |
} | |
- { | |
name: "Ubuntu - Clang (Wayland)", | |
os: ubuntu-latest, | |
build_type: "Debug", | |
cc: "clang-15", | |
cxx: "clang++-15", | |
generators: "Unix Makefiles", | |
cmake_args: "-DLVK_WITH_WAYLAND=ON" | |
} | |
# - { | |
# name: "Ubuntu - GCC", | |
# os: ubuntu-latest, | |
# build_type: "Debug", | |
# cc: "gcc-12", | |
# cxx: "g++-12", | |
# generators: "Unix Makefiles" | |
# } | |
runs-on: ${{ matrix.config.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- if: startsWith(matrix.config.os, 'ubuntu') | |
run: | | |
sudo sed -i 's/azure\.//' /etc/apt/sources.list | |
sudo apt-get update | |
sudo apt-get install -y gcc-12 clang-15 xorg-dev libxinerama-dev libxcursor-dev libgles2-mesa-dev libegl1-mesa-dev libglfw3-dev libglew-dev libstdc++-12-dev extra-cmake-modules libxkbcommon-x11-dev wayland-protocols | |
sudo apt remove cmake -y | |
sudo pip install cmake --upgrade | |
- name: Prepare Vulkan SDK | |
uses: humbletim/[email protected] | |
with: | |
vulkan-query-version: 1.3.275.0 | |
vulkan-components: Vulkan-Headers, Vulkan-Loader | |
vulkan-use-cache: true | |
- name: Get the number of CPU cores | |
uses: SimenB/github-actions-cpu-cores@v2 | |
- name: Build | |
shell: bash | |
env: | |
CC: ${{ matrix.config.cc }} | |
CXX: ${{ matrix.config.cxx }} | |
run: | | |
cmake ${{ env.CMAKE_GENERATOR }} -S "${{ github.workspace }}" -B build ${{ matrix.config.cmake_args }} | |
cd build | |
cmake --build . --parallel ${{ steps.cpu-cores.outputs.count }} | |
cmake-build-macos: | |
strategy: | |
fail-fast: false | |
matrix: | |
config: | |
- { | |
name: "macOS - Clang (Xcode)", | |
os: macos-latest, | |
build_type: "Debug", | |
cc: "clang", | |
cxx: "clang++", | |
generators: "Xcode", | |
cmake_args: "-DLVK_WITH_TRACY=OFF" | |
} | |
runs-on: ${{ matrix.config.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Install Vulkan SDK | |
uses: humbletim/[email protected] | |
with: | |
version: 1.3.275.0 | |
cache: true | |
- name: Get the number of CPU cores | |
uses: SimenB/github-actions-cpu-cores@v2 | |
- name: Build | |
shell: bash | |
env: | |
CC: ${{ matrix.config.cc }} | |
CXX: ${{ matrix.config.cxx }} | |
run: | | |
cmake ${{ env.CMAKE_GENERATOR }} -S "${{ github.workspace }}" -B build ${{ matrix.config.cmake_args }} | |
cd build | |
cmake --build . --parallel ${{ steps.cpu-cores.outputs.count }} |