Allow source files to be found system-wide and don't hardcode /usr prefix on UNIX #846
Workflow file for this run
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: 'Emscripten' | |
on: | |
push: | |
branches: | |
- 'master' | |
pull_request: | |
types: [ opened, synchronize ] | |
workflow_dispatch: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
Build: | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- BuildType: Release | |
Backend: GLFW | |
Mode: | |
- BuildType: Release | |
Backend: SDL2 | |
Mode: | |
- BuildType: Release | |
Backend: GLFW | |
Mode: SharewareDemo | |
- BuildType: Release | |
Backend: SDL2 | |
Mode: SharewareDemo | |
runs-on: 'ubuntu-latest' | |
steps: | |
- name: 'Checkout Repository' | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: 'Install Emscripten SDK' | |
run: | | |
sudo update-alternatives --install /usr/bin/python python /usr/bin/python3 10 | |
cd .. | |
git clone https://github.com/emscripten-core/emsdk.git | |
cd emsdk | |
#EMSDK_VERSION=latest | |
EMSDK_VERSION=3.1.64 | |
./emsdk install $EMSDK_VERSION | |
./emsdk activate $EMSDK_VERSION | |
- name: 'Configure CMake' | |
run: | | |
case "${{ matrix.Mode }}" in | |
SharewareDemo ) sharewareDemo="ON" ;; | |
* ) sharewareDemo="OFF" ;; | |
esac | |
export OS=emscripten | |
export CC=emcc | |
source ../emsdk/emsdk_env.sh | |
rm -f ./Content/Translations/*.po | |
emcmake cmake -B ./_build/ -D CMAKE_BUILD_TYPE=${{ matrix.BuildType }} -D NCINE_PREFERRED_BACKEND=${{ matrix.Backend }} -D SHAREWARE_DEMO_ONLY=$sharewareDemo | |
- name: 'Build' | |
run: | | |
make -j $(nproc) -C ./_build/ | |
#- name: 'Create Package' | |
# run: | | |
# mkdir ./_package/ | |
# cp -f ./_build/jazz2 ./_package/jazz2 | |
# cp -f -r ./Content/ ./_package/Content/ | |
# | |
#- name: 'Upload Package' | |
# uses: actions/upload-artifact@v4 | |
# with: | |
# name: Jazz2_Emscripten_${{ matrix.CC }}_${{ matrix.Backend }} | |
# path: ./_package/ |