File: release.yml

package info (click to toggle)
frei0r 2.5.5-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 14,952 kB
  • sloc: ansic: 177,962; cpp: 7,881; xml: 50; makefile: 36
file content (230 lines) | stat: -rw-r--r-- 8,577 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
226
227
228
229
230
name: ๐Ÿ“ข Release

on:
  workflow_run:
    workflows:
      - ๐Ÿงช Test
    types: [completed]
    branches:
      - master
      - release/**

concurrency:
  group: ${{ github.workflow }}-${{ github.ref_name }}
  cancel-in-progress: true

jobs:
  semantic-release:
    name: ๐Ÿค– Semantic release
    runs-on: ubuntu-latest
    if: "!contains(github.event.pull_request.labels.*.name, 'skip-release')"
    outputs:
      release: ${{ steps.tag_release.outputs.release }}
      version: ${{ steps.tag_release.outputs.version }}
    steps:
      - uses: actions/checkout@v6
      - name: Setup Node.js
        uses: actions/setup-node@v6
        with:
          node-version: latest
      - name: Install semantic-release
        run: |
          npm i semantic-release/changelog
      - name: Tag release
        id: tag_release
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        run: |
          npx semantic-release | tee semantic-release.log
          if [[ `git tag --points-at HEAD` == "" ]]; then
            echo "release=False" >> $GITHUB_OUTPUT
          else
            echo "release=True" >> $GITHUB_OUTPUT
            awk '/Published release/ { printf("version=v%s\n",$8) }' semantic-release.log >> $GITHUB_OUTPUT
          fi

  linux-build:
    name: ๐Ÿง linux build
    runs-on: ubuntu-latest
    needs: [semantic-release]
    if: ${{ needs.semantic-release.outputs.release == 'True' }}
    steps:
      - uses: actions/checkout@v6
      - name: apt install deps
        run: |
          sudo apt-get update -y -q
          sudo apt-get install -y -q --no-install-recommends cmake ninja-build libopencv-dev libgavl-dev libfreetype-dev libcairo-dev
      - name: Build using cmake+ninja
        run: |
          mkdir build && cd build
          cmake -G "Ninja" ../
          ninja
      - name: Upload linux filter
        uses: actions/upload-artifact@v6
        with:
          name: release-linux-filter
          path: build/src/filter/**/*.so
      - name: Upload linux mixer2
        uses: actions/upload-artifact@v6
        with:
          name: release-linux-mixer2
          path: build/src/mixer2/**/*.so
      - name: Upload linux mixer3
        uses: actions/upload-artifact@v6
        with:
          name: release-linux-mixer3
          path: build/src/mixer3/**/*.so
      - name: Upload linux generator
        uses: actions/upload-artifact@v6
        with:
          name: release-linux-generator
          path: build/src/generator/**/*.so

  win-build:
    name: ๐ŸชŸ win64 build
    runs-on: windows-latest
    needs: [semantic-release]
    if: ${{ needs.semantic-release.outputs.release == 'True' }}
    steps:
      - uses: actions/checkout@v6
      - uses: ilammy/msvc-dev-cmd@v1
      - name: choco install deps
        uses: crazy-max/ghaction-chocolatey@v3
        with:
          args: install libopencv-dev
      - name: Build using nmake
        run: |
          mkdir build && cd build
          cmake -G "NMake Makefiles" -D WITHOUT_OPENCV=1 -D WITHOUT_CAIRO=1 -D WITHOUT_GAVL=1 ../
          nmake
      - name: Upload win64 filter
        uses: actions/upload-artifact@v6
        with:
          name: release-win64-filter
          path: build/src/filter/**/*.dll
      - name: Upload win64 mixer2
        uses: actions/upload-artifact@v6
        with:
          name: release-win64-mixer2
          path: build/src/mixer2/**/*.dll
      - name: Upload win64 mixer3
        uses: actions/upload-artifact@v6
        with:
          name: release-win64-mixer3
          path: build/src/mixer3/**/*.dll
      - name: Upload win64 generator
        uses: actions/upload-artifact@v6
        with:
          name: release-win64-generator
          path: build/src/generator/**/*.dll

  osx-build:
    name: ๐Ÿ osx build
    runs-on: macos-latest
    needs: [semantic-release]
    if: ${{ needs.semantic-release.outputs.release == 'True' }}
    steps:
      - uses: actions/checkout@v6
      - name: Update Homebrew
        run: |
          brew update
      - name: Install Homebrew dependencies
        run: |
          env HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1 HOMEBREW_NO_AUTO_UPDATE=1 HOMEBREW_NO_INSTALL_CLEANUP=1 \
          brew install ninja cairo
      - name: Build using ninja
        run: |
          mkdir build && cd build
          cmake -G "Ninja"  -D WITHOUT_OPENCV=1 -D WITHOUT_GAVL=1 ../
          ninja
      - name: Upload osx filter
        uses: actions/upload-artifact@v6
        with:
          name: release-osx-filter
          path: build/src/filter/**/*.so
      - name: Upload osx mixer2
        uses: actions/upload-artifact@v6
        with:
          name: release-osx-mixer2
          path: build/src/mixer2/**/*.so
      - name: Upload osx mixer3
        uses: actions/upload-artifact@v6
        with:
          name: release-osx-mixer3
          path: build/src/mixer3/**/*.so
      - name: Upload osx generator
        uses: actions/upload-artifact@v6
        with:
          name: release-osx-generator
          path: build/src/generator/**/*.so

  draft-binary-release:
    name: ๐Ÿ“ฆ Pack release
    needs: [semantic-release, win-build, osx-build, linux-build]
    if: ${{ needs.semantic-release.outputs.release == 'True' }}
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v6
      - name: download binary artifacts
        uses: actions/download-artifact@v7
        with:
          path: |
            frei0r-bin
      - name: create compressed archives
        run: |
          dst=frei0r-${{ needs.semantic-release.outputs.version }}_win64
          mkdir -p $dst/filter $dst/generator $dst/mixer2 $dst/mixer3
          find frei0r-bin/release-win64-filter    -type f -name '*.dll' -exec cp {} $dst/filter    \;
          find frei0r-bin/release-win64-generator -type f -name '*.dll' -exec cp {} $dst/generator \;
          find frei0r-bin/release-win64-mixer2    -type f -name '*.dll' -exec cp {} $dst/mixer2    \;
          find frei0r-bin/release-win64-mixer3    -type f -name '*.dll' -exec cp {} $dst/mixer3    \;
          cp README.md $dst/README.txt
          cp COPYING   $dst/LICENSE.txt
          cp ChangeLog $dst/ChangeLog.txt
          cp AUTHORS.md   $dst/AUTHORS.txt
          cp include/frei0r.h include/frei0r.hpp $dst/
          echo "${{ needs.semantic-release.outputs.version }}" > $dst/VERSION.txt
          zip -r -9 $dst.zip $dst

          dst=frei0r-${{ needs.semantic-release.outputs.version }}_osx
          mkdir -p $dst/filter $dst/generator $dst/mixer2 $dst/mixer3
          find frei0r-bin/release-osx-filter    -type f -name '*.so' -exec cp {} $dst/filter    \;
          find frei0r-bin/release-osx-generator -type f -name '*.so' -exec cp {} $dst/generator \;
          find frei0r-bin/release-osx-mixer2    -type f -name '*.so' -exec cp {} $dst/mixer2    \;
          find frei0r-bin/release-osx-mixer3    -type f -name '*.so' -exec cp {} $dst/mixer3    \;
          cp README.md $dst/README.txt
          cp COPYING   $dst/LICENSE.txt
          cp ChangeLog $dst/ChangeLog.txt
          cp AUTHORS.md   $dst/AUTHORS.txt
          cp include/frei0r.h include/frei0r.hpp $dst/
          echo "${{ needs.semantic-release.outputs.version }}" > $dst/VERSION.txt
          zip -r -9 $dst.zip $dst

          dst=frei0r-${{ needs.semantic-release.outputs.version }}_linux
          mkdir -p $dst/filter $dst/generator $dst/mixer2 $dst/mixer3
          find frei0r-bin/release-linux-filter    -type f -name '*.so' -exec cp {} $dst/filter    \;
          find frei0r-bin/release-linux-generator -type f -name '*.so' -exec cp {} $dst/generator \;
          find frei0r-bin/release-linux-mixer2    -type f -name '*.so' -exec cp {} $dst/mixer2    \;
          find frei0r-bin/release-linux-mixer3    -type f -name '*.so' -exec cp {} $dst/mixer3    \;
          cp README.md $dst/README.txt
          cp COPYING   $dst/LICENSE.txt
          cp ChangeLog $dst/ChangeLog.txt
          cp AUTHORS.md   $dst/AUTHORS.txt
          cp include/frei0r.h include/frei0r.hpp $dst/
          echo "${{ needs.semantic-release.outputs.version }}" > $dst/VERSION.txt
          tar cvfz $dst.tar.gz $dst

          sha256sum *.zip *.tar.gz > SHA256SUMS.txt

      - name: release all archives
        uses: softprops/action-gh-release@v2
        with:
          files: |
            *.zip
            *.tar.gz
            SHA256SUMS.txt
          tag_name: ${{ needs.semantic-release.outputs.version }}
          draft: true
          prerelease: false
          fail_on_unmatched_files: true
          generate_release_notes: true