-
Notifications
You must be signed in to change notification settings - Fork 12
71 lines (70 loc) · 2.1 KB
/
build.yaml
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: Build Dart Shared Library
on:
push:
branches:
- main
pull_request:
jobs:
build:
strategy:
matrix:
os: [windows-latest, ubuntu-latest, macos-13, macos-latest]
include:
- os: windows-latest
postfix: win
- os: ubuntu-latest
postfix: linux
- os: macos-13
postfix: macos-x64
- os: macos-latest
postfix: macos-arm64
env:
DEPOT_TOOLS_WIN_TOOLCHAIN: 0
continue-on-error: true
runs-on: ${{ matrix.os }}
steps:
- if: ${{ matrix.os == 'windows-latest' }}
run: git config --global core.autocrlf true
- uses: actions/checkout@v3
- uses: dart-lang/setup-dart@v1
- uses: ilammy/msvc-dev-cmd@v1
- run: dart pub get
working-directory: ./scripts/build_helpers
- name: Build Dart
run: dart ./scripts/build_helpers/bin/build_dart.dart -v
- name: Cmake
uses: threeal/[email protected]
with:
options:
"BUILD_SAMPLES=OFF"
- name: Build Shared Library
run: cmake --build build --config release
- name: Assemble artifacts
run: dart ./scripts/build_helpers/bin/assemble_artifacts.dart
- name: 'Upload Artifact'
uses: actions/upload-artifact@v4
with:
name: lib-${{ matrix.postfix }}
path: ./artifacts
assemble_mac_dylib:
runs-on: macos-latest
needs: build
steps:
- uses: actions/download-artifact@v4
with:
name: lib-macos-x64
path: lib-macos-x64
- uses: actions/download-artifact@v4
with:
name: lib-macos-arm64
path: lib-macos-arm64
- run: |
mkdir -p artifacts/bin
mkdir -p artifacts/include
lipo lib-macos-x64/bin/libdart_dll.dylib lib-macos-arm64/bin/libdart_dll.dylib -output artifacts/bin/libdart_dll.dylib -create
cp -r lib-macos-arm64/include/* artifacts/include
- name: 'Upload Artifact'
uses: actions/upload-artifact@v4
with:
name: lib-macos
path: ./artifacts