-
-
Notifications
You must be signed in to change notification settings - Fork 33
177 lines (163 loc) · 5.59 KB
/
libossia.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
name: libossia
on: push
jobs:
build-macos:
runs-on: macos-latest
environment: 'Apple Certificate'
strategy:
matrix:
static: [0, 1]
build_type: [Release, Debug]
fail-fast: false
steps:
- uses: actions/checkout@v2
- name: Install Dependencies
run: brew install ninja
- name: Build
env:
STATIC: ${{ matrix.static }}
BUILD_TYPE: ${{ matrix.build_type }}
run: |
cmake -B build -S ${GITHUB_WORKSPACE} -GNinja \
-DCMAKE_BUILD_TYPE=$BUILD_TYPE \
-DOSSIA_STATIC=$STATIC \
-DCMAKE_INSTALL_PREFIX=install \
-DOSSIA_TESTING=1 \
-DOSSIA_CI=1 \
-DCMAKE_OSX_ARCHITECTURES="x86_64;arm64"
cmake --build build
cmake --build build --target test
cmake --build build --target install
- name: Code Signing
shell: bash
env:
MAC_CERT_B64: ${{ secrets.MAC_CERT_B64 }}
MAC_CERT_PASSWORD: ${{ secrets.MAC_CERT_PASSWORD }}
MAC_ALTOOL_PASSWORD: ${{ secrets.MAC_ALTOOL_PASSWORD }}
run: |
# Setup codesigning
# Thanks https://www.update.rocks/blog/osx-signing-with-travis/
(
set +x
KEY_CHAIN=build.keychain
echo "$MAC_CERT_B64" | base64 --decode > ossia-cert.p12
security create-keychain -p azure $KEY_CHAIN
security default-keychain -s $KEY_CHAIN
security unlock-keychain -p azure $KEY_CHAIN
security import ossia-cert.p12 -k $KEY_CHAIN -P "$MAC_CERT_PASSWORD" -T /usr/bin/codesign;
security set-key-partition-list -S apple-tool:,apple: -s -k azure $KEY_CHAIN
rm -rf *.p12
)
security unlock-keychain -p azure build.keychain
(
cd install
find lib \( -name "*.dylib" -o -name "*.a" -o -name "*.so" \) -exec echo Signing {} + -exec codesign --force --timestamp --sign "ossia.io" {} +
zip -r ossia-shared-release.zip lib/
xcrun altool \
--notarize-app \
-t osx \
-f "ossia-shared-release.zip" \
--primary-bundle-id "io.ossia.ossia-shared-release" \
-u [email protected] -p "@env:MAC_ALTOOL_PASSWORD"
rm ossia-shared-release.zip
)
- name: Archive Package
uses: actions/upload-artifact@v2
with:
name: libossia-shared-release-macos
path: install
build-windows:
runs-on: windows-latest
strategy:
matrix:
static: [0, 1]
build_type: [Release, Debug]
fail-fast: false
steps:
- uses: actions/checkout@v2
- name: install deps
run: cinst -y ninja
- name : Build
shell: cmd
env:
STATIC: ${{ matrix.static }}
BUILD_TYPE: ${{ matrix.build_type }}
run: |
call ci\msvc.bat
cmake -B build -S %GITHUB_WORKSPACE% -GNinja -DOSSIA_PCH=0 -DCMAKE_SYSTEM_VERSION=7 -DCMAKE_INSTALL_PREFIX=install -DCMAKE_BUILD_TYPE=%BUILD_TYPE% -DOSSIA_STATIC=%STATIC% -DOSSIA_CI=1 -DOSSIA_TESTING=1
cmake --build build
cmake --build build --target test
cmake --install build
- name: Archive Package
uses: actions/upload-artifact@v2
with:
name: libossia-shared-release-windows
path: install
build-linux_x86:
runs-on: ubuntu-latest
strategy:
matrix:
static: [0, 1]
build_type: [Release, Debug]
fail-fast: false
steps:
- uses: actions/checkout@v2
- name: Install Dependencies
run: |
sudo apt-get update -yqq
sudo apt-get upgrade -yqq
sudo apt-get install -yqq build-essential g++-11 gcc-11 ninja-build libavahi-client-dev
- name: Build
env:
STATIC: ${{ matrix.static }}
BUILD_TYPE: ${{ matrix.build_type }}
CC: gcc-11
CXX: g++-11
run: |
cmake -B build -S ${GITHUB_WORKSPACE} -GNinja \
-DCMAKE_INSTALL_PREFIX=install \
-DCMAKE_BUILD_TYPE=$BUILD_TYPE \
-DOSSIA_STATIC=$STATIC \
-DOSSIA_CI=1 \
-DOSSIA_TESTING=1
cmake --build build
cmake --build build --target test
cmake --build build --target install
- name: Archive Package
uses: actions/upload-artifact@v2
with:
name: libossia-shared-release-linux
path: install
build-linux_rpi:
runs-on: ubuntu-latest
strategy:
matrix:
static: [0, 1]
build_type: [Release, Debug]
fail-fast: false
steps:
- uses: actions/checkout@v2
- uses: ./.github/actions/latest-rpi-toolchain
- name: Build
env:
STATIC: ${{ matrix.static }}
BUILD_TYPE: ${{ matrix.build_type }}
run: |
export CTEST_OUTPUT_ON_FAILURE=1
export RPI_ROOT_PATH=/opt/cross-pi-gcc
export PKG_CONFIG_SYSROOT_DIR=$RPI_ROOT_PATH
export PKG_CONFIG_LIBDIR=${RPI_ROOT_PATH}/usr/lib/pkgconfig:${RPI_ROOT_PATH}/usr/share/pkgconfig:${RPI_ROOT_PATH}/usr/lib/arm-linux-gnueabihf/pkgconfig/
export PATH=/opt/cross-pi-gcc/bin:${PATH}
export LD_LIBRARY_PATH=/opt/cross-pi-gcc/lib:${LD_LIBRARY_PATH}
cmake -B build -S ${GITHUB_WORKSPACE} \
-DCMAKE_TOOLCHAIN_FILE="${GITHUB_WORKSPACE}/cmake/toolchain/arm-linux-gnueabihf.cmake" \
-DCMAKE_BUILD_TYPE=$BUILD_TYPE -DOSSIA_STATIC=$STATIC \
-DCMAKE_INSTALL_PREFIX=install \
-DOSSIA_CI=1
cmake --build build
cmake --build build --target install
- name: Archive Package
uses: actions/upload-artifact@v2
with:
name: libossia-shared-release-rpi
path: install