-
-
Notifications
You must be signed in to change notification settings - Fork 0
81 lines (70 loc) · 2.54 KB
/
build-release.yml
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
# CI for JUCE plugins on Windows/Linux/macOS
# github.com/fshstk (some parts based on github.com/maxwellpollack/juce-plugin-ci)
name: Build and store artifacts
on: [push, pull_request]
env:
BUILD_TYPE: Release
jobs:
build:
name: Build (${{ matrix.config.name }})
runs-on: ${{ matrix.config.os }}
permissions:
contents: write
strategy:
matrix:
config:
- { name: "macOS", os: macos-latest }
- { name: "Windows", os: windows-latest }
- { name: "Linux", os: ubuntu-latest }
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@v3
- if: ${{ runner.os == 'Linux' }}
name: Install JUCE dependencies (Linux only)
id: juce_dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
freeglut3-dev \
g++ \
libasound2-dev \
libcurl4-openssl-dev \
libfreetype6-dev \
libgtk-3-dev \
libwebkit2gtk-4.0-37 \
libwebkit2gtk-4.0-dev \
libx11-dev \
libxcomposite-dev \
libxcursor-dev \
libxinerama-dev \
libxrandr-dev \
mesa-common-dev
- name: Configure
run: cmake -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} -B build
- name: Build
working-directory: build
run: cmake --build . --config ${{ env.BUILD_TYPE }}
- if: ${{ runner.os == 'Windows' }}
name: Pack (Windows)
run: |
mkdir ${{ github.event.repository.name }}-${{ runner.os }}
cd build\*_artefacts\Release
del *.*
move * ..\..\..\${{ github.event.repository.name }}-${{ runner.os }}
cd ..\..\..
cmake -E tar cvf ${{ github.event.repository.name }}-${{ runner.os }}.zip --format=zip -- ${{ github.event.repository.name }}-${{ runner.os }}
- if: ${{ runner.os != 'Windows' }}
name: Pack (macOS / Linux)
run: |
mkdir ${{ github.event.repository.name }}-${{ runner.os }}
cd build/*_artefacts/Release
rm *.*
mv * ../../../${{ github.event.repository.name }}-${{ runner.os }}
cd ../../..
cmake -E tar cvf ${{ github.event.repository.name }}-${{ runner.os }}.zip --format=zip -- ${{ github.event.repository.name }}-${{ runner.os }}
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/v')
with:
files: ${{ github.event.repository.name }}-${{ runner.os }}.zip