Skip to content

Pr/windows

Pr/windows #2925

Workflow file for this run

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-11
steps:
- uses: actions/checkout@v4
- name: Setup
run: brew install sdl2 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 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:
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
- 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
cmake --install . --component voxbrowser --prefix install-voxbrowser/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
./linuxdeploy-x86_64.AppImage --output=appimage --appdir build/install-voxbrowser
- name: Upload voxedit AppImage artifacts
uses: actions/upload-artifact@v4
with:
name: linux-appimage-voxedit
path: "voxedit*.AppImage"
- name: Upload voxbrowser AppImage artifacts
uses: actions/upload-artifact@v4
with:
name: linux-appimage-voxbrowser
path: "voxbrowser*.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 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 voxconvert --prefix voxconvert-install
cmake --install . --component voxbrowser --prefix voxbrowser-install
cpack
- 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 voxbrowser artifacts
uses: actions/upload-artifact@v4
with:
name: win-voxbrowser
path: build/voxbrowser-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 voxconvert --prefix voxconvert-install
cmake --install . --component voxbrowser --prefix voxbrowser-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/
- name: Upload the voxbrowser artifacts
uses: actions/upload-artifact@v4
with:
name: win-voxbrowser-debug
path: build/voxedit-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 voxconvert --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/