File: linux_legacy.yml_

package info (click to toggle)
jazz2-native 3.3.0-1
  • links: PTS, VCS
  • area: contrib
  • in suites:
  • size: 16,008 kB
  • sloc: cpp: 162,929; xml: 111; python: 31; makefile: 5; sh: 2
file content (80 lines) | stat: -rw-r--r-- 2,341 bytes parent folder | download | duplicates (3)
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
name: 'Linux (Legacy)'

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: x64
          Backend: GLFW
          CC: gcc
          CXX: g++

        - BuildType: Release
          Platform: x64
          Backend: SDL2
          CC: gcc
          CXX: g++

    runs-on: 'ubuntu-20.04'

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

    - name: 'Create Build Environment'
      run: |
        sudo apt update -y
        sudo apt install -y cmake curl g++ libgl1-mesa-dev libglew-dev libglfw3-dev libsdl2-dev libopenal-dev libopenmpt-dev libcurl4-openssl-dev rpm

    - name: 'Configure CMake'
      run: |
        export CC=${{ matrix.CC }}
        export CXX=${{ matrix.CXX }}
        
        rm -f ./Content/Translations/*.po
        
        cmake -B ./_build/ -D CMAKE_BUILD_TYPE=${{ matrix.BuildType }} -D NCINE_STRIP_BINARIES=ON -D NCINE_PREFERRED_BACKEND=${{ matrix.Backend }} -D NCINE_ASSEMBLE_DEB=ON -D NCINE_ASSEMBLE_RPM=ON -D NCINE_DOWNLOAD_DEPENDENCIES=OFF -D NCINE_WITH_GLEW=OFF

    - name: 'Build'
      run: |
        make -j $(nproc) -C ./_build/

    - name: 'Create Package'
      run: |
        make package -C ./_build/
        mkdir ./_package/
        cp -f ./_build/jazz2 ./_package/jazz2
        cp -f ./_build/*.deb ./_package/jazz2.deb
        cp -f ./_build/*.rpm ./_package/jazz2.rpm
        cp -f -r ./Content/ ./_package/Content/
        cp -f ./LICENSE ./_package/LICENSE
        
        case "${{ matrix.CC }}" in
          gcc ) artifactPath="Jazz2_Linux_${{ matrix.Platform }}_${{ matrix.Backend }}_Legacy" ;;
          clang ) artifactPath="Jazz2_Linux_${{ matrix.Platform }}_${{ matrix.Backend }}_LegacyClang" ;;
          * ) artifactPath="Jazz2_Linux_${{ matrix.Platform }}_${{ matrix.Backend }}_Legacy${{ matrix.CC }}" ;;
        esac
        echo "artifactPath=$artifactPath" >> $GITHUB_ENV
        
    - name: 'Upload Package'
      uses: actions/upload-artifact@v4
      with:
        name: ${{ env.artifactPath }}
        path: ./_package/