Skip to content

Commit ed4fba8

Browse files
authored
Start work on buildbinary workflow.
1 parent ea19e06 commit ed4fba8

File tree

1 file changed

+54
-0
lines changed

1 file changed

+54
-0
lines changed
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Build Binaryen
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
build:
8+
strategy:
9+
matrix:
10+
include:
11+
- os: windows-latest
12+
arch: x64
13+
cmake-args: -A x64 -DCMAKE_CXX_FLAGS="/W0 /MD /MT" -DBUILD_STATIC_LIB=OFF -DBUILD_SHARED_LIBS=ON
14+
runtime: win-x64
15+
- os: windows-latest
16+
arch: x86
17+
cmake-args: -A Win32 -DCMAKE_CXX_FLAGS="/W0 /MT" -DBUILD_STATIC_LIB=OFF -DBUILD_SHARED_LIBS=ON
18+
runtime: win-x86
19+
- os: ubuntu-latest
20+
arch: x64
21+
cmake-args: -DCMAKE_C_FLAGS="-m64 -w -static-libgcc -static-libstdc++" -DCMAKE_CXX_FLAGS="-m64 -w -static-libgcc -static-libstdc++" -DBUILD_SHARED_LIBS=ON
22+
runtime: linux-x64
23+
- os: ubuntu-latest
24+
arch: x86
25+
cmake-args: -DCMAKE_C_FLAGS="-m32 -w -static-libgcc -static-libstdc++" -DCMAKE_CXX_FLAGS="-m32 -w -static-libgcc -static-libstdc++" -DBUILD_SHARED_LIBS=ON
26+
runtime: linux-x86
27+
28+
runs-on: ${{ matrix.os }}
29+
30+
steps:
31+
- uses: actions/checkout@v4
32+
33+
- name: Install build deps (Linux only)
34+
if: runner.os == 'Linux'
35+
run: |
36+
sudo apt-get update
37+
sudo apt-get install -y g++-multilib gcc-multilib cmake make
38+
39+
- name: Configure
40+
run: cmake -B build ${{ matrix.cmake-args }}
41+
42+
- name: Build
43+
run: cmake --build build --config Release
44+
45+
- name: Copy to NuGet runtime folder
46+
run: |
47+
mkdir -p package/runtimes/${{ matrix.runtime }}/native
48+
cp build/Release/* package/runtimes/${{ matrix.runtime }}/native/ || cp build/* package/runtimes/${{ matrix.runtime }}/native/
49+
50+
- name: Upload artifact
51+
uses: actions/upload-artifact@v4
52+
with:
53+
name: runtimes-${{ matrix.runtime }}
54+
path: package/runtimes/${{ matrix.runtime }}

0 commit comments

Comments
 (0)