forked from facebook/yoga
-
Notifications
You must be signed in to change notification settings - Fork 0
85 lines (69 loc) · 2.22 KB
/
build.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
83
84
85
name: Build Binaries
on: [push, pull_request]
jobs:
build:
name: Build ${{ matrix.os }}
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash
strategy:
fail-fast: false
matrix:
os: [macos-13, ubuntu-latest, windows-latest]
steps:
- uses: actions/checkout@v3
- name: Setup
uses: ./.github/actions/setup-cpp
with:
toolchain: ${{ startsWith(matrix.os, 'windows') && 'MSVC' || 'Clang' }}
- name: Setup Apple
if: startsWith(matrix.os, 'macos')
uses: ./.github/actions/setup-apple
- name: Build
run: ./generate_build
- name: Move Windows files
if: startsWith(matrix.os, 'windows')
run: |
mkdir -p dist/win-x64
cp build/yogacore.dll dist/win-x64/yoga.dll
- name: Build (x86)
if: startsWith(matrix.os, 'windows')
run: ./generate_build -A Win32
- name: Move Windows files (x86)
if: startsWith(matrix.os, 'windows')
run: |
mkdir -p dist/win-x86
cp build/Release/yogacore.dll dist/win-x86/yoga.dll
- name: Move MacOS files
if: startsWith(matrix.os, 'macos')
run: |
mkdir -p dist/osx
cp build/libyogacore.dylib dist/osx/libyoga.dylib
- name: Move Ubuntu files
if: startsWith(matrix.os, 'ubuntu')
run: |
mkdir -p dist/linux
cp build/libyogacore.so dist/linux/libyoga.so
- name: Upload Binaries
uses: actions/upload-artifact@v3
if: github.event_name == 'push'
with:
path: dist/**
name: prebuilt_yoga_binaries
build-android:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/setup-android
- name: Build
run: |
./gradlew :yoga:assembleRelease
mkdir -p dist/android
cp java/build/outputs/aar/yoga-release.aar dist/android/yoga.aar
- name: Upload Binaries
uses: actions/upload-artifact@v3
if: github.event_name == 'push'
with:
path: dist/**
name: prebuilt_yoga_binaries