-
-
Notifications
You must be signed in to change notification settings - Fork 3
155 lines (133 loc) · 5.71 KB
/
Validation.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
name: Build and Validate
permissions: write-all
on:
# NOTE: Include "[no ci]", "[skip ci]", or "[ci skip]" in the commit message
# to prevent push and pull_request events from triggering workflows.
push:
tags:
- '*'
# By default, only `opened`, `synchronize`, and `reopened` activity types will trigger the workflow
pull_request:
# Manual trigger:
workflow_dispatch:
env:
BUILD_TYPE: Release
CMAKE_BUILD_PARALLEL_LEVEL: 3 # Use up to 3 CPUs to build juceaide, etc.
STRICTNESS_LEVEL: 10 # Strictness level for pluginval validation
TIMEOUT_MS: 60000 # Set pluginval to time out after 1 minute
# Jobs run in parallel by default
jobs:
build_and_validate:
name: Build and validate on ${{ matrix.config.name }}
runs-on: ${{ matrix.config.os }}
strategy:
# Don't cancel all in-progress jobs if any matrix job fails:
fail-fast: false
# Define a matrix of job configurations:
matrix:
config:
- {
name: 'macos',
os: macos-11,
gen: 'Xcode', # CMake generator
# Use ccache. Enable building universal binaries. Set the minimum MacOS target:
cmake_config_flags: "-G \"Xcode\" -D CMAKE_C_COMPILER_LAUNCHER=ccache -D CMAKE_CXX_COMPILER_LAUNCHER=ccache -D CMAKE_OSX_ARCHITECTURES=arm64\\;x86_64 -D CMAKE_OSX_DEPLOYMENT_TARGET=10.13",
# Enable parallel builds with make:
cmake_build_flags: "--parallel 6",
pluginval_link: "https://github.com/Tracktion/pluginval/releases/latest/download/pluginval_macOS.zip",
pluginval_path: "pluginval.app/Contents/MacOS/pluginval",
}
- {
name: 'windows',
os: windows-2022,
gen: 'MSVC', # CMake generator
cmake_config_flags: "-G \"Visual Studio 17 2022\" -A x64 -T v141 -DCMAKE_SYSTEM_VERSION=\"8.1\"",
pluginval_link: "https://github.com/Tracktion/pluginval/releases/latest/download/pluginval_Windows.zip",
pluginval_path: "./pluginval.exe",
}
# - {
# name: 'linux',
# os: ubuntu-20.04
# }
# - {
# name: 'win-arm',
# os: windows-2022,
# gen: 'MSVC', # CMake generator
# cmake_config_flags: "-G \"Visual Studio 17 2022\" -A ARM -DCMAKE_SYSTEM_VERSION=10",
# pluginval_link: "https://github.com/Tracktion/pluginval/releases/latest/download/pluginval_Windows.zip",
# pluginval_path: "./pluginval.exe"
# }
# Steps run in sequence. Each step runs in its own process in the runner environment and has access to the workspace and filesystem
# NB! Because steps run in their own process, changes to environment variables are not preserved between steps
steps:
- name: Checkout code
uses: actions/checkout@v3
# Use the ccache compiler cache to speed up builds
# Note: ccache does not support Windows
- name: Enable ccache
if: runner.os != 'Windows'
uses: hendrikmuhs/ccache-action@v1
with:
key: ${{ runner.os }}-${{ env.BUILD_TYPE }}
# Set up the dependency cache to be updated for every new commit
# We include the CMake generator name in the cache key. This helps avoiding cache conflicts when switching generators
- name: Cache dependencies
uses: actions/cache@v3
with:
path: Libs
key: libs-${{ runner.os }}-${{ matrix.config.gen }}-${{ github.sha }}
restore-keys: libs-${{ runner.os }}-${{ matrix.config.gen }}-
- name: Configure CMake
run: cmake -B Build ${{ matrix.config.cmake_config_flags }} -D CMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }}
- name: Build
run: cmake --build Build --config ${{ env.BUILD_TYPE }} ${{ matrix.config.cmake_build_flags }}
# - name: Validate
# shell: bash
# working-directory: Build
# env:
# VALIDATE_IN_PROCESS: true
# if: runner.os == 'macOS'
# run: |
# cmake --install .
# curl -LsS ${{ matrix.config.pluginval_link }} -o pluginval.zip
# unzip -q pluginval
# ${{ matrix.config.pluginval_path }} --validate *_artefacts/${{ env.BUILD_TYPE }}/VST3/*.vst3
- name: Create Release
uses: actions/create-release@v1
id: create_release
with:
draft: true
tag_name: ${{github.ref_name}}
release_name: ${{github.ref_name}}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Prepare build artifacts
shell: bash
working-directory: Build
run: |
shopt -s extglob # Enable bash extended globbing
mkdir ${{ runner.os }}-${{github.ref_name}}
cpack
mv cpack/ndi* ${{ runner.os }}-${{github.ref_name}}/
- if: runner.os == 'Windows'
run: |
Compress-Archive -Path Build\${{ runner.os }}-${{github.ref_name}} -Destination ${{ runner.os }}-${{github.ref_name}}.zip
- if: runner.os != 'Windows'
run: |
zip --junk-paths ${{ runner.os }}-${{github.ref_name}}.zip Build/${{ runner.os }}-${{github.ref_name}}/*
# - name: Archive and upload build artifacts
# uses: actions/upload-artifact@v3
# with:
# name: NDI_Audio_IO-${{ runner.os }}-${{github.ref_name}}
# path: Build/${{ runner.os }}-${{github.ref_name}}
# - name: Display structure of downloaded files
# run: ls -R
- name: Upload Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ${{ runner.os }}-${{github.ref_name}}.zip
asset_name: NDI_Audio_IO-${{ runner.os }}-${{github.ref_name}}.zip
asset_content_type: application/zip