-
Notifications
You must be signed in to change notification settings - Fork 0
74 lines (63 loc) · 2.7 KB
/
buildbinaryen.yml
File metadata and controls
74 lines (63 loc) · 2.7 KB
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
name: Build Binaryen
on:
workflow_dispatch:
jobs:
build:
strategy:
matrix:
include:
- os: windows-latest
arch: x64
cmake-args: -G "MinGW Makefiles" -DCMAKE_C_FLAGS="-m64 -w -static -static-libgcc -static-libstdc++" -DCMAKE_CXX_FLAGS="-m64 -w -static -static-libgcc -static-libstdc++" -DBUILD_SHARED_LIBS=ON -DBUILD_TOOLS=OFF -DBUILD_TESTS=OFF
runtime: win-x64
- os: windows-latest
arch: x86
cmake-args: -G "MinGW Makefiles" -DCMAKE_C_FLAGS="-m32 -w -static -static-libgcc -static-libstdc++" -DCMAKE_CXX_FLAGS="-m32 -w -static -static-libgcc -static-libstdc++" -DBUILD_SHARED_LIBS=ON -DBUILD_TOOLS=OFF -DBUILD_TESTS=OFF
runtime: win-x86
- os: ubuntu-latest
arch: x64
cmake-args: -DCMAKE_C_FLAGS="-m64 -w -static-libgcc -static-libstdc++" -DCMAKE_CXX_FLAGS="-m64 -w -static-libgcc -static-libstdc++" -DBUILD_SHARED_LIBS=ON -DBUILD_TOOLS=OFF -DBUILD_TESTS=OFF
runtime: linux-x64
- os: ubuntu-latest
arch: x86
cmake-args: -DCMAKE_C_FLAGS="-m32 -w -static-libgcc -static-libstdc++" -DCMAKE_CXX_FLAGS="-m32 -w -static-libgcc -static-libstdc++" -DBUILD_SHARED_LIBS=ON -DBUILD_TOOLS=OFF -DBUILD_TESTS=OFF
runtime: linux-x86
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Install build deps (Linux)
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y g++-multilib gcc-multilib cmake make
- name: Install build deps (Windows MinGW)
if: runner.os == 'Windows'
uses: msys2/setup-msys2@v2
with:
update: true
install: >-
mingw-w64-${{ matrix.arch }}-gcc
mingw-w64-${{ matrix.arch }}-cmake
mingw-w64-${{ matrix.arch }}-make
- name: Configure
run: cmake -S binaryen -B binaryen/build ${{ matrix.cmake-args }}
shell: msys2 {0}
- name: Build (Linux)
if: runner.os == 'Linux'
run: cmake --build binaryen/build -- -j$(nproc)
- name: Build (Windows)
if: runner.os == 'Windows'
run: cmake --build binaryen/build -- -j$(nproc)
shell: msys2 {0}
- name: Copy to NuGet runtime folder
run: |
mkdir -p package/runtimes/${{ matrix.runtime }}/native
cp -r binaryen/build/lib/* package/runtimes/${{ matrix.runtime }}/native/
shell: bash
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: runtimes-${{ matrix.runtime }}
path: package/runtimes/${{ matrix.runtime }}