forked from libffi/libffi
-
Notifications
You must be signed in to change notification settings - Fork 3
259 lines (252 loc) · 8.54 KB
/
lwjgl.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
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
name: LWJGL Build
on:
push:
branches:
- master
env:
AWS_DEFAULT_REGION: us-east-1
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
S3_PARAMS: --cache-control "public,must-revalidate,proxy-revalidate,max-age=0"
jobs:
linux:
name: Linux
runs-on: ubuntu-latest
container:
image: centos:7
strategy:
fail-fast: false
matrix:
ARCH: [x64]
include:
- ARCH: x64
HOST: x86_64-pc-linux-gnu
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 3
- name: Configure yum
run: |
yum -y install epel-release
yum -y update
- name: Install build dependencies
run: |
yum -y install centos-release-scl
yum -y install devtoolset-11-gcc-c++
yum -y install awscli
- name: Install libffi dependencies
run: yum -y install autoconf automake libtool texinfo
- name: Install autoconf 2.71
run: |
source scl_source enable devtoolset-11 || true
curl -L https://ftpmirror.gnu.org/autoconf/autoconf-2.71.tar.gz | tar -xz
(cd autoconf-2.71; ./configure; make; make install)
- name: Configure build
run: |
source scl_source enable devtoolset-11 || true
./autogen.sh
./configure --disable-shared --with-pic --host=${{matrix.HOST}} || cat */config.log
- name: Build
run: |
source scl_source enable devtoolset-11 || true
make
- name: Upload artifact
run: aws s3 cp ${{matrix.HOST}}/.libs/libffi_convenience.a s3://lwjgl-build/nightly/linux/${{matrix.ARCH}}/core/libffi.a $S3_PARAMS
linux-cross:
name: Linux Cross
runs-on: ubuntu-latest
container:
image: ${{matrix.CONTAINER}}
strategy:
fail-fast: false
matrix:
ARCH: [arm32, arm64, mips64, ppc64le, riscv64]
include:
# -----
- ARCH: arm32
CROSS_ARCH: armhf
CONTAINER: ubuntu:18.04
TRIPLET: arm-linux-gnueabihf
HOST: arm-unknown-linux-gnueabihf
# -----
- ARCH: arm64
CROSS_ARCH: arm64
CONTAINER: ubuntu:18.04
TRIPLET: aarch64-linux-gnu
HOST: aarch64-unknown-linux-gnu
# -----
- ARCH: mips64
CROSS_ARCH: mips64el
CONTAINER: ubuntu:18.04
TRIPLET: mips64el-linux-gnuabi64
HOST: mips64el-unknown-linux-gnu
# ----
- ARCH: ppc64le
CROSS_ARCH: ppc64el
CONTAINER: ubuntu:18.04
TRIPLET: powerpc64le-linux-gnu
HOST: powerpc64le-unknown-linux-gnu
# -----
- ARCH: riscv64
CROSS_ARCH: riscv64
CONTAINER: ubuntu:20.04
TRIPLET: riscv64-linux-gnu
HOST: riscv64-unknown-linux-gnu
defaults:
run:
shell: bash
steps:
- name: Upgrade git
run: |
apt-get -y update
apt-get -y install software-properties-common wget
apt-get -y install --reinstall ca-certificates
apt-get -y update
apt-get -y upgrade
wget https://apt.kitware.com/keys/kitware-archive-latest.asc
apt-key add kitware-archive-latest.asc
add-apt-repository -y 'deb https://apt.kitware.com/ubuntu/ bionic main'
add-apt-repository -y ppa:git-core/ppa
apt-get -y update
DEBIAN_FRONTEND=noninteractive apt-get -yq install awscli git
- uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Install dependencies
run: apt-get install -yq m4 make automake libtool texinfo gcc-${{matrix.TRIPLET}} libc6-dev-${{matrix.CROSS_ARCH}}-cross
- name: Install autoconf 2.71
run: |
wget --retry-connrefused --waitretry=1 --read-timeout=20 --timeout=15 -t 0 -qO - https://ftpmirror.gnu.org/autoconf/autoconf-2.71.tar.gz | tar -xvzf -
mkdir -p ~/i
(cd autoconf-2.71; ./configure --prefix=$HOME/i; make; make install)
rm -rf autoconf-2.71
- name: Configure build
run: |
PATH=$HOME/i/bin:$PATH ./autogen.sh
./configure --disable-shared --with-pic CC=${{matrix.TRIPLET}}-gcc --host=${{matrix.HOST}} || cat */config.log
- name: Build
run: make
- name: Upload artifact
run: aws s3 cp ${{matrix.HOST}}/.libs/libffi_convenience.a s3://lwjgl-build/nightly/linux/${{matrix.ARCH}}/core/libffi.a $S3_PARAMS
freebsd-cross:
name: FreeBSD Cross
runs-on: macos-latest
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Build
uses: cross-platform-actions/[email protected]
with:
operating_system: freebsd
architecture: x86-64
version: '13.2'
memory: 4G
shell: bash
run: |
sudo pkg install -y m4 gmake automake libtool texinfo
./autogen.sh
./configure --disable-shared --with-pic || cat */config.log
make
- name: Upload artifact
run: aws s3 cp x86_64-unknown-freebsd13.2/.libs/libffi_convenience.a s3://lwjgl-build/nightly/freebsd/x64/core/libffi.a $S3_PARAMS
macos:
name: macOS
runs-on: macos-latest
strategy:
fail-fast: false
matrix:
ARCH: [x64, arm64]
include:
- ARCH: x64
CC:
CFLAGS: -mmacosx-version-min=10.9
LDFLAGS: -mmacosx-version-min=10.9
HOST: x86_64
- ARCH: arm64
CC: SDKROOT=$(xcrun -sdk macosx11.1 --show-sdk-path) MACOSX_DEPLOYMENT_TARGET=11.0
CFLAGS: -target aarch64-apple-darwin -arch arm64 -mmacosx-version-min=11.0
LDFLAGS: -target aarch64-apple-darwin -arch arm64 -mmacosx-version-min=11.0
HOST: aarch64
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Install dependencies
run: brew install automake
- name: Configure build
run: |
./autogen.sh
${{matrix.CC}} ./configure --disable-shared CC=clang CFLAGS='${{matrix.CFLAGS}}' LDFLAGS='${{matrix.LDFLAGS}}' --target ${{matrix.ARCH}}-apple-darwin20 --host=${{matrix.HOST}}-apple-darwin20 || cat */config.log
- name: Build
run: ${{matrix.CC}} make
- name: Upload artifact
run: aws s3 cp ${{matrix.HOST}}-apple-darwin20/.libs/libffi_convenience.a s3://lwjgl-build/nightly/macosx/${{matrix.ARCH}}/core/libffi.a $S3_PARAMS
windows:
name: Windows
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
ARCH: [x86, x64, arm64]
include:
# -----
- ARCH: x86
SOURCE_ARCH: x86
MSVC_ARCH: amd64_x86
MSVC_SH: msvcc.sh
HOST: i686-pc-cygwin
# -----
- ARCH: x64
SOURCE_ARCH: x86
MSVC_ARCH: amd64
MSVC_SH: msvcc.sh -m64
HOST: x86_64-pc-cygwin
# -----
- ARCH: arm64
SOURCE_ARCH: aarch64
MSVC_ARCH: amd64_arm64
MSVC_SH: msvcc.sh -marm64
HOST: aarch64-pc-cygwin
defaults:
run:
shell: cmd
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Install dependencies
uses: egor-tensin/setup-cygwin@v3
with:
platform: x64
install-dir: C:\cygwin
packages: wget autoconf automake libtool
- uses: ilammy/msvc-dev-cmd@v1
with:
arch: ${{ matrix.MSVC_ARCH }}
- name: Build
run: |
cd $(cygpath $RUNNER_WORKSPACE)/libffi
./autogen.sh
./configure \
CC="$PWD/${{matrix.MSVC_SH}}" \
CXX="$PWD/${{matrix.MSVC_SH}}" \
LD='link' \
CPP='cl -nologo -EP' \
CXXCPP='cl -nologo -EP' \
CPPFLAGS='-DFFI_BUILDING_DLL -DUSE_STATIC_RTL' \
NM='dumpbin -symbols' \
STRIP=':' \
CONFIGURE_OPTIONS=--disable-shared \
--host=${{matrix.HOST}} \
|| cat */config.log
cp src/${{matrix.SOURCE_ARCH}}/ffitarget.h include
make
shell: C:\cygwin\bin\bash.exe --login --norc -eo pipefail -o igncr '{0}'
- name: Upload artifact
run: aws s3 cp ${{matrix.HOST}}\.libs\libffi_convenience.lib s3://lwjgl-build/nightly/windows/${{matrix.ARCH}}/core/libffi.lib %S3_PARAMS%