-
Notifications
You must be signed in to change notification settings - Fork 122
156 lines (148 loc) · 5.05 KB
/
CI.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
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
name: CI
on:
push:
paths-ignore:
- '**.md'
- '**.html'
- '**.schelp'
- 'README'
- 'LICENSE'
- '_data/**'
- '.bundle/**'
- 'assets/**'
- 'index.*'
- '_config.yml'
- 'Gemfile*'
pull_request:
paths-ignore:
- '**.md'
- '**.html'
- '**.schelp'
- 'README'
- 'LICENSE'
- '_data/**'
- '.bundle/**'
- 'assets/**'
- 'index.*'
- '_config.yml'
- 'Gemfile*'
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- name: Linux-x64-22.04
os: ubuntu-22.04
cmake-flags: '-G "Unix Makefiles" -D RULE_LAUNCH_COMPILE=ccache'
cache-path: '~/.config/ccache'
- name: Linux-x64-24.04
os: ubuntu-24.04
cmake-flags: '-G "Unix Makefiles" -D RULE_LAUNCH_COMPILE=ccache'
cache-path: '~/.config/ccache'
- name: macOS
os: macos-14
cmake-flags: '-G Xcode -D CMAKE_OSX_ARCHITECTURES="x86_64;arm64"'
xcode-version: '15.4'
deployment-target: '10.15'
- name: Windows-32bit
os: windows-2022
cmake-flags: '-G "Visual Studio 17 2022" -A Win32'
vcvars-script: 'C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Auxiliary/Build/vcvars32.bat'
fftw-url: 'ftp://ftp.fftw.org/pub/fftw/fftw-3.3.5-dll32.zip'
fftw-arch: 'X86'
- name: Windows-64bit
os: windows-2022
cmake-flags: '-G "Visual Studio 17 2022" -A x64'
vcvars-script: 'C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Auxiliary/Build/vcvars64.bat'
fftw-url: 'ftp://ftp.fftw.org/pub/fftw/fftw-3.3.5-dll64.zip'
fftw-arch: 'X64'
env:
SC_SRC_PATH: ${{ github.workspace }}/supercollider
BUILD_PATH: ${{ github.workspace }}/build
INSTALL_PATH: ${{ github.workspace }}/build/install
FFTW_INSTALL_DIR: "C:/Program Files/fftw"
DEVELOPER_DIR: '/Applications/Xcode_${{ matrix.xcode-version }}.app/Contents/Developer'
MACOSX_DEPLOYMENT_TARGET: '${{ matrix.deployment-target }}'
name: ${{ matrix.name }}
steps:
- name: set filename # use tag or sha for version
id: set-filename
shell: bash
run: |
if [[ "$GITHUB_REF" == refs/tags/* ]]; then
FULL_TAG=${GITHUB_REF#refs/tags/}
VERSION=${FULL_TAG##Version-}
else
VERSION=$GITHUB_SHA
fi
echo "::set-output name=filename::sc3-plugins-$VERSION-${{ matrix.name }}"
- name: checkout sc3-plugins
uses: actions/checkout@v2
with:
submodules: recursive
- name: checkout supercollider
uses: actions/checkout@v2
with:
repository: supercollider/supercollider
path: ${{ env.SC_SRC_PATH }}
ref: main
- name: cache ccache
uses: actions/cache@v2
if: matrix.cache-path
with:
path: ${{ matrix.cache-path }}
key: ${{ matrix.name }}-${{ github.run_id }}
restore-keys: ${{ matrix.name }}-
- name: install Linux dependencies
if: runner.os == 'Linux'
run: sudo apt-get install --yes libfftw3-dev ccache
- name: install FFTW
if: runner.os == 'Windows'
shell: bash
run: |
mkdir -p "$FFTW_INSTALL_DIR" && cd "$FFTW_INSTALL_DIR"
curl -L ${{ matrix.fftw-url }} -o fftw.zip
7z x fftw.zip -y
- name: create FFTW MSVC library
if: matrix.vcvars-script
shell: cmd
working-directory: ${{ env.FFTW_INSTALL_DIR }}
run: |
call "${{ matrix.vcvars-script }}"
lib.exe /machine:${{ matrix.fftw-arch }} /def:libfftw3f-3.def
- name: configure
shell: bash
run: |
mkdir $BUILD_PATH && cd $BUILD_PATH
cmake ${{ matrix.cmake-flags }} -D SC_PATH=$SC_SRC_PATH -D CMAKE_BUILD_TYPE=Release -D SUPERNOVA=ON -D CMAKE_INSTALL_PREFIX=$INSTALL_PATH -D IN_PLACE_BUILD=OFF ..
- name: build
shell: bash
working-directory: ${{ env.BUILD_PATH }}
env:
CMAKE_BUILD_PARALLEL_LEVEL: 4
run: |
cmake --build . --config Release --target install
- name: compress plugins
shell: bash
working-directory: ${{ env.INSTALL_PATH }}
run: |
if [[ "${{ runner.os }}" == "Windows" ]]; then
7z a ${{ steps.set-filename.outputs.filename }}.zip -tzip .
else
zip -r ${{ steps.set-filename.outputs.filename }}.zip .
fi
- name: upload artifacts
uses: actions/upload-artifact@v2
with:
name: ${{ steps.set-filename.outputs.filename }}
path: ${{ env.INSTALL_PATH }}/${{ steps.set-filename.outputs.filename }}.zip
- name: deploy release
if: startsWith(github.ref, 'refs/tags/')
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
prerelease: true
file: ${{ env.INSTALL_PATH }}/${{ steps.set-filename.outputs.filename }}.zip
tag: ${{ github.ref }}