-
Notifications
You must be signed in to change notification settings - Fork 69
177 lines (168 loc) · 7.45 KB
/
build-be.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: Build
on: [push, pull_request]
jobs:
build-windows:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Configure paths
run: |
New-Item -ItemType Directory -Force -Path ./artifacts/release/x64
New-Item -ItemType Directory -Force -Path ./artifacts/release/x86
New-Item -ItemType Directory -Force -Path ./artifacts/verbose/x64
New-Item -ItemType Directory -Force -Path ./artifacts/verbose/x86
- name: Build Release
run: |
./build.ps1
Copy-Item -Path ./build/windows/x64/release/doorstop.dll -Destination ./artifacts/release/x64/winhttp.dll
Copy-Item -Path ./build/windows/x64/release/.doorstop_version -Destination ./artifacts/release/x64/.doorstop_version
Copy-Item -Path ./build/windows/x86/release/doorstop.dll -Destination ./artifacts/release/x86/winhttp.dll
Copy-Item -Path ./build/windows/x86/release/.doorstop_version -Destination ./artifacts/release/x86/.doorstop_version
Copy-Item -Path ./assets/windows/doorstop_config.ini -Destination ./artifacts/release/x64/doorstop_config.ini
Copy-Item -Path ./assets/windows/doorstop_config.ini -Destination ./artifacts/release/x86/doorstop_config.ini
- name: Build Verbose
run: |
./build.ps1 -with_logging
Copy-Item -Path ./build/windows/x64/release/doorstop.dll -Destination ./artifacts/verbose/x64/winhttp.dll
Copy-Item -Path ./build/windows/x64/release/.doorstop_version -Destination ./artifacts/verbose/x64/.doorstop_version
Copy-Item -Path ./build/windows/x86/release/doorstop.dll -Destination ./artifacts/verbose/x86/winhttp.dll
Copy-Item -Path ./build/windows/x86/release/.doorstop_version -Destination ./artifacts/verbose/x86/.doorstop_version
Copy-Item -Path ./assets/windows/doorstop_config.ini -Destination ./artifacts/verbose/x64/doorstop_config.ini
Copy-Item -Path ./assets/windows/doorstop_config.ini -Destination ./artifacts/verbose/x86/doorstop_config.ini
- name: Upload Release
uses: actions/upload-artifact@v2
with:
name: doorstop_win_release
path: artifacts/release
- name: Upload Verbose
uses: actions/upload-artifact@v2
with:
name: doorstop_win_verbose
path: artifacts/verbose
build-linux:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Configure paths
run: |
mkdir -p artifacts/{verbose,release,debug}/{x86,x64}
- name: Install dependencies
run: sudo apt-get update && sudo apt-get install -y git build-essential libreadline-dev ccache gcc-multilib g++-multilib
- name: Build Release
run: |
./build.sh
cp build/linux/x86/release/libdoorstop.so artifacts/release/x86/libdoorstop.so
cp build/linux/x64/release/libdoorstop.so artifacts/release/x64/libdoorstop.so
cp build/linux/x86/release/.doorstop_version artifacts/release/x86/.doorstop_version
cp build/linux/x64/release/.doorstop_version artifacts/release/x64/.doorstop_version
cp assets/nix/run.sh artifacts/release/x86/run.sh
cp assets/nix/run.sh artifacts/release/x64/run.sh
- name: Build Verbose
run: |
./build.sh -with_logging
cp build/linux/x86/release/libdoorstop.so artifacts/verbose/x86/libdoorstop.so
cp build/linux/x64/release/libdoorstop.so artifacts/verbose/x64/libdoorstop.so
cp build/linux/x64/release/.doorstop_version artifacts/verbose/x86/.doorstop_version
cp build/linux/x86/release/.doorstop_version artifacts/verbose/x64/.doorstop_version
cp assets/nix/run.sh artifacts/verbose/x86/run.sh
cp assets/nix/run.sh artifacts/verbose/x64/run.sh
- name: Build Debug
run: |
./build.sh -with_logging -debug
cp build/linux/x86/debug/libdoorstop.so artifacts/debug/x86/libdoorstop.so
cp build/linux/x64/debug/libdoorstop.so artifacts/debug/x64/libdoorstop.so
cp build/linux/x86/debug/.doorstop_version artifacts/debug/x86/.doorstop_version
cp build/linux/x64/debug/.doorstop_version artifacts/debug/x64/.doorstop_version
cp assets/nix/run.sh artifacts/debug/x86/run.sh
cp assets/nix/run.sh artifacts/debug/x64/run.sh
- name: Upload Release
uses: actions/upload-artifact@v2
with:
name: doorstop_linux_release
path: artifacts/release
- name: Upload Verbose
uses: actions/upload-artifact@v2
with:
name: doorstop_linux_verbose
path: artifacts/verbose
- name: Upload Debug
uses: actions/upload-artifact@v2
with:
name: doorstop_linux_debug
path: artifacts/debug
build-macos:
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Configure paths
run: |
mkdir -p artifacts/{verbose,release,debug}/x64
- name: Build Release
run: |
./build.sh
cp build/macosx/x86_64/release/libdoorstop.dylib artifacts/release/x64/libdoorstop.dylib
cp build/macosx/x86_64/release/.doorstop_version artifacts/release/x64/.doorstop_version
cp assets/nix/run.sh artifacts/release/x64/run.sh
- name: Build Verbose
run: |
./build.sh -with_logging
cp build/macosx/x86_64/release/libdoorstop.dylib artifacts/verbose/x64/libdoorstop.dylib
cp build/macosx/x86_64/release/.doorstop_version artifacts/verbose/x64/.doorstop_version
cp assets/nix/run.sh artifacts/verbose/x64/run.sh
- name: Build Debug
run: |
./build.sh -with_logging -debug
cp build/macosx/x86_64/debug/libdoorstop.dylib artifacts/debug/x64/libdoorstop.dylib
cp build/macosx/x86_64/debug/.doorstop_version artifacts/debug/x64/.doorstop_version
cp assets/nix/run.sh artifacts/debug/x64/run.sh
- name: Upload Release
uses: actions/upload-artifact@v2
with:
name: doorstop_macos_release
path: artifacts/release
- name: Upload Verbose
uses: actions/upload-artifact@v2
with:
name: doorstop_macos_verbose
path: artifacts/verbose
- name: Upload Debug
uses: actions/upload-artifact@v2
with:
name: doorstop_macos_debug
path: artifacts/debug
collect:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/master'
needs:
- build-windows
- build-linux
- build-macos
steps:
- name: Download artifacts
uses: actions/[email protected]
with:
path: artifacts
- name: Grab version
run: |
VERSION=$(cat artifacts/doorstop_win_release/x86/.doorstop_version)
echo "doorstop_version=$VERSION" >> $GITHUB_ENV
- name: Create zips
run: |
mkdir dist
cd artifacts
zip -r ../dist/doorstop_all_${{ env.doorstop_version }}.zip *
for dir in *
do
(cd ${dir}; zip -r ../../dist/${dir}_${{ env.doorstop_version }}.zip *)
done
- name: Create release
uses: marvinpinto/action-automatic-releases@latest
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "ci"
prerelease: true
title: "CI build"
files: dist/*.zip