-
Notifications
You must be signed in to change notification settings - Fork 502
71 lines (68 loc) · 2.34 KB
/
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
name: release
on:
push:
branches:
- 'master'
paths-ignore:
- '*.md'
jobs:
gltfpack:
strategy:
matrix:
os: [windows, ubuntu, macos]
name: gltfpack-${{matrix.os}}
runs-on: ${{matrix.os}}-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v4
with:
repository: zeux/basis_universal
ref: gltfpack
path: basis_universal
- name: cmake configure
run: cmake . -DMESHOPT_BUILD_GLTFPACK=ON -DMESHOPT_BASISU_PATH=basis_universal -DMESHOPT_WERROR=ON -DCMAKE_MSVC_RUNTIME_LIBRARY="MultiThreaded" -DCMAKE_BUILD_TYPE=Release -DCMAKE_OSX_ARCHITECTURES="x86_64;arm64"
- name: cmake build
run: cmake --build . --target gltfpack --config Release -j 2
- uses: actions/upload-artifact@v4
with:
name: gltfpack-windows
path: Release/gltfpack.exe
if: matrix.os == 'windows'
- uses: actions/upload-artifact@v4
with:
name: gltfpack-${{matrix.os}}
path: gltfpack
if: matrix.os != 'windows'
nodejs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '16'
- name: install wasi
run: |
curl -sL https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-$VERSION/wasi-sdk-$VERSION.0-linux.tar.gz | tar xz
curl -sL https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-$VERSION/libclang_rt.builtins-wasm32-wasi-$VERSION.0.tar.gz | tar xz -C wasi-sdk-$VERSION.0
curl -sL https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-$VERSION/wasi-sysroot-$VERSION.0.tar.gz | tar xz -C wasi-sdk-$VERSION.0/share
mv wasi-sdk-$VERSION.0 wasi-sdk
env:
VERSION: 22
- name: build
run: |
make -j2 -B WASI_SDK=wasi-sdk gltf/library.wasm js
git status
- name: npm pack
run: |
cp LICENSE.md gltf/
cp LICENSE.md js/
cd gltf && npm pack && cd ..
cd js && npm pack && cd ..
- uses: actions/upload-artifact@v4
with:
name: gltfpack-npm
path: gltf/gltfpack-*.tgz
- uses: actions/upload-artifact@v4
with:
name: meshoptimizer-npm
path: js/meshoptimizer-*.tgz