-
Notifications
You must be signed in to change notification settings - Fork 43
186 lines (150 loc) · 7.28 KB
/
main.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
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
# This is a basic workflow to help you get started with Actions
name: main
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# Linux build
linux:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# do builds with both Jack 1 and Jack 2
strategy:
matrix:
jack_package:
- libjack-jackd2-dev
- libjack-dev
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y build-essential ninja-build cmake qttools5-dev qtbase5-dev libqt5svg5-dev libasound2-dev portaudio19-dev ${{ matrix.jack_package }}
# Runs a set of commands using the runners shell
- name: Build
run: |
git submodule -q update --init --recursive
cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
# - name: Upload a Build Artifact
# uses: actions/[email protected]
# with:
# # Artifact name
# name: "qjackctl-${{ runner.os }}-${{ github.job }}-${{ matrix.jack_package }}.tar.gz" # optional, default is artifact
# # A file, directory or wildcard pattern that describes what to upload
# path: build/qjackctl*.tar.gz
# MacOS build
macos:
# The type of runner that the job will run on
runs-on: macos-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
- name: Install dependencies
run: |
brew install cmake ninja qt jack
# Runs a set of commands using the runners shell
- name: Build
run: |
git submodule -q update --init --recursive
cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCONFIG_INSTALL_QT=ON
cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
echo "otool -L"
otool -L ${{github.workspace}}/build/src/QjackCtl.app/Contents/MacOS/QjackCtl
echo "otool -l"
otool -l ${{github.workspace}}/build/src/QjackCtl.app/Contents/MacOS/QjackCtl
# - name: Upload a Build Artifact
# uses: actions/[email protected]
# with:
# # Artifact name
# name: "qjackctl-${{ runner.os }}-${{ github.job }}.tar.gz" # optional, default is artifact
# # A file, directory or wildcard pattern that describes what to upload
# path: build/qjackctl*.tar.gz
# Windows 32 and 64 bits build
windows:
# The type of runner that the job will run on
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
config:
- arch: 32
- arch: 64
jack_version:
- "$jack_latest_version"
- "$jack_previous_version"
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
# Use ::set-output to reuse the jack version in artifact name
- name: Install dependencies
id: dependencies
run: |
echo "Checking latest version of Jack ..."
$JACK_RELEASES_URL = "https://api.github.com/repos/jackaudio/jack2/releases"
$jack_releases = Invoke-WebRequest $JACK_RELEASES_URL | ConvertFrom-Json
$jack_latest_version = $jack_releases[0].tag_name
$jack_previous_version = $jack_releases[1].tag_name
echo "Downloading Jack win${{ matrix.config.arch }} ${{ matrix.jack_version }} ..."
$downloadUrl = "https://github.com/jackaudio/jack2-releases/releases/download/${{ matrix.jack_version }}/jack2-win${{ matrix.config.arch }}-${{ matrix.jack_version }}.exe"
$exePath = "$($env:TEMP)\jack2_installer.exe"
echo "Downloading from $downloadUrl"
(New-Object Net.WebClient).DownloadFile($downloadUrl, $exePath)
echo "Installing..."
cmd /c start /wait $exePath /SILENT /NORESTART /NOICONS /TYPE=full
echo "Done installing Jack win${{ matrix.config.arch }} ${{ matrix.jack_version }}"
echo "::set-output name=JACK_VERSION::${{ matrix.jack_version }}"
pip install -U pip
pip install --pre aqtinstall
pip show aqtinstall
$qt_latest_version = python3 -m aqt list-qt windows desktop --spec 5 --latest-version
echo "Installing Qt $qt_latest_version"
$cnt = 0
do {
$cnt++
python3 -m aqt install-qt -O c:\Qt windows desktop $qt_latest_version win${{ matrix.config.arch }}_mingw81
if ($lastexitcode -ne 0 -and $cnt -ge 5) {
exit $lastexitcode
}
} while ($lastexitcode -ne 0)
echo "Installing win${{ matrix.config.arch }}_mingw810"
$cnt = 0
do {
$cnt++
python3 -m aqt install-tool -O C:\Qt windows desktop tools_mingw qt.tools.win${{ matrix.config.arch }}_mingw810
if ($lastexitcode -ne 0 -and $cnt -ge 5) {
exit $lastexitcode
}
} while ($lastexitcode -ne 0)
echo "::set-output name=QT_PATH::C:\Qt\$qt_latest_version\mingw81_${{ matrix.config.arch }}"
echo "::set-output name=MINGW_PATH::C:\Qt\Tools\mingw810_${{ matrix.config.arch }}"
# Runs a set of commands using the runners shell
- name: Build
run: |
echo "Using MinGW at ${{ steps.dependencies.outputs.MINGW_PATH }}"
echo "Using Qt at ${{ steps.dependencies.outputs.QT_PATH }}"
$env:CC="gcc.exe"
$env:CXX="g++.exe"
$env:PATH="${{ steps.dependencies.outputs.MINGW_PATH }}\bin;$env:PATH"
git submodule -q update --init --recursive
cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} "-GMinGW Makefiles" "-DCMAKE_PREFIX_PATH=${{steps.dependencies.outputs.QT_PATH}}\lib\cmake" -DCONFIG_INSTALL_QT=ON
if ($lastexitcode -ne 0) { exit $lastexitcode }
cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} -- -j4
if ($lastexitcode -ne 0) { exit $lastexitcode }
# - name: Upload a Build Artifact
# uses: actions/[email protected]
# with:
# # Artifact name
# name: "qjackctl-${{ runner.os }}-${{ github.job }}${{ matrix.config.arch }}-jack-${{ steps.dependencies.outputs.JACK_VERSION }}.zip" # optional, default is artifact
# # A file, directory or wildcard pattern that describes what to upload
# path: build/qjackctl*.zip