foo #202
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: main | |
on: [ push, pull_request, workflow_dispatch ] | |
jobs: | |
cmake: | |
strategy: | |
matrix: | |
os: [ ubuntu-latest ] | |
profile: [ "Debug", "Release" ] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Get number of CPU cores | |
uses: SimenB/github-actions-cpu-cores@v1 | |
id: cpu-cores | |
- uses: actions/checkout@v4 | |
- name: "Install Dependencies" | |
run: | | |
sudo apt-get -qq update | |
sudo apt-get -qq install --no-install-recommends \ | |
gettext \ | |
libasound2-dev \ | |
libbullet-dev \ | |
libgnutls28-dev \ | |
libopenxr-dev \ | |
libqscintilla2-qt5-dev \ | |
libsdl2-dev \ | |
libvorbis-dev \ | |
libvulkan-dev \ | |
libwayland-dev \ | |
libxcursor-dev \ | |
libxkbcommon-dev \ | |
libxrandr-dev \ | |
qtbase5-dev | |
# Disabled due to warnings that break the debug build with -Werror | |
# libode-dev | |
# libavcodec-dev libavformat-dev libavutil-dev libswscale-dev | |
- name: "Configure: ${{ matrix.profile }}" | |
run: | | |
cmake -B build_${{ matrix.profile }} -DCMAKE_BUILD_TYPE=${{ matrix.profile }} | |
- name: "Build: ${{ matrix.profile }}" | |
run: | | |
cmake --build build_${{ matrix.profile }} --parallel ${{ steps.cpu-cores.outputs.count }} | |
make: | |
strategy: | |
matrix: | |
include: | |
#- fte_target: web | |
# targets: "gl-rel" | |
# os: ubuntu-latest | |
- fte_target: linux64 | |
targets: "gl-rel vk-rel plugins-rel sv-rel qtv-rel qcc-rel" | |
os: ubuntu-latest | |
packages: "libgl-dev libxss-dev" | |
- fte_target: win32 | |
targets: "gl-rel vk-rel plugins-rel sv-rel qtv-rel qcc-rel" | |
os: ubuntu-latest | |
packages: "binutils-mingw-w64-i686 gcc-mingw-w64-i686 g++-mingw-w64-i686" | |
- fte_target: win64 | |
targets: "gl-rel vk-rel plugins-rel sv-rel qtv-rel qcc-rel" | |
os: ubuntu-latest | |
packages: "binutils-mingw-w64-x86-64 gcc-mingw-w64-x86-64 g++-mingw-w64-x86-64" | |
#- fte_target: macos | |
# targets: "gl-rel qcc-rel" | |
# extra: "ARCH=arm" | |
# os: macos-latest | |
name: make-${{ matrix.fte_target }} | |
runs-on: ${{ matrix.os }} | |
timeout-minutes: 30 | |
steps: | |
- name: Get number of CPU cores | |
uses: SimenB/github-actions-cpu-cores@v2 | |
id: cpu-cores | |
- uses: actions/checkout@v4 | |
- uses: actions/cache@v4 | |
id: cache | |
with: | |
path: engine/libs-* | |
key: ${{ runner.os }}-${{ matrix.fte_target }}-${{ hashFiles('engine/Makefile') }} | |
- uses: mymindstorm/setup-emsdk@v14 | |
with: | |
version: "2.0.12" | |
actions-cache-folder: "emsdk-cache-2.0.12" | |
if: matrix.fte_target == 'web' | |
- name: Verify emscripten | |
run: emcc -v | |
if: matrix.fte_target == 'web' | |
- name: Build ${{ matrix.fte_target }} | |
working-directory: engine | |
run: | | |
sudo apt-get -qq update && sudo apt-get -qq install --no-install-recommends ${{ matrix.packages }} | |
if: matrix.packages != '' | |
- name: Build dependencies | |
working-directory: engine | |
run: | | |
make FTE_TARGET=${{ matrix.fte_target }} makelibs | |
if: steps.cache.outputs.cache-hit != 'true' | |
- name: Build ${{ matrix.fte_target }} | |
working-directory: engine | |
run: | | |
make -j ${{ steps.cpu-cores.outputs.count }} FTE_TARGET=${{ matrix.fte_target }} ${{ matrix.targets }} | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: fteqw-${{ matrix.fte_target }} | |
path: | | |
engine/*/fte* | |
compression-level: 9 |