File: emscripten.yml

package info (click to toggle)
jazz2-native 3.5.0-2
  • links: PTS, VCS
  • area: contrib
  • in suites: forky, sid
  • size: 16,912 kB
  • sloc: cpp: 172,557; xml: 113; python: 36; makefile: 5; sh: 2
file content (87 lines) | stat: -rw-r--r-- 2,112 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
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/