-
Notifications
You must be signed in to change notification settings - Fork 5
77 lines (65 loc) · 2.43 KB
/
build.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
name: Build
on: [push]
env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release
jobs:
build:
# The CMake configure and build commands are platform agnostic and should work equally
# well on Windows or Mac. You can convert this to a matrix build if you need
# cross-platform coverage.
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
runs-on: ${{ matrix.os.runner }}
strategy:
matrix:
os:
- runner: macos-latest
name: mac
- runner: windows-latest
name: windows
steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: Create Build Environment
# Some projects don't allow in-source building, so create a separate build directory
# We'll use this as our working directory for all subsequent commands
run: cmake -E make_directory ${{runner.workspace}}/build
- name: Configure CMake
# Use a bash shell so we can use the same syntax for environment variable
# access regardless of the host operating system
shell: bash
working-directory: ${{runner.workspace}}/build
env:
MACOSX_DEPLOYMENT_TARGET: 10.12
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE
- name: Build
working-directory: ${{runner.workspace}}/build
shell: bash
env:
MACOSX_DEPLOYMENT_TARGET: 10.12
run: cmake --build . --config $BUILD_TYPE --verbose
- name: Zip
working-directory: ${{runner.workspace}}/build/CryptSynthPlugin_artefacts/Release/VST3
shell: bash
run: tar -czvf crypt-${{ matrix.os.name }}-vst3.tar.gz Crypt.vst3
- name: Upload
uses: actions/[email protected]
with:
name: crypt-${{ matrix.os.name }}
path: ${{runner.workspace}}/build/CryptSynthPlugin_artefacts/Release/VST3/crypt-${{ matrix.os.name }}-vst3.tar.gz
release:
needs: build
if: startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
steps:
- name: Download previously built artifacts
uses: actions/download-artifact@v2
- name: Perform release
uses: softprops/action-gh-release@v1
with:
files: |
crypt-mac/crypt-mac-vst3.tar.gz
crypt-windows/crypt-windows-vst3.tar.gz
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}