-
Notifications
You must be signed in to change notification settings - Fork 6
135 lines (116 loc) · 4.17 KB
/
build-daw-plugin.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
name: Build DAW Plugin
on:
push:
branches:
- main
- 'releases/**'
tags:
- 'v**'
pull_request:
workflow_dispatch:
workflow_run:
workflows: ["Update"]
types:
- completed
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
defaults:
run:
shell: bash
jobs:
build_plugin:
name: DAW Build - ${{ matrix.name }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: windows-latest
name: windows-x64
cmake_args: -G"Visual Studio 17 2022" -A x64
- os: windows-latest
name: windows-arm64ec
cmake_args: -G"Visual Studio 17 2022" -A arm64ec -DAWCO_ARM64EC=TRUE -DCMAKE_SYSTEM_VERSION=10
- os: macos-latest
name: macos
cmake_args: -DCMAKE_OSX_ARCHITECTURES="arm64;x86_64"
- os: ubuntu-latest
name: linux-x64
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: recursive
- name: Select Xcode Version
if: runner.os == 'macOS'
run: sudo xcode-select -switch /Applications/Xcode_15.1.app
#- uses: apple-actions/import-codesign-certs@v3
# if: runner.os == 'macOS' && github.event_name != 'pull_request'
# with:
# p12-file-base64: ${{ secrets.MAC_CERTS_P12 }}
# p12-password: ${{ secrets.CERT_PWD }}
- name: Install Linux Deps; pick GCC12
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt install libasound2-dev libx11-dev libxcomposite-dev libxcursor-dev libxext-dev libxinerama-dev libxrandr-dev libxrender-dev libfreetype6-dev libglu1-mesa-dev libjack-jackd2-dev
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-12 12
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-12 12
- name: Build release version
if: github.event_name != 'pull_request'
run: |
#export MAC_SIGNING_CERT="${{ secrets.MAC_SIGNING_CERT_NAME }}"
#export MAC_INSTALLING_CERT="${{ secrets.MAC_INSTALLING_CERT_NAME }}"
#export MAC_SIGNING_ID="${{ secrets.MAC_SIGNING_ID }}"
#export MAC_SIGNING_1UPW="${{ secrets.MAC_SIGNING_1UPW }}"
#export MAC_SIGNING_TEAM="${{ secrets.MAC_SIGNING_TEAM }}"
cmake -S . -B ./build ${{ matrix.cmake_args }} -DCMAKE_BUILD_TYPE=Release
cmake --build ./build --config Release --parallel 3
- name: Configure pull request version
if: github.event_name == 'pull_request'
run: |
cmake -S . -B ./build ${{ matrix.cmake_args }} -DCMAKE_BUILD_TYPE=Debug
- name: Build pull request version
if: github.event_name == 'pull_request'
run: |
cmake --build ./build --config Debug --parallel 3
- name: Show Build Directory
run: |
ls -l ./build
#- name: Upload artifact
# uses: actions/upload-artifact@v4
# with:
# path: build/installer
# name: dawplugin-${{ matrix.name }}
publish-dawplugin-nightly:
name: Publish DAWPlugin
# only create a release if a tag was created that is called e.g. v1.2.3
# see also https://vcvrack.com/manual/Manifest#version
if: ${{ github.ref == 'refs/heads/main' && github.repository_owner == 'baconpaul' }}
runs-on: ubuntu-latest
needs: [build_plugin]
steps:
- uses: actions/download-artifact@v4
with:
path: artifacts
- name: Show Installer Directory
run: |
ls -R artifacts
- name: Delete old release assets
uses: mknejp/delete-release-assets@v1
with:
token: ${{ github.token }}
tag: DAWPlugin # This may also be of the form 'refs/tags/staging'
assets: '*'
- name: Upload release assets
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: artifacts/**/**/**
tag: DAWPlugin
file_glob: true
- name: Tag Repo
uses: richardsimko/[email protected]
with:
tag_name: DAWPlugin
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}