File: build-linux-macos.yml

package info (click to toggle)
gle-graphics 4.3.9-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 9,688 kB
  • sloc: cpp: 78,109; sh: 161; python: 150; makefile: 68; perl: 46; ansic: 1
file content (81 lines) | stat: -rw-r--r-- 2,643 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
#
# -- Linux and macOS build
#     no manual or installer creation
#     runs on commit
#     binary installation folder saved
#
name: Build Linux and macOS
on:
  workflow_dispatch:
  #pull_request:
  #push:
  #  branches: [main]
jobs:
  build:
    name: Build on ${{ matrix.os }}
    strategy:
      fail-fast: false
      matrix:
        os: [macos-latest, ubuntu-latest]
        build_type: [Release]
        c_compiler: [gcc]
    runs-on: ${{ matrix.os }}
    defaults:
      run:
        shell: bash
    steps:
    - name: Checkout
      uses: actions/checkout@v4
    - name: Install dependencies
      run: |
        set -x
        touch configure.args

        case $RUNNER_OS in
          Linux)
            sudo apt-get update
            sudo apt-get install cmake freeglut3-dev libboost-dev libcairo-dev libdeflate-dev \
                libgs-dev libjpeg-turbo8-dev liblzma-dev libpixman-1-dev libpng-dev libtiff-dev \
                libz-dev qt6-base-dev libpoppler-dev libpoppler-cpp-dev libpoppler-glib-dev \
                libpoppler-qt6-dev libglib2.0-dev extra-cmake-modules ghostscript dpkg-dev
            jobs=$(nproc)
            ;;
          macOS)
            # liblzma and libz are already in macOS.
            # cmake is preinstalled with Homebrew on GitHub Actions runners and
            # trying to install it again produces an unintelligible warning.
            brew install --quiet boost cairo ghostscript jpeg-turbo \
                libdeflate libpng libtiff pixman qt zstd poppler glib extra-cmake-modules
            echo "-D Qt6_DIR=$(brew --prefix qt)/lib/cmake/Qt6" >> configure.args
            ls -la /opt/homebrew/opt/ghostscript/lib
            jobs=$(sysctl -n hw.activecpu)
            ;;
          *)
            jobs=1
        esac

        echo "--parallel $jobs" >> build.args
    - name: Configure cmake
      run: >
        xargs -t < configure.args cmake -S src -B build
        -DCMAKE_BUILD_TYPE=Release
        -DBUILD_TESTS=ON
    - name: Build GLE
      run: |
        case $RUNNER_OS in
          macOS)
            export DYLD_LIBRARY_PATH=/opt/homebrew/opt/ghostscript/lib:$DYLD_LIBRARY_PATH
          ;;
        esac
        xargs -t < build.args cmake --build build --config Release
    - name: Install GLE
      run: |
        DESTDIR=destroot cmake --install build --config Release
    - name: Upload Artifacts - GLE Binaries
      uses: actions/upload-artifact@v4.4.3
      with:
        name: GLE Binary Executables ${{ runner.os }}
        path: ${{github.workspace}}/destroot/usr/local
        if-no-files-found: warn
        retention-days: 0
        compression-level: 0