Skip to content

CI

CI #131

Workflow file for this run

name: CI
on:
push:
branches:
- master
tags:
- "*.*.*"
pull_request:
branches:
- master
permissions:
contents: read
jobs:
linux:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Install dependencies
run: sudo apt-get update && sudo apt-get install libsdl2-dev
- name: Configure CMake
run: cmake -S . -B build
working-directory: example/test_app
- name: Build
run: make -j 4
working-directory: example/test_app/build
- name: Cache assets bundle
id: cache-assets
uses: actions/cache@v3
with:
path: example/test_app/assets.growl
key: growl-assets-${{ hashFiles('example/test_app/assets') }}
- name: Build assets
if: ${{ steps.cache-assets.outputs.cache-hit != 'true' }}
run: ./build/growl-cmd assets bundle ./assets
working-directory: example/test_app
web:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Install dependencies
run: sudo apt-get update && sudo apt-get install libsdl2-dev
- uses: mymindstorm/setup-emsdk@v11
with:
version: 3.1.24
- name: Configure CMake
run: emcmake cmake -S . -B build
working-directory: example/test_app
- name: Cache assets bundle
uses: actions/cache@v3
id: cache-assets
with:
path: example/test_app/assets.growl
key: growl-assets-${{ hashFiles('example/test_app/assets') }}
- name: Build assets
if: ${{ steps.cache-assets.outputs.cache-hit != 'true' }}
run: |
cmake -S . -B build.linux && \
cmake --build build.linux --parallel 4 && \
./build.linux/growl-cmd assets bundle ./assets
working-directory: example/test_app
- name: Build
run: cp ../assets.growl . && make -j 4
working-directory: example/test_app/build
macOS:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Install dependencies
run: HOMEBREW_NO_AUTO_UPDATE=1 brew install cmake sdl2
- name: Configure CMake
run: cmake -S . -B build
working-directory: example/test_app
- name: Build
run: make -j 4
working-directory: example/test_app/build
windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Cache SDL2
id: cache-sdl2
uses: actions/cache@v3
with:
path: D:\SDL2-2.24.2
key: sdl2-devel-2.24.2-vc
- name: Fetch SDL2
if: ${{ steps.cache-sdl2.outputs.cache-hit != 'true' }}
shell: powershell
run: |
Invoke-RestMethod `
-Uri https://github.com/libsdl-org/SDL/releases/download/release-2.24.2/SDL2-devel-2.24.2-VC.zip `
-OutFile D:\SDL2.zip
7z x D:\SDL2.zip -oD:\
- name: Configure CMake
run: |
cmake -DSDL2_LIBRARY="D:\SDL2-2.24.2\lib\x64\SDL2.lib" `
-DSDL2_INCLUDE_DIR="D:\SDL2-2.24.2\include" `
-S . -B build
working-directory: example/test_app
- name: Build
run: cmake --build . --parallel 4
working-directory: example/test_app/build
android:
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
abi:
- "arm64-v8a"
- "armeabi-v7a"
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Configure CMake
run: |
cmake -DCMAKE_SYSTEM_NAME="Android" -DANDROID_NDK="${ANDROID_NDK}" \
-DCMAKE_ANDROID_ARCH_ABI=${{ matrix.abi }} \
-S . -B build
working-directory: example/test_app
- name: Build
run: make -j 4
working-directory: example/test_app/build
iOS:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Configure CMake
run: |
cmake -DCMAKE_SYSTEM_NAME="iOS" -GXcode \
-S . -B build
working-directory: example/test_app
- name: Build
run: |
xcodebuild -project growl-test-app.xcodeproj -target "growl-test-app" \
-configuration Debug -sdk iphoneos -parallelizeTargets \
CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO \
build
working-directory: example/test_app/build