-
Notifications
You must be signed in to change notification settings - Fork 724
82 lines (67 loc) · 2.11 KB
/
build_release.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
name: Build Release
# Trigger whenever a release is created
on:
release:
types:
- created
permissions:
contents: write
jobs:
build:
name: build
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04, macos-12, macos-14, windows-latest]
defaults:
run:
shell: bash
steps:
- uses: actions/setup-python@v5
with:
python-version: '3.x'
- uses: actions/checkout@v1
with:
submodules: true
- name: install ninja (linux)
run: sudo apt-get install ninja-build
if: startsWith(matrix.os, 'ubuntu-')
- name: install ninja (osx)
run: brew install ninja
if: matrix.os == 'macos-12' || matrix.os == 'macos-14'
- name: install ninja (win)
run: choco install ninja
if: matrix.os == 'windows-latest'
- name: mkdir
run: mkdir -p out
- name: cmake (unix)
run: cmake -S . -B out -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=install
if: matrix.os != 'windows-latest'
- name: cmake (win)
# -G "Visual Studio 15 2017"
run: cmake -S . -B out -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=install
if: matrix.os == 'windows-latest'
- name: build
run: cmake --build out --config Release --target install
- name: strip
run: find bin/ -type f -perm -u=x -exec strip {} +
if: matrix.os != 'windows-latest'
- uses: ./.github/actions/release-archive
with:
os: ${{ matrix.os }}
upload_to_release: true
build-wasi:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: built-tools
run: |
docker run -di --name wasi-sdk -v $(pwd):/src --workdir /src ghcr.io/webassembly/wasi-sdk:wasi-sdk-20 bash
docker exec wasi-sdk cmake -S . -B out -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=install -DBUILD_TESTS=0 -DBUILD_LIBWASM=0
docker exec wasi-sdk cmake --build out --config Release --target install
- uses: ./.github/actions/release-archive
with:
os: wasi
upload_to_release: true