-
Notifications
You must be signed in to change notification settings - Fork 23
169 lines (162 loc) · 5.61 KB
/
build.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
name: Compile
on: [push]
jobs:
build-mac:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- name: Developer certificate
env:
CERTIFICATE: ${{ secrets.APPLE_SIGNING_CERTIFICATE }}
CERTIFICATE_PASSWORD: ${{ secrets.APPLE_SIGNING_CERTIFICATE_PASSWORD }}
run: ./scripts/make_keychain.sh
- name: Install boost
env:
HOMEBREW_NO_INSTALL_CLEANUP: 1
run: brew install boost ninja
- name: CMake
run: |
mkdir -p build
cd build && cmake -DCMAKE_BUILD_TYPE=Release -G Ninja ..; cd ..
- name: Build
run: ninja -v -C build
- name: Code signing
run: |
codesign --sign "Lee Baker" --verbose=4 build/src/plugin/mac.xpl
codesign --sign "Lee Baker" --verbose=4 build/src/plugin/datareftool.xpl
codesign --display --verbose=4 build/src/plugin/mac.xpl
codesign --display --verbose=4 build/src/plugin/datareftool.xpl
- uses: actions/upload-artifact@master
with:
name: drt_mac_xp10
path: build/src/plugin/mac.xpl
- uses: actions/upload-artifact@master
with:
name: drt_mac_xp11
path: build/src/plugin/datareftool.xpl
- name: Dependencies
run: |
otool -L build/src/plugin/mac.xpl
otool -L build/src/plugin/datareftool.xpl
build-lin:
runs-on: ubuntu-18.04
steps:
- name: Install dependencies
run: |
sudo apt-get update -qq
sudo apt-get install -y cmake libx11-dev libbz2-dev libgl-dev libglu1-mesa-dev ninja-build
- uses: actions/checkout@v2
with:
submodules: recursive
- name: CMake
env:
CC: gcc-10
CXX: g++-10
run: |
mkdir -p build
cd build && cmake -G Ninja -DCMAKE_BUILD_TYPE=Release ..; cd ..
- name: Build
run: ninja -v -C build
- uses: actions/upload-artifact@master
with:
name: drt_lin_xp10
path: build/src/plugin/lin.xpl
- uses: actions/upload-artifact@master
with:
name: drt_lin_xp11
path: build/src/plugin/datareftool.xpl
- name: Dependencies
run: |
ldd build/src/plugin/lin.xpl
ldd build/src/plugin/datareftool.xpl
build-win:
runs-on: windows-latest
steps:
- name: Install dependencies
run: vcpkg install libpng:x64-windows-static
- uses: actions/checkout@v2
with:
submodules: recursive
- name: Prebuild
run: mkdir -p build
- name: CMake
working-directory: build
shell: cmd
run: cmake -G "Visual Studio 16 2019" -DVCPKG_TARGET_TRIPLET=x64-windows-static -A x64 -DCMAKE_TOOLCHAIN_FILE=c:/vcpkg/scripts/buildsystems/vcpkg.cmake ..
- name: Setup MSBuild.exe
uses: microsoft/setup-msbuild@v1.0.2
- name: MSBuild
working-directory: build
shell: cmd
run: msbuild /p:Configuration=Release ALL_BUILD.vcxproj
- uses: actions/upload-artifact@master
with:
name: drt_win_xp10
path: build/src/plugin/Release/win.xpl
- uses: actions/upload-artifact@master
with:
name: drt_win_xp11
path: build/src/plugin/Release/datareftool.xpl
- name: Dependencies
shell: cmd
run: |
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
dumpbin.exe /dependents build/src/plugin/Release/win.xpl
dumpbin.exe /dependents build/src/plugin/Release/datareftool.xpl
build-zip:
runs-on: macos-latest
needs: [build-mac, build-lin, build-win]
steps:
- name: Install dependencies
env:
HOMEBREW_NO_INSTALL_CLEANUP: 1
run: brew install tree
- uses: actions/checkout@v2
- name: Create directories
run: |
mkdir -p xp10/64
mkdir -p xp11/64
- uses: actions/download-artifact@master
with:
name: drt_lin_xp10
path: xp10/64/
- uses: actions/download-artifact@master
with:
name: drt_lin_xp11
path: xp11/lin_x64/
- uses: actions/download-artifact@master
with:
name: drt_mac_xp10
path: xp10/64/
- uses: actions/download-artifact@master
with:
name: drt_mac_xp11
path: xp11/mac_x64/
- uses: actions/download-artifact@master
with:
name: drt_win_xp10
path: xp10/64/
- uses: actions/download-artifact@master
with:
name: drt_win_xp11
path: xp11/win_x64/
- name: Zip the distribution
run: |
tree xp10/
tree xp11/
mv xp11/lin_x64/datareftool.xpl xp11/64/lin.xpl
mv xp11/mac_x64/datareftool.xpl xp11/64/mac.xpl
mv xp11/win_x64/datareftool.xpl xp11/64/win.xpl
rmdir xp11/lin_x64 xp11/mac_x64 xp11/win_x64
mv xp10/ DataRefTool_XP10_`date +%Y_%m_%d`
mv xp11/ DataRefTool_XP11_`date +%Y_%m_%d`
zip -r DataRefTool_build.zip DataRefTool_XP10_`date +%Y_%m_%d`/64/ DataRefTool_XP11_`date +%Y_%m_%d`/64/ LICENSE INSTALL.txt
unzip -l DataRefTool_build.zip
- name: Notarize ZIP
run: xcrun altool --notarize-app --primary-bundle-id "com.leecbaker.datareftool.zip" --username "lee@leecbaker.com" --password "${{ secrets. APP_STORE_CONNECT_PASSWORD }}" --file DataRefTool_build.zip
- uses: actions/upload-artifact@master
with:
name: datareftool_build
path: DataRefTool_build.zip