-
Notifications
You must be signed in to change notification settings - Fork 0
160 lines (134 loc) · 4.63 KB
/
windows-latest.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
157
158
159
160
name: windows
on:
# Runs on all pushes
push:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# When pushing new commits, cancel any running builds on that branch
concurrency:
group: windows-latest-${{ github.ref }}
cancel-in-progress: true
env:
DISPLAY: :0
CMAKE_BUILD_PARALLEL_LEVEL: 3
CMAKE_INSTALL_PARALLEL_LEVEL: 3
VCPKG_MAX_CONCURRENCY: 3
VCPKG_MANIFEST_MODE: ON
VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite"
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
RACK_SDK_VERSION_MAJOR: 2
RACK_SDK_VERSION: 2.5.2
RACK_SDK_PLATFORM: "win-x64"
MSYSTEM: "MINGW64"
# STONEYVCV_VERSION_MAJOR: ${{ vars.STONEYVCV_VERSION_MAJOR }}
# STONEYVCV_VERSION_MINOR: ${{ vars.STONEYVCV_VERSION_MINOR }}
# STONEYVCV_VERSION_PATCH: ${{ vars.STONEYVCV_VERSION_PATCH }}
# STONEYVCV_VERSION: ${{ vars.STONEYVCV_VERSION_MAJOR }}.${{ vars.STONEYVCV_VERSION_MINOR }}.${{ vars.STONEYVCV_VERSION_PATCH }}
jobs:
windows:
runs-on: windows-latest
# defaults:
# run:
# shell: msys2 {0}
steps:
# Requirements
- name: install winget
uses: Cyberboss/install-winget@v1
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: install VCV's MSYS2 Deps
uses: msys2/setup-msys2@v2
with:
msystem: MINGW64
update: true
install: >-
--needed
base-devel
coreutils
git
curl
wget
make
tar
unzip
ccache
mingw-w64-x86_64-gcc
mingw-w64-x86_64-gdb
mingw-w64-x86_64-cmake
mingw-w64-x86_64-catch
mingw-w64-x86_64-ninja
autoconf
automake
libtool
mingw-w64-x86_64-jq
python
zstd
mingw-w64-x86_64-pkgconf
tree
ninja
- name: checkout StoneyVCV
uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 0
# https://vcvrack.com/manual/Building#Setting-up-your-development-environment
- name: get Rack Executable
run: winget install VCVRack.VCVRack --disable-interactivity --accept-source-agreements
# CI helper
- name: Enable GitHub Actions Cache backend
uses: actions/github-script@v7
with:
script: |
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
# Output package name (don't do this at home)
- name: make version
shell: msys2 {0}
run: |
echo STONEYVCV_VERSION_MAJOR=${{ env.RACK_SDK_VERSION_MAJOR }} >> $GITHUB_ENV
echo STONEYVCV_VERSION_MINOR=0 >> $GITHUB_ENV
echo STONEYVCV_VERSION_PATCH=$(git rev-list HEAD | wc -l | awk '{$1=$1};1') >> $GITHUB_ENV
echo STONEYVCV_VERSION_TWEAK=$(git rev-parse HEAD | awk '{$1=$1};1') >> $GITHUB_ENV
echo STONEYVCV_VERSION_BUILD=$(git rev-parse --short HEAD | awk '{$1=$1};1') >> $GITHUB_ENV
echo STONEYVCV_VERSION_PACKAGE=${{ env.RACK_SDK_VERSION_MAJOR }}.0.$(git rev-list HEAD | wc -l | awk '{$1=$1};1') >> $GITHUB_ENV
echo STONEYVCV_VERSION=${{ env.RACK_SDK_VERSION_MAJOR }}.0.$(git rev-list HEAD | wc -l | awk '{$1=$1};1') >> $GITHUB_ENV
echo STONEYVCV_GIT_BRANCH=$(git rev-parse --abbrev-ref --symbolic-full-name HEAD | awk '{$1=$1};1') >> $GITHUB_ENV
- name: make dep
shell: msys2 {0}
run: make dep -j 3
# Developer workflow
- name: make workflow
shell: msys2 {0}
run: make workflow -j 3
# Deployment workflow
- name: make
shell: msys2 {0}
run: make -j 3
- name: make dist
shell: msys2 {0}
run: make dist -j 3
- name: make install
shell: msys2 {0}
run: make install -j 3
# List all artefact directories
- name: tree
shell: msys2 {0}
run: |
tree ./dist
tree ./install
# Upload build artefacts
- name: upload .vcvplugin
uses: actions/upload-artifact@v4
with:
name: StoneyDSP-StoneyVCV-${{ env.STONEYVCV_VERSION_PACKAGE }}-win-x64.vcvplugin
path: '${{ github.workspace }}/dist/StoneyDSP-StoneyVCV-${{ env.STONEYVCV_VERSION_PACKAGE }}-win-x64.vcvplugin'
if-no-files-found: error
- name: upload .exe
uses: actions/upload-artifact@v4
with:
name: StoneyVCV-${{ env.STONEYVCV_VERSION_PACKAGE }}-win64.exe
path: ${{ github.workspace }}/install/StoneyVCV-${{ env.STONEYVCV_VERSION_PACKAGE }}-win64.exe
if-no-files-found: error
# Download build artefacts
- name: download
uses: actions/download-artifact@v4