-
Notifications
You must be signed in to change notification settings - Fork 6
195 lines (189 loc) · 5.19 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
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
name: Build
on:
push:
pull_request:
#schedule:
# - cron: '0 */2 * * *'
jobs:
build-linux:
runs-on: ubuntu-latest
timeout-minutes: 90
env:
OS_NAME: unknown
ARCH_NAME: unknown
DLL_NAME: libasyncprocess.so
RESULT_NAME: result-linux
RESULT_PATH: result-linux
RESULT_PATH_SUB: result-async/static
steps:
- uses: actions/checkout@v2
- name: Set environment variables
run: |
pwd
uname
uname -m
OS_NAME=`uname`
ARCH_NAME=`uname -m`
echo "OS_NAME=$OS_NAME" >> $GITHUB_ENV
echo "ARCH_NAME=$ARCH_NAME" >> $GITHUB_ENV
- name: Install
run: |
sudo apt-get install libtool automake
- name: Build
run: |
gcc -v
rm static/$ARCH_NAME/$OS_NAME/$DLL_NAME
./bootstrap
- name: Copy Result
if: always()
run: |
mkdir -p $RESULT_PATH/$RESULT_PATH_SUB/$ARCH_NAME/$OS_NAME
cp static/$ARCH_NAME/$OS_NAME/$DLL_NAME $RESULT_PATH/$RESULT_PATH_SUB/$ARCH_NAME/$OS_NAME
- name: Upload Result
if: always()
uses: actions/upload-artifact@v1
with:
name: ${{ env.RESULT_NAME }}
path: ${{ env.RESULT_PATH }}
build-linux-aarch64:
runs-on: ubuntu-latest
timeout-minutes: 90
env:
OS_NAME: Linux
ARCH_NAME: aarch64
DLL_NAME: libasyncprocess.so
RESULT_NAME: result-linux-aarch64
RESULT_PATH: result-linux-aarch64
RESULT_PATH_SUB: result-async/static
steps:
- uses: actions/checkout@v2
- name: Build on aarch64 (arm64)
id: runcmd
uses: uraimo/run-on-arch-action@v1.0.5
with:
architecture: aarch64
distribution: ubuntu18.04
run: |
apt-get update
apt-get -y install build-essential
apt-get -y install automake
apt-get -y install libtool
pwd
uname
uname -m
gcc -v
rm static/${{ env.ARCH_NAME }}/${{ env.OS_NAME }}/${{ env.DLL_NAME }}
./bootstrap
- name: Copy Result
if: always()
run: |
mkdir -p $RESULT_PATH/$RESULT_PATH_SUB/$ARCH_NAME/$OS_NAME
cp static/$ARCH_NAME/$OS_NAME/$DLL_NAME $RESULT_PATH/$RESULT_PATH_SUB/$ARCH_NAME/$OS_NAME
- name: Upload Result
if: always()
uses: actions/upload-artifact@v1
with:
name: ${{ env.RESULT_NAME }}
path: ${{ env.RESULT_PATH }}
build-osx:
runs-on: macos-latest
timeout-minutes: 90
env:
OS_NAME: unknown
ARCH_NAME: unknown
DLL_NAME: libasyncprocess.so
RESULT_NAME: result-osx
RESULT_PATH: result-osx
RESULT_PATH_SUB: result-async/static
steps:
- uses: actions/checkout@v2
- name: Set environment variables
run: |
pwd
uname
uname -m
OS_NAME=`uname`
ARCH_NAME=`uname -m`
echo "OS_NAME=$OS_NAME" >> $GITHUB_ENV
echo "ARCH_NAME=$ARCH_NAME" >> $GITHUB_ENV
- name: Install tools
run: |
brew install automake
#brew install libtool
which glibtoolize
ln -s /usr/local/bin/glibtoolize /usr/local/bin/libtoolize
which libtoolize
- name: Build
run: |
gcc -v
rm static/$ARCH_NAME/$OS_NAME/$DLL_NAME
./bootstrap
- name: Copy Result
if: always()
run: |
mkdir -p $RESULT_PATH/$RESULT_PATH_SUB/$ARCH_NAME/$OS_NAME
cp static/$ARCH_NAME/$OS_NAME/$DLL_NAME $RESULT_PATH/$RESULT_PATH_SUB/$ARCH_NAME/$OS_NAME
- name: Upload Result
if: always()
uses: actions/upload-artifact@v1
with:
name: ${{ env.RESULT_NAME }}
path: ${{ env.RESULT_PATH }}
build-windows:
runs-on: windows-latest
timeout-minutes: 90
strategy:
fail-fast: false
matrix:
arch: [x86_64, i686]
include:
- arch: x86_64
arch2: x86_64
bit: 64
- arch: i686
arch2: x86
bit: 32
env:
OS_NAME: windows
ARCH_NAME: ${{ matrix.arch2 }}
DLL_NAME: libasyncprocess.dll
RESULT_NAME: result-windows-${{ matrix.arch }}
RESULT_PATH: result-windows-${{ matrix.arch }}
RESULT_PATH_SUB: result-async/static
steps:
- run: git config --global core.autocrlf false
- uses: actions/checkout@v2
- uses: msys2/setup-msys2@v2
with:
msystem: MINGW${{ matrix.bit }}
path-type: inherit
release: true
update: true
install: 'base-devel mingw-w64-${{ matrix.arch }}-toolchain'
- name: Run MSYS2 once
shell: msys2 {0}
run: |
pwd
echo $MSYSTEM
echo $MSYS2_PATH_TYPE
echo $PATH
uname
uname -m
- name: Build
shell: msys2 {0}
run: |
gcc -v
rm static/$ARCH_NAME/$OS_NAME/$DLL_NAME
./bootstrap
- name: Copy Result
if: always()
shell: msys2 {0}
run: |
mkdir -p $RESULT_PATH/$RESULT_PATH_SUB/$ARCH_NAME/$OS_NAME
cp static/$ARCH_NAME/$OS_NAME/$DLL_NAME $RESULT_PATH/$RESULT_PATH_SUB/$ARCH_NAME/$OS_NAME
- name: Upload Result
if: always()
uses: actions/upload-artifact@v1
with:
name: ${{ env.RESULT_NAME }}
path: ${{ env.RESULT_PATH }}