-
Notifications
You must be signed in to change notification settings - Fork 24
131 lines (126 loc) · 3.94 KB
/
build-libs.yml
File metadata and controls
131 lines (126 loc) · 3.94 KB
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
name: Build PortAudio lib
on:
push:
branches-ignore:
- master
permissions:
# This is needed for pushing a new commit to the repo:
contents: write
env:
CMAKE_POLICY_VERSION_MINIMUM: "3.5"
jobs:
macos:
runs-on: macos-latest
env:
CMAKE_OSX_ARCHITECTURES: "arm64;x86_64"
MACOSX_DEPLOYMENT_TARGET: "10.9"
steps:
- name: checkout portaudio
uses: actions/checkout@v6
with:
repository: PortAudio/portaudio
ref: v19.7.0
path: portaudio
- name: cmake configure
run: |
cmake -S portaudio -B build -D CMAKE_BUILD_TYPE=Release
- name: cmake build
run: |
cmake --build build
- name: move dylib
run: |
mv build/libportaudio.dylib .
- name: show some information about dylib
run: |
file libportaudio.dylib
otool -L libportaudio.dylib
- name: upload dylib
uses: actions/upload-artifact@v7
with:
name: macos-dylib
path: libportaudio.dylib
windows:
runs-on: windows-2022
strategy:
matrix:
platform: [x64, Win32, ARM64]
asio: ["", "-asio"]
include:
- platform: x64
platform-suffix: 64bit
- platform: Win32
platform-suffix: 32bit
- platform: ARM64
platform-suffix: arm64
env:
# Reproducible build by avoiding time stamp
LDFLAGS: "/Brepro"
steps:
- name: checkout portaudio
uses: actions/checkout@v6
with:
repository: PortAudio/portaudio
ref: v19.7.0
path: portaudio
# The next portaudio release will have an auto-download feature:
- name: download and extract ASIO SDK
if: matrix.asio
run: |
curl -L -o asiosdk.zip https://www.steinberg.net/asiosdk
7z x asiosdk.zip
- name: cmake configure
run: |
cmake -S portaudio -B build -A ${{ matrix.platform }} -D PA_USE_ASIO=${{ matrix.asio && 'ON' || 'OFF' }}
- name: cmake build
run: |
cmake --build build --config Release
- name: rename DLL
run: |
mv build/Release/portaudio_*.dll libportaudio${{ matrix.platform-suffix }}${{ matrix.asio }}.dll
- name: show some information about DLL
run: |
ldd libportaudio${{ matrix.platform-suffix }}${{ matrix.asio }}.dll
- name: upload DLL
uses: actions/upload-artifact@v7
with:
name: windows-${{ matrix.platform }}-dll${{ matrix.asio }}
path: libportaudio${{ matrix.platform-suffix }}${{ matrix.asio }}.dll
push:
runs-on: ubuntu-latest
needs: [macos, windows]
steps:
- name: Clone Git repository
uses: actions/checkout@v6
- name: Retrieve dylib
uses: actions/download-artifact@v8
with:
name: macos-dylib
- name: Retrieve x64 DLL
uses: actions/download-artifact@v8
with:
name: windows-x64-dll
- name: Retrieve x64 DLL with ASIO support
uses: actions/download-artifact@v8
with:
name: windows-x64-dll-asio
- name: Retrieve Win32 DLL
uses: actions/download-artifact@v8
with:
name: windows-Win32-dll
- name: Retrieve Win32 DLL with ASIO support
uses: actions/download-artifact@v8
with:
name: windows-Win32-dll-asio
- name: Retrieve ARM64 DLL
uses: actions/download-artifact@v8
with:
name: windows-ARM64-dll
- name: Retrieve ARM64 DLL with ASIO support
uses: actions/download-artifact@v8
with:
name: windows-ARM64-dll-asio
- name: Commit and push binaries (if there are changes)
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git commit -am "Update binaries" && git push || true