File: MacOS.yml

package info (click to toggle)
g2clib 2.3.0-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 13,600 kB
  • sloc: ansic: 28,287; python: 76; sh: 46; makefile: 26
file content (100 lines) | stat: -rw-r--r-- 2,427 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
88
89
90
91
92
93
94
95
96
97
98
99
100
name: MacOS
on:
  push:
    branches:
    - develop
  pull_request:
    branches:
    - develop

jobs:
  MacOS:
    runs-on: macos-latest
    env:
      CC: clang

    strategy:
      fail-fast: false
      matrix:
        config:
        - {
            name: "aec_on png_on jasper_on openjpeg_off",
            options: "-DUSE_AEC=ON -DUSE_PNG=ON  -DUSE_Jasper=ON  -DUSE_OpenJPEG=OFF -DJasper_ROOT=~/jasper"
          }
        - {
            name: "aec_on png_on jasper_off openjpeg_on",
            options: "-DUSE_AEC=ON -DUSE_PNG=ON  -DUSE_Jasper=OFF -DUSE_OpenJPEG=ON"
          }

    steps:
    - name: install-dependencies
      run: |
        find /Library/Frameworks/ -name "png*"
        sudo rm -rf /Library/Frameworks/Mono.framework
        brew install libaec openjpeg jpeg-turbo

    - name: cache-jasper
      id: cache-jasper
      uses: actions/cache@v4
      with:
        path: ~/jasper
        key: jasper-${{ runner.os }}-4.0.0-macOS-2

    - name: checkout-jasper
      if: steps.cache-jasper.outputs.cache-hit != 'true'
      uses: actions/checkout@v4
      with:
        repository: jasper-software/jasper
        path: jasper
        ref: version-4.0.0

    - name: build-jasper
      if: steps.cache-jasper.outputs.cache-hit != 'true'
      run: |
        set -e
        pwd
        ls -l
        cd jasper
        mkdir cmake_build
        cd cmake_build
        cmake -DCMAKE_INSTALL_PREFIX=~/jasper ..
        make -j2
        make install

    - name: cache-png
      id: cache-png
      uses: actions/cache@v4
      with:
        path: ~/png
        key: png-${{ runner.os }}-1.6.45-macOS

    - name: build-png
      if: steps.cache-png.outputs.cache-hit != 'true'
      run: |
        wget https://github.com/glennrp/libpng/archive/refs/tags/v1.6.45.tar.gz &> /dev/null
        tar zxf v1.6.45.tar.gz
        cd libpng-1.6.45
        mkdir build
        cd build
        cmake .. -DCMAKE_INSTALL_PREFIX=~/png -DCMAKE_C_FLAGS="-Wno-implicit-function-declaration" -DPNG_ARM_NEON=off
        make -j2
        make install

    - name: checkout
      uses: actions/checkout@v4
      with:
        path: g2c

    - name: build
      run: |
        cd g2c
        mkdir build
        cd build
        cmake ${{ matrix.config.options }} ..
        make -j2 VERBOSE=1

    - name: test
      run: |
        cd $GITHUB_WORKSPACE/g2c/build
        ctest --verbose --output-on-failure --rerun-failed