-
Notifications
You must be signed in to change notification settings - Fork 22
84 lines (78 loc) · 2.96 KB
/
Copy pathmain.yml
File metadata and controls
84 lines (78 loc) · 2.96 KB
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
name: Build LLVM XCFrameworks for Release
on: [push]
jobs:
prepare-build-tools:
runs-on: macos-11
if: ${{ false }}
steps:
- uses: actions/checkout@v3
- run: ./build-tools.sh
- run: |
curl -OL https://github.com/ninja-build/ninja/releases/download/v1.10.2/ninja-mac.zip
unzip ninja-mac.zip
mv ninja tools/bin
- run: tar -cJf tools.tar.xz tools/
- uses: actions/upload-artifact@v3
with:
name: tools
path: tools.tar.xz
build-libffi:
runs-on: macos-11
strategy:
matrix:
platformArch: [iphoneos, iphonesimulator, iphonesimulator-arm64, maccatalyst, maccatalyst-arm64]
steps:
- uses: actions/checkout@v3
- name: Build libffi for ${{ matrix.platformArch }}
run: source build-llvm.sh && build_libffi ${{ matrix.platformArch }}
- run: tar -cJf libffi-${{ matrix.platformArch }}.tar.xz libffi-${{ matrix.platformArch }}/
- uses: actions/upload-artifact@v3
with:
name: libffi-${{ matrix.platformArch }}
path: libffi-${{ matrix.platformArch }}.tar.xz
build-llvm:
needs: build-libffi # prepare-build-tools
runs-on: macos-12
strategy:
matrix:
platformArch: [iphoneos, iphonesimulator, iphonesimulator-arm64, maccatalyst, maccatalyst-arm64]
timeout-minutes: 1200
steps:
- uses: actions/checkout@v3
- uses: actions/download-artifact@v3
- name: Extract artifacts
run: find . -name "*.tar.xz" -exec tar xzf {} \;
- run: brew install ninja
- name: Build LLVM for ${{ matrix.platformArch }}
run: source build-llvm.sh && build_llvm ${{ matrix.platformArch }}
- run: tar -cJf LLVM-${{ matrix.platformArch }}.tar.xz LLVM-${{ matrix.platformArch }}/
- uses: actions/upload-artifact@v3
with:
name: LLVM-${{ matrix.platformArch }}
path: LLVM-${{ matrix.platformArch }}.tar.xz
create-xcframework:
needs: build-llvm
runs-on: macos-12
steps:
- uses: actions/checkout@v3
- uses: actions/download-artifact@v3
- name: Extract artifacts
run: find . -name "*.tar.xz" -exec tar xzf {} \;
- name: Create XCFramework for Intel Macs
run: source build-llvm.sh && create_xcframework iphoneos iphonesimulator maccatalyst
- run: tar -cJf LLVM_Intel.xcframework.tar.xz LLVM.xcframework
- uses: actions/upload-artifact@v3
with:
name: LLVM_Intel
path: LLVM_Intel.xcframework.tar.xz
- uses: actions/upload-artifact@v3
with:
name: libclang
path: libclang.tar.xz
- name: Create XCFramework for M1 Macs
run: source build-llvm.sh && rm -rf LLVM.xcframework && create_xcframework iphoneos iphonesimulator-arm64 maccatalyst-arm64
- run: tar -cJf LLVM_M1.xcframework.tar.xz LLVM.xcframework
- uses: actions/upload-artifact@v3
with:
name: LLVM_M1
path: LLVM_M1.xcframework.tar.xz