File: macos.yml

package info (click to toggle)
jazz2-native 3.5.0-1
  • links: PTS, VCS
  • area: contrib
  • in suites:
  • size: 16,836 kB
  • sloc: cpp: 172,557; xml: 113; python: 36; makefile: 5; sh: 2
file content (129 lines) | stat: -rw-r--r-- 3,330 bytes parent folder | download | duplicates (2)
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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
name: 'MacOS'

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
          Platform: ARM64
          Backend: GLFW

        - BuildType: Release
          Platform: ARM64
          Backend: SDL2
          
        - BuildType: Release
          Platform: x64
          Backend: GLFW

        - BuildType: Release
          Platform: x64
          Backend: SDL2

    runs-on: 'macos-latest'

    steps:
    - name: 'Checkout Repository'
      uses: actions/checkout@v4
      with:
        fetch-depth: 0

    - name: 'Configure CMake'
      run: |
        case "${{ matrix.Platform }}" in
          ARM64 ) architecture="arm64"
                  withVorbis="OFF" ;;
          x64 ) architecture="x86_64"
                withVorbis="ON" ;;
          * ) exit 1 ;;
        esac
        
        rm -f ./Content/Translations/*.po
        
        cmake -B ./_build/ -D CMAKE_BUILD_TYPE=${{ matrix.BuildType }} -D NCINE_STRIP_BINARIES=ON -D CMAKE_OSX_ARCHITECTURES="$architecture" -D NCINE_PREFERRED_BACKEND=${{ matrix.Backend }} -D NCINE_WITH_VORBIS=$withVorbis

    - name: 'Build'
      run: |
        make -j 3 -C ./_build/

    - name: 'Create Package'
      run: |
        make package -C ./_build/
        mkdir ./_package/
        cp -f ./_build/*.dmg ./_package/
        cp -f ./LICENSE ./_package/LICENSE
        
    - name: 'Upload Package'
      uses: actions/upload-artifact@v4
      with:
        name: Jazz2_MacOS_${{ matrix.Platform }}_${{ matrix.Backend }}
        path: ./_package/


  # Testing builds with online multiplayer
  MultiplayerPreview:
    strategy:
      fail-fast: false
      matrix:
        include:
        - BuildType: Release
          Platform: ARM64
          Backend: SDL2
          
        - BuildType: Release
          Platform: x64
          Backend: SDL2

    runs-on: 'macos-latest'

    steps:
    - name: 'Checkout Repository'
      uses: actions/checkout@v4
      with:
        fetch-depth: 0

    - name: 'Configure CMake'
      run: |
        case "${{ matrix.Platform }}" in
          ARM64 ) architecture="arm64"
                  withVorbis="OFF" ;;
          x64 ) architecture="x86_64"
                withVorbis="ON" ;;
          * ) exit 1 ;;
        esac
        
        rm -f ./Content/Translations/*.po
        
        cmake -B ./_build/ -D CMAKE_BUILD_TYPE=${{ matrix.BuildType }} -D CMAKE_OSX_ARCHITECTURES="$architecture" -D NCINE_PREFERRED_BACKEND=${{ matrix.Backend }} -D NCINE_WITH_VORBIS=$withVorbis -D DEATH_DEBUG_SYMBOLS=ON -D WITH_MULTIPLAYER=ON

    - name: 'Build'
      run: |
        make -j 3 -C ./_build/

    - name: 'Create Package'
      run: |
        make package -C ./_build/
        mkdir ./_package/
        cp -f ./_build/*.dmg ./_package/
        cp -f ./LICENSE ./_package/LICENSE
        cp -f ./Docs/Snippets/ServerConfiguration.json ./_package/Jazz2.Server.config
        
    - name: 'Upload Package'
      uses: actions/upload-artifact@v4
      with:
        name: Jazz2_MacOS_MultiplayerPreview_${{ matrix.Platform }}_${{ matrix.Backend }}
        path: ./_package/