-
Notifications
You must be signed in to change notification settings - Fork 14
109 lines (93 loc) · 3.64 KB
/
cmake.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
on:
push:
tags:
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
jobs:
build:
runs-on: ${{matrix.os}}
strategy:
matrix:
os: [macos-latest, ubuntu-18.04, windows-latest]
steps:
- uses: actions/checkout@v2
- name: Checkout submodules
run: git submodule update --init --recursive
- name: Install 7Zip (Windows)
if: runner.os == 'Windows'
shell: powershell
run: Install-Module 7Zip4PowerShell -Force -Verbose
- name: Checkout supercollider
uses: actions/checkout@v2
with:
repository: supercollider/supercollider
path: ${{github.workspace}}/supercollider
ref: main
- 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 ${{github.workspace}}/build
- name: Configure CMake (Unix)
shell: bash
if: matrix.os != 'windows-latest'
working-directory: ${{github.workspace}}/build
run: cmake .. -DCMAKE_BUILD_TYPE='Release' -DSC_PATH=${{github.workspace}}/supercollider -DCMAKE_INSTALL_PREFIX=${{github.workspace}}/build/install
- name: Configure CMake (Windows)
if: matrix.os == 'windows-latest'
shell: pwsh
working-directory: ${{github.workspace}}\build
run: cmake .. -DCMAKE_BUILD_TYPE='Release' -DSC_PATH=${{github.workspace}}\supercollider -DCMAKE_INSTALL_PREFIX=${{github.workspace}}\build\install
- name: Build (Unix)
if: matrix.os != 'windows-latest'
working-directory: ${{github.workspace}}/build
shell: bash
env:
CMAKE_BUILD_PARALLEL_LEVEL: 4
run: cmake --build . --config "Release" --target install
- name: Build (Windows)
working-directory: ${{github.workspace}}\build
if: matrix.os == 'windows-latest'
shell: pwsh
env:
CMAKE_BUILD_PARALLEL_LEVEL: 4
run: cmake --build . --config "Release" --target install
# Gather all files in a zip
- name: Zip up build (Unix)
if: matrix.os != 'windows-latest'
shell: bash
working-directory: ${{github.workspace}}/build
run: zip -r "PortedPlugins-${{runner.os}}" "install/PortedPlugins"
# Gather all files in a zip
- name: Zip up build (Windows)
if: matrix.os == 'windows-latest'
shell: pwsh
working-directory: ${{github.workspace}}\build
run: Compress-7Zip "install\PortedPlugins" -ArchiveFileName "PortedPlugins-${{runner.os}}.zip" -Format Zip
# Changelog
# Error: Container action is only supported on Linux
# - name: Generate a changelog
# uses: orhun/git-cliff-action@v1
# id: git-cliff
# with:
# config: cliff.toml
# args: -vv --latest --strip header
# env:
# OUTPUT: CHANGELOG.md
# - name: Set the release body
# id: release
# shell: bash
# run: |
# r=$(cat ${{ steps.git-cliff.outputs.changelog }})
# r="${r//'%'/'%25'}" # Multiline escape sequences for %
# r="${r//$'\n'/'%0A'}" # Multiline escape sequences for '\n'
# r="${r//$'\r'/'%0D'}" # Multiline escape sequences for '\r'
# echo "::set-output name=RELEASE_BODY::$r"
# Upload
- name: Upload binaries to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ${{github.workspace}}/build/PortedPlugins-${{runner.os}}.zip
asset_name: PortedPlugins-${{runner.os}}.zip
prerelease: true
# body: ${{ steps.release.outputs.RELEASE_BODY }}
tag: ${{ github.ref }}