JANITORIAL: fixed compiler warnings #3287
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: Build | |
env: | |
VCPKG_DEFAULT_TRIPLET: 'x64-windows-static' | |
on: | |
push: | |
branches: | |
- master | |
tags: | |
- '*' | |
pull_request: | |
branches: | |
- master | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
mac: | |
timeout-minutes: 60 | |
runs-on: macos-12 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup | |
run: brew install sdl2 jpeg-turbo python curl glslang ninja ccache pkg-config | |
- name: ccache | |
uses: actions/cache@v4 | |
with: | |
path: | | |
~/.ccache | |
key: ${{ runner.os }}-${{ secrets.CACHE_VERSION }}-build-${{ hashFiles('**/CMakeLists.txt') }} | |
restore-keys: ${{ runner.os }}-${{ secrets.CACHE_VERSION }}-build-${{ hashFiles('**/CMakeLists.txt') }} | |
- name: Build | |
run: | | |
mkdir build | |
cd build | |
cmake .. -GNinja -DCMAKE_BUILD_TYPE=Release -DCMAKE_UNITY_BUILD=On -DUSE_SANITIZERS=ON | |
cmake --build . | |
- name: Test | |
run: | | |
cd build | |
ctest -V -E shelltests . | |
- name: Package | |
run: | | |
cd build | |
cmake --build . --target package | |
- name: Upload the dmg | |
uses: actions/upload-artifact@v4 | |
with: | |
name: mac-dmg | |
path: build/*.dmg | |
- name: Upload the voxedit app | |
uses: actions/upload-artifact@v4 | |
with: | |
name: mac-vengi-voxedit-app | |
path: build/voxedit/vengi-voxedit.app | |
- name: Upload the voxconvert app | |
uses: actions/upload-artifact@v4 | |
with: | |
name: mac-vengi-voxconvert-app | |
path: build/voxconvert/vengi-voxconvert.app | |
- name: Upload the thumbnailer app | |
uses: actions/upload-artifact@v4 | |
with: | |
name: mac-vengi-thumbnailer-app | |
path: build/thumbnailer/vengi-thumbnailer.app | |
packages: | |
timeout-minutes: 45 | |
if: github.repository == 'vengi-voxel/vengi' | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup | |
run: | | |
sudo apt-get update | |
sudo apt-get install make cmake debhelper devscripts build-essential lintian binutils-dev libunwind-dev libjpeg-dev libfreetype-dev liblua5.4-dev libcurl4-gnutls-dev libsdl2-dev wayland-protocols pkg-config python3 ccache python3-dateutil dh-cmake ninja-build | |
- name: ccache | |
uses: actions/cache@v4 | |
with: | |
path: | | |
~/.ccache | |
key: ${{ runner.os }}-${{ secrets.CACHE_VERSION }}-build-${{ hashFiles('**/CMakeLists.txt') }} | |
restore-keys: ${{ runner.os }}-${{ secrets.CACHE_VERSION }}-build-${{ hashFiles('**/CMakeLists.txt') }} | |
- name: Ubuntu | |
run: | | |
make deb | |
mv ../*.deb . | |
- name: Upload the ubuntu artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: linux-debian | |
path: vengi*.deb | |
- name: Upload the ubuntu release artifacts | |
if: startsWith(github.ref, 'refs/tags/') | |
uses: Roang-zero1/github-upload-release-artifacts-action@master | |
with: | |
args: vengi*.deb | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
linux-ui-tests: | |
timeout-minutes: 60 | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup | |
run: | | |
sudo apt-get update | |
sudo apt-get install binutils-dev libunwind-dev libfreetype-dev liblua5.4-dev libcurl4-gnutls-dev libsdl2-dev wayland-protocols pkg-config ninja-build python3 ccache curl lua-check libjpeg-dev | |
- name: ccache | |
uses: actions/cache@v4 | |
with: | |
path: | | |
~/.ccache | |
key: ${{ runner.os }}-${{ secrets.CACHE_VERSION }}-build-${{ hashFiles('**/CMakeLists.txt') }} | |
restore-keys: ${{ runner.os }}-${{ secrets.CACHE_VERSION }}-build-${{ hashFiles('**/CMakeLists.txt') }} | |
- name: Linux | |
env: | |
CC: gcc-12 | |
CXX: g++-12 | |
run: | | |
mkdir build | |
cd build | |
cmake .. -DCMAKE_BUILD_TYPE=Release -GNinja -DUSE_SANITIZERS=OFF -DUSE_LINK_TIME_OPTIMIZATION=OFF -DCMAKE_UNITY_BUILD=On -DCMAKE_DISABLE_PRECOMPILE_HEADERS=On -DUSE_IMGUITESTENGINE=On | |
cmake --build . --target codegen | |
cmake --build . --target tests-voxedit | |
linux: | |
timeout-minutes: 60 | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup | |
run: | | |
sudo apt-get update | |
sudo apt-get install appstream libfuse2 binutils-dev libunwind-dev libfreetype-dev liblua5.4-dev libcurl4-gnutls-dev libsdl2-dev wayland-protocols pkg-config ninja-build python3 ccache curl lua-check libjpeg-dev | |
- name: ccache | |
uses: actions/cache@v4 | |
with: | |
path: | | |
~/.ccache | |
key: ${{ runner.os }}-${{ secrets.CACHE_VERSION }}-build-${{ hashFiles('**/CMakeLists.txt') }} | |
restore-keys: ${{ runner.os }}-${{ secrets.CACHE_VERSION }}-build-${{ hashFiles('**/CMakeLists.txt') }} | |
- name: Linux | |
env: | |
CC: gcc-12 | |
CXX: g++-12 | |
run: | | |
mkdir build | |
cd build | |
cmake .. -DCMAKE_BUILD_TYPE=Release -GNinja -DUSE_SANITIZERS=OFF -DUSE_LINK_TIME_OPTIMIZATION=OFF -DCMAKE_UNITY_BUILD=On -DCMAKE_DISABLE_PRECOMPILE_HEADERS=On | |
cmake --build . | |
cmake --install . --component voxedit --prefix install-voxedit/usr | |
- name: Test | |
run: | | |
cd build | |
ctest -V . | |
- name: luacheck | |
run: | | |
cd src | |
luacheck --codes . | |
- name: AppImage | |
run: | | |
curl https://github.com/linuxdeploy/linuxdeploy/releases/download/1-alpha-20220822-1/linuxdeploy-x86_64.AppImage --output linuxdeploy-x86_64.AppImage --silent -L -f | |
chmod +x linuxdeploy-x86_64.AppImage | |
./linuxdeploy-x86_64.AppImage --output=appimage --appdir build/install-voxedit | |
- name: Upload voxedit AppImage artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: linux-appimage-voxedit | |
path: "voxedit*.AppImage" | |
emscripten: | |
timeout-minutes: 60 | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup | |
run: | | |
sudo apt-get update | |
sudo apt-get install libfreetype-dev libjpeg-dev liblua5.4-dev libsdl2-dev wayland-protocols pkg-config ninja-build python3 ccache | |
- uses: mymindstorm/setup-emsdk@v13 | |
with: | |
version: 3.1.40 | |
- name: ccache | |
uses: actions/cache@v4 | |
with: | |
path: | | |
~/.ccache | |
key: ${{ runner.os }}-${{ secrets.CACHE_VERSION }}-emscripten-build-${{ hashFiles('**/CMakeLists.txt') }} | |
restore-keys: ${{ runner.os }}-${{ secrets.CACHE_VERSION }}-emscripten-build-${{ hashFiles('**/CMakeLists.txt') }} | |
- name: Emscripten | |
run: | | |
cmake -H. -Bbuild -GNinja -DUSE_SANITIZERS=ON | |
cmake --build build --target codegen | |
mkdir -p build/emscripten | |
cp -r build/generated build/emscripten | |
emcmake cmake -H. -Bbuild/emscripten -GNinja -DCMAKE_BUILD_TYPE=Release -DCMAKE_UNITY_BUILD=ON -DCMAKE_DISABLE_PRECOMPILE_HEADERS=On | |
cmake --build build/emscripten --target voxedit | |
- name: Upload the build artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: emscripten | |
path: build/emscripten/voxedit | |
windows: | |
timeout-minutes: 45 | |
runs-on: windows-2019 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Build | |
run: | | |
mkdir build | |
cd build | |
cmake .. -DCMAKE_BUILD_TYPE=Release | |
cmake --build . | |
- name: Test | |
run: | | |
cd build | |
ctest -V -C Release . | |
- name: Install | |
run: | | |
cd build | |
cmake --install . --component voxedit --prefix voxedit-install | |
cmake --install . --component thumbnailer --prefix thumbnailer-install | |
cmake --install . --component voxelthumb --prefix thumbnailer-install | |
cmake --install . --component voxconvert --prefix voxconvert-install | |
cmake --install . --component voxconvertui --prefix voxconvert-install | |
cpack | |
- name: Upload the cpack logs | |
uses: actions/upload-artifact@v4 | |
if: ${{ failure() }} | |
with: | |
name: nsis-error-logs | |
path: build/_CPack_Packages/Windows/NSIS/NSISOutput.log | |
- name: Upload the vengi msi | |
uses: actions/upload-artifact@v4 | |
with: | |
name: win-vengi-msi | |
path: build/vengi.msi | |
- name: Upload the voxedit artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: win-voxedit | |
path: build/voxedit-install/ | |
- name: Upload the tests artifacts | |
uses: actions/upload-artifact@v4 | |
if: ${{ failure() }} | |
with: | |
name: windows-release-tests | |
path: build/tests-*/* | |
- name: Upload the voxconvert artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: win-voxconvert | |
path: build/voxconvert-install/ | |
- name: Upload the thumbnailer artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: win-thumbnailer | |
path: build/thumbnailer-install/ | |
windows-debug: | |
timeout-minutes: 45 | |
runs-on: windows-2019 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Build | |
run: | | |
mkdir build | |
cd build | |
cmake .. -DCMAKE_BUILD_TYPE=Debug -DUSE_SANITIZERS=ON | |
cmake --build . | |
- name: Install | |
run: | | |
cd build | |
cmake --install . --component voxedit --prefix voxedit-install | |
cmake --install . --component thumbnailer --prefix thumbnailer-install | |
cmake --install . --component voxelthumb --prefix thumbnailer-install | |
cmake --install . --component voxconvert --prefix voxconvert-install | |
cmake --install . --component voxconvertui --prefix voxconvert-install | |
- name: Upload the voxedit artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: win-voxedit-debug | |
path: build/voxedit-install/ | |
- name: Upload the voxconvert artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: win-voxconvert-debug | |
path: build/voxconvert-install/ | |
windows-msys: | |
timeout-minutes: 45 | |
runs-on: windows-2022 | |
defaults: | |
run: | |
shell: msys2 {0} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup | |
uses: msys2/setup-msys2@v2 | |
with: | |
msystem: mingw64 | |
pacboy: >- | |
gcc:p | |
cmake:p | |
ccache:p | |
mbedtls:p | |
freetype:p | |
ninja:p | |
SDL2:p | |
- name: Build | |
run: | | |
mkdir build | |
cd build | |
cmake .. -DCMAKE_BUILD_TYPE=Release | |
cmake --build . | |
- name: Install | |
run: | | |
cd build | |
cmake --install . --component voxedit --prefix voxedit-install | |
cmake --install . --component thumbnailer --prefix thumbnailer-install | |
cmake --install . --component voxelthumb --prefix thumbnailer-install | |
cmake --install . --component voxconvert --prefix voxconvert-install | |
cmake --install . --component voxconvertui --prefix voxconvert-install | |
- name: Upload the voxedit artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: win-voxedit-msys-release | |
path: build/voxedit-install/ | |
- name: Upload the voxconvert artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: win-voxconvert-msys-release | |
path: build/voxconvert-install/ |