File: ci-macos.yml

package info (click to toggle)
js8call 2.5.2%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 24,720 kB
  • sloc: cpp: 562,651; sh: 898; python: 132; ansic: 102; makefile: 4
file content (225 lines) | stat: -rw-r--r-- 8,123 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
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
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
permissions:
  contents: read
  attestations: write
  id-token: write
  
name: CI Build for MacOS 15 Arm64 (M1 and higher)

on: 
  workflow_dispatch: 
  pull_request:
  workflow_call:
    inputs:
      build-type:
        description: 'Build type (Debug/Release)'
        required: false
        type: string
        default: 'Release'
      release-ver:
        description: 'Release Version (v2.5.0)'
        required: false
        type: string      
        default: 'v2.5.0'

env:
  # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
  BUILD_TYPE: Release

jobs:
  build_macos-latest:
    runs-on: macos-15
    permissions: write-all

    steps:
    - uses: actions/checkout@v5

    - name: Work around for /usr/local perms and see if we got called by the release action
      run: |
        sudo chown runner:admin /usr/local
        echo "inputs: ${{ inputs.release-ver }}"
        
    - name: Install dependencies (MacOS)
      run: |
        brew update
        brew install autoconf automake libtool pkgconf fdk-aac git lame libass libtool libvorbis \
          libvpx opus sdl shtool texi2html theora wget x264 x265 xvid nasm create-dmg

    - name: Create our own var with the ImageOS value for cache use
      id: which-os
      run: |
        export ImageOS=$(sw_vers -productVersion)
        echo "thisos=$ImageOS" >> $GITHUB_OUTPUT

    - name: Cache Check libusb 1.0.29
      id: cache-usb
      uses: actions/cache/restore@v4
      with:  
        path: /Users/runner/work/JS8Call-improved/JS8Call-improved/local/libusb
        key: ${{ runner.os }}-${{ steps.which-os.outputs.thisos }}-${{ runner.arch }}-libusb1029

    - name: Cache Check ffmpeg 7.1.3
      id: cache-ffmpeg
      uses: actions/cache/restore@v4
      with:
        path: /Users/runner/work/JS8Call-improved/JS8Call-improved/local/ffmpeg
        key: ${{ runner.os }}-${{ steps.which-os.outputs.thisos }}-${{ runner.arch }}-ffmpeg713

    - name: Cache Check Hamlib 4.6.5
      id: cache-hamlib
      uses: actions/cache/restore@v4
      with:
        path: /Users/runner/work/JS8Call-improved/JS8Call-improved/local/hamlib
        key: ${{ runner.os }}-${{ steps.which-os.outputs.thisos }}-${{ runner.arch }}-hamlib465

    - name: Cache Check fftw 3.3.10
      id: cache-fftw
      uses: actions/cache/restore@v4
      with:
        path: /Users/runner/work/JS8Call-improved/JS8Call-improved/local/fftw
        key: ${{ runner.os }}-${{ steps.which-os.outputs.thisos }}-${{ runner.arch }}-fftw3310

    - name: Cache Check Boost 1.88
      id: cache-boost
      uses: actions/cache/restore@v4
      with:
        path: /Users/runner/work/JS8Call-improved/JS8Call-improved/local/boost
        key: ${{ runner.os }}-${{ steps.which-os.outputs.thisos }}-${{ runner.arch }}-boost188

## libusb
    - name: Install libusb 1.0.29
      if: steps.cache-usb.outputs.cache-hit != 'true'
      id: install-usb
      run: |
        curl --location --output /tmp/v1.0.29.tar.gz https://github.com/libusb/libusb/archive/refs/tags/v1.0.29.tar.gz
        cd /tmp
        tar zxf v1.0.29.tar.gz
        cd libusb-1.0.29
        ./bootstrap.sh
        ./configure --prefix=${GITHUB_WORKSPACE}/local/libusb
        make
        make install

    - name: Save libusb cache
      if: steps.cache-usb.outputs.cache-hit != 'true'
      uses: actions/cache/save@v4
      with:
        key: ${{ runner.os }}-${{ steps.which-os.outputs.thisos }}-${{ runner.arch }}-libusb1029
        path: /Users/runner/work/JS8Call-improved/JS8Call-improved/local/libusb

## hamlib
    - name: Install Hamlib 4.6.5
      if: steps.cache-hamlib.outputs.cache-hit != 'true'
      id: install-hamlib
      run: |
        git clone --depth=1 --branch=4.6.5 https://github.com/Hamlib/Hamlib.git /tmp/hamlib
        cd /tmp/hamlib
        ./bootstrap
        ./configure --prefix=${GITHUB_WORKSPACE}/local/hamlib
        make -j 4
        make install-strip

    - name: Save Hamlib cache
      if: steps.cache-hamlib.outputs.cache-hit != 'true'
      uses: actions/cache/save@v4
      with:
        key: ${{ runner.os }}-${{ steps.which-os.outputs.thisos }}-${{ runner.arch }}-hamlib465
        path: /Users/runner/work/JS8Call-improved/JS8Call-improved/local/hamlib

 ## fftw arm64
    - name: Install fftw 3.3.10 (arm64)
      if: (steps.cache-fftw.outputs.cache-hit != 'true' && runner.arch == 'ARM64')
      id: install-fftw-arm64
      run: |
        cd /tmp
        curl --location --output /tmp/fftw-3.3.10.tar.gz https://www.fftw.org/fftw-3.3.10.tar.gz
        tar zxf fftw-3.3.10.tar.gz
        cd fftw-3.3.10
        ./configure --prefix=${GITHUB_WORKSPACE}/local/fftw --enable-threads --enable-shared --enable-neon --enable-float
        make
        make install

    - name: Save fftw 3.3.10 cache
      if: (steps.cache-fftw.outputs.cache-hit != 'true' && runner.arch == 'ARM64')
      uses: actions/cache/save@v4
      with:
        key: ${{ runner.os }}-${{ steps.which-os.outputs.thisos }}-${{ runner.arch }}-fftw3310
        path: /Users/runner/work/JS8Call-improved/JS8Call-improved/local/fftw

## boost
    - name: Install Boost 1.88
      if: steps.cache-boost.outputs.cache-hit != 'true'
      id: install-boost
      run: |
        cd /tmp
        curl --location --output /tmp/boost-1.88.0.tar.gz https://archives.boost.io/release/1.88.0/source/boost_1_88_0.tar.gz
        tar zxf boost-1.88.0.tar.gz
        cd boost_1_88_0
        ./bootstrap.sh --prefix=${GITHUB_WORKSPACE}/local/boost
        ./b2 install

    - name: Save Boost 1.88 cache
      if: steps.cache-boost.outputs.cache-hit != 'true'
      uses: actions/cache/save@v4
      with:
        key: ${{ runner.os }}-${{ steps.which-os.outputs.thisos }}-${{ runner.arch }}-boost188
        path: /Users/runner/work/JS8Call-improved/JS8Call-improved/local/boost
        
## ffmpeg
    - name: Install ffmpeg 7.1.3
      if: steps.cache-ffmpeg.outputs.cache-hit != 'true'
      id: install-ffmpeg
      run: |
        git clone --depth=1 --branch n7.1.3 https://git.ffmpeg.org/ffmpeg.git /tmp/ffmpeg
        mkdir -p /tmp/ffmpeg/build
        cd /tmp/ffmpeg/build
        ../configure --prefix=${GITHUB_WORKSPACE}/local/ffmpeg --enable-shared --enable-static --disable-doc --enable-network
        make install

    - name: Save ffmpeg cache
      if: steps.cache-ffmpeg.outputs.cache-hit != 'true'
      uses: actions/cache/save@v4
      with:
        key: ${{ runner.os }}-${{ steps.which-os.outputs.thisos }}-${{ runner.arch }}-ffmpeg713
        path: /Users/runner/work/JS8Call-improved/JS8Call-improved/local/ffmpeg

# QT 6.9.3 via installer
    - name: Install Qt 6.9.3
      uses: jurplel/install-qt-action@v4
      with:
        cache: true
        aqtversion: '==3.1.*'
        version: '6.9.3'
        host: 'mac'
        target: 'desktop'
        arch: 'clang_64'
        modules: 'qtmultimedia qtserialport'
        archives: 'qtsvg qtdeclarative qtbase'

    - name: Build JS8Call
      run: |
        mkdir -p ./build && cd ./build
        cmake -DCMAKE_PREFIX_PATH="${GITHUB_WORKSPACE}/local/qt693-install;${GITHUB_WORKSPACE}/local/hamlib;${GITHUB_WORKSPACE}/local/fftw;${GITHUB_WORKSPACE}/local/boost;${GITHUB_WORKSPACE}/local/libusb" ..
        make

    - name: Create DMG
      run: create-dmg "JS8Call-improved.dmg" "build/JS8Call.app"
      
    - name: Attestation (Release Only)
      if: ${{ inputs.release-ver }}
      uses: actions/attest-build-provenance@v3
      with:
        subject-path: '${{ github.workspace }}/JS8Call-improved.dmg'
        
    - name: Upload Artifact (Release build)
      if: ${{ inputs.release-ver }}
      uses: actions/upload-artifact@v5
      with:
        name: "JS8call-improved_${{ inputs.release-ver }}_${{ runner.arch }}_macos15.dmg"
        path: /Users/runner/work/JS8Call-improved/JS8Call-improved/JS8Call-improved.dmg

    - name: Upload Artifact (CI build)
      if: ${{ !inputs.release-ver }}
      uses: actions/upload-artifact@v5
      with:
        name: "JS8call-improved_devel_${{ runner.arch }}_macos15.dmg"
        path: /Users/runner/work/JS8Call-improved/JS8Call-improved/JS8Call-improved.dmg