-
Notifications
You must be signed in to change notification settings - Fork 87
36 lines (33 loc) · 1.47 KB
/
quickjsdll.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
name: QuickJS MinGW DLL build
on:
push:
paths:
- 'quickjs/**'
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
cflags: [ "-flto -O2 -DNDEBUG", "-flto -Os -DNDEBUG", "-flto -O3 -DNDEBUG", "-O3 -DNDEBUG", "-g -DDUMP_LEAKS=1" ]
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- name: install mingw
run: sudo apt-get update ; sudo apt-get install -y mingw-w64
- name: build dlls
run: |
mkdir -p bin
# generate def file
gcc -shared quickjs/*.c -DCONFIG_VERSION=\"$(cat quickjs/VERSION)\" -DCONFIG_BIGNUM -D_GNU_SOURCE=1 -fPIC -o libquickjs.so
# export only symbols with "js" in them
echo 'EXPORTS' > bin/libquickjs.def
nm -D --defined-only -f posix libquickjs.so | grep -i js | awk '{print $1}' >> bin/libquickjs.def
i686-w64-mingw32-gcc -shared -static quickjs/*.c bin/libquickjs.def -DCONFIG_VERSION=\"$(cat quickjs/VERSION)\" -DCONFIG_BIGNUM -D_GNU_SOURCE=1 -o bin/libquickjs32.dll -Wl,--out-implib,bin/libquickjs32.a -pthread -s ${{ matrix.cflags }}
x86_64-w64-mingw32-gcc -shared -static quickjs/*.c bin/libquickjs.def -DCONFIG_VERSION=\"$(cat quickjs/VERSION)\" -DCONFIG_BIGNUM -D_GNU_SOURCE=1 -o bin/libquickjs64.dll -Wl,--out-implib,bin/libquickjs64.a -pthread -s ${{ matrix.cflags }}
shell: bash
- uses: actions/upload-artifact@v2
with:
name: dlls ${{matrix.cflags}}
path: bin