-
Notifications
You must be signed in to change notification settings - Fork 3
119 lines (98 loc) · 4.11 KB
/
upload-dlls.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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
# github actions でビルドしてDLL等の成果物をアップロードする手順です。
name: Upload DLLs
# 手動でgithubサイトのボタンを押したときか、タグを作ったときに実行します。
on:
workflow_dispatch:
create:
tags: '*'
env:
BUILD_TYPE: RelWithDebInfo
jobs:
# 1つ目のジョブです。
# OS別にビルドして、それぞれの成果物をアーティファクトとして保存します。
upload-dlls:
runs-on: ${{matrix.os}}
strategy:
fail-fast: false
matrix:
os: [windows-2022, macos-14, ubuntu-20.04]
arch: [x86_64]
include:
- os: macos-14
arch: arm64
steps:
- uses: actions/checkout@v3
- name: Add SSH private keys for submodule repositories
uses: webfactory/[email protected]
with:
ssh-private-key: |
${{ secrets.KEY_TO_ACCESS_FBXSDK }}
- name: Upload Dll
uses: ./.github/actions/upload-dll
with:
shell_type: ${{ (runner.os == 'Windows' && 'powershell') || 'bash' }}
visual_studio_version: "17 2022"
arch: ${{ matrix.arch }}
# 2つ目のジョブ。
# AndroidとiOS用にライブラリをビルド。
upload_mobile_dlls:
runs-on: ${{matrix.os}}
strategy:
fail-fast: false
matrix:
os: [macos-14, ubuntu-latest]
compile-sdk: [33]
build-tools: [30.0.3]
ndk-version: [23.1.7779620]
steps:
- uses: actions/checkout@v3
- name: Add SSH private keys for submodule repositories
uses: webfactory/[email protected]
with:
ssh-private-key: |
${{ secrets.KEY_TO_ACCESS_FBXSDK }}
- name: Upload Dlls for Mobile
uses: ./.github/actions/upload-mobile-dlls
with:
shell_type: ${{ (runner.os == 'Windows' && 'powershell') || 'bash' }}
# 3つ目のジョブです。
# OSごとのアーティファクトを1つにまとめます。
sum-up-dlls:
runs-on: ubuntu-latest
needs: [upload-dlls, upload_mobile_dlls]
steps:
- name: download-all-artifacts
uses: actions/download-artifact@v2
with:
path: ~/a
- name: sum-up-dynamic-libs
run: |
mkdir -p ~/a/plateau-plugins/dynamic-libs/Windows/x86_64
mkdir -p ~/a/plateau-plugins/dynamic-libs/Linux/x86_64
mkdir -p ~/a/plateau-plugins/dynamic-libs/MacOS/x86_64
mkdir -p ~/a/plateau-plugins/dynamic-libs/MacOS/arm64
mkdir -p ~/a/plateau-plugins/dynamic-libs/ManagedDLL
mkdir -p ~/a/plateau-plugins/dynamic-libs/Android
mkdir -p ~/a/plateau-plugins/dynamic-libs/iOS/plateau.framework
cp ~/a/libplateau-windows/plateau.dll ~/a/plateau-plugins/dynamic-libs/Windows/x86_64
cp ~/a/libplateau-windows/CSharpPLATEAU.dll ~/a/plateau-plugins/dynamic-libs/ManagedDLL
cp ~/a/libplateau-ubuntu-20.04/*.so ~/a/plateau-plugins/dynamic-libs/Linux/x86_64
cp ~/a/libplateau-macos-14-x86_64/*.dylib ~/a/plateau-plugins/dynamic-libs/MacOS/x86_64
cp ~/a/libplateau-macos-14-arm64/*.dylib ~/a/plateau-plugins/dynamic-libs/MacOS/arm64
cp ~/a/libplateau-android-dll/libplateau.so ~/a/plateau-plugins/dynamic-libs/Android
cp ~/a/libplateau-ios-dll/* ~/a/plateau-plugins/dynamic-libs/iOS/plateau.framework
- name: sum-up-static-libs
run: |
mkdir -p ~/a/plateau-plugins/static-libs/windows
mkdir -p ~/a/plateau-plugins/static-libs/linux
mkdir -p ~/a/plateau-plugins/static-libs/macos/x86_64
mkdir -p ~/a/plateau-plugins/static-libs/macos/arm64
cp ~/a/libplateau-windows/*.lib ~/a/plateau-plugins/static-libs/windows
cp ~/a/libplateau-ubuntu-20.04/*.a ~/a/plateau-plugins/static-libs/linux
cp ~/a/libplateau-macos-14-x86_64/*.a ~/a/plateau-plugins/static-libs/macos/x86_64
cp ~/a/libplateau-macos-14-arm64/*.a ~/a/plateau-plugins/static-libs/macos/arm64
- name: upload artifact
uses: actions/upload-artifact@v4
with:
name: all-libraries
path: ~/a/plateau-plugins