Skip to content

Commit 915501f

Browse files
authored
Merge pull request Synesthesias#196 from Synesthesias/release/v2.0.1-alpha
Release/v2.0.1 alpha to main
2 parents bc65343 + e32b4ce commit 915501f

File tree

163 files changed

+4642
-1353
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

163 files changed

+4642
-1353
lines changed

.github/actions/build/action.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,13 @@ inputs:
55
shell_type:
66
description: "利用するシェルを引数で渡します。"
77
required: true
8+
visual_studio_version:
9+
description: "ビルドで利用する Visual Studio のバージョンです。Windowsでのみ利用します。"
10+
required: true
11+
arch:
12+
description: "ビルド対象のCPUアーキテクチャです。MacOSでのみ利用します。"
13+
required: false
14+
default: "x86_64"
815

916
runs:
1017
using: Composite
@@ -55,6 +62,7 @@ runs:
5562
-D CMAKE_CXX_FLAGS="-w"
5663
-D BUILD_LIB_TYPE=dynamic
5764
-D RUNTIME_LIB_TYPE=MT
65+
-D CMAKE_OSX_ARCHITECTURES:STRING="${{ inputs.arch }}"
5866
${{ env.ADDITIONAL_CMAKE_OPTIONS }}
5967
shell: ${{ inputs.shell_type }}
6068
# 10万行超えの警告が出るので一時的な処置として警告を抑制しています。
@@ -75,6 +83,7 @@ runs:
7583
-D CMAKE_CXX_FLAGS="-w"
7684
-D BUILD_LIB_TYPE=static
7785
-D RUNTIME_LIB_TYPE=MD
86+
-D CMAKE_OSX_ARCHITECTURES:STRING="${{ inputs.arch }}"
7887
${{ env.ADDITIONAL_CMAKE_OPTIONS }}
7988
shell: ${{ inputs.shell_type }}
8089

@@ -85,7 +94,7 @@ runs:
8594
cmake
8695
-S ${{github.workspace}}
8796
-B ${{github.workspace}}/out/build/x64-Release-Unreal
88-
-G "Visual Studio 16 2019"
97+
-G "Visual Studio ${{ inputs.visual_studio_version }}"
8998
-D CMAKE_INSTALL_PREFIX="C:/ninja"
9099
-D CMAKE_BUILD_TYPE:STRING="${{env.BUILDTYPE}}"
91100
-D CMAKE_CXX_FLAGS="-w"
Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
# 現在の Github Actions のランナーのOSでビルドし、その結果をアーティファクトとしてアップロードします。
2+
3+
inputs:
4+
shell_type:
5+
description: "利用するシェルを引数で渡します。"
6+
required: true
7+
visual_studio_version:
8+
description: "ビルドで利用する Visual Studio のバージョンです。Windowsでのみ利用します。"
9+
required: true
10+
arch:
11+
description: "ビルド対象のCPUアーキテクチャです。MacOSでのみ利用します。"
12+
required: false
13+
default: "x86_64"
14+
15+
runs:
16+
using: Composite
17+
18+
steps:
19+
20+
- name: checkout submodules
21+
shell: bash
22+
run: git submodule update --init --recursive
23+
24+
- name: Build
25+
uses: ./.github/actions/build
26+
with:
27+
shell_type: ${{ inputs.shell_type }}
28+
visual_studio_version: ${{ inputs.visual_studio_version }}
29+
arch: ${{ inputs.arch }}
30+
31+
- name: Copy DLL for Windows
32+
if: runner.os == 'Windows'
33+
run: |
34+
mkdir D:\a\output -Force
35+
Copy-Item -Filter "*.dll" -Path ${{github.workspace}}\out\build\x64-Release-Unity\bin\* -Destination D:\a\output
36+
Copy-Item -Path ${{github.workspace}}\wrappers\csharp\LibPLATEAU.NET\CSharpPLATEAU\bin\Release\netstandard2.0\CSharpPLATEAU.dll -Destination D:\a\output
37+
shell: pwsh
38+
39+
- name: Copy lib for Windows
40+
if: runner.os == 'Windows'
41+
run: |
42+
Copy-Item -Path ${{ github.workspace }}\out\build\x64-Release-Unreal\src\${{env.BUILD_TYPE}}\plateau_combined.lib -Destination D:\a\output
43+
shell: pwsh
44+
45+
- name: Upload DLL for Windows
46+
if: runner.os == 'Windows'
47+
uses: actions/upload-artifact@v2
48+
with:
49+
name: libplateau-windows
50+
path: D:\a\output
51+
52+
- name: Copy Libraries for Ubuntu
53+
if: runner.os == 'Linux'
54+
run: |
55+
mkdir $HOME/output/
56+
find ${{github.workspace}}/out/build/x64-Release-Unity -name *.so | xargs -I {} cp -v {} $HOME/output
57+
find ${{github.workspace}}/out/build/x64-Release-Unreal -name libplateau.a | xargs -I {} cp -v {} $HOME/output
58+
echo "HOME=$(echo $HOME)" >> $GITHUB_ENV
59+
shell: ${{ inputs.shell_type }}
60+
61+
- name: Copy Libraries for MacOS(x86_64)
62+
if: runner.os == 'MacOS' && inputs.arch == 'x86_64'
63+
run: |
64+
mkdir $HOME/output/
65+
find ${{github.workspace}}/out/build/x64-Release-Unity -name *.dylib | xargs -I {} cp -v {} $HOME/output
66+
find ${{github.workspace}}/out/build/x64-Release-Unreal -name libplateau_combined.a | xargs -I {} cp -v {} $HOME/output
67+
echo "HOME=$(echo $HOME)" >> $GITHUB_ENV
68+
shell: ${{ inputs.shell_type }}
69+
70+
- name: Copy Libraries for MacOS(arm64)
71+
if: runner.os == 'MacOS' && inputs.arch == 'arm64'
72+
run: |
73+
mkdir $HOME/output/
74+
find ${{github.workspace}}/out/build/x64-Release-Unity -name *.dylib | xargs -I {} cp -v {} $HOME/output
75+
find ${{github.workspace}}/out/build/x64-Release-Unreal -name libplateau_combined.a | xargs -I {} cp -v {} $HOME/output
76+
echo "HOME=$(echo $HOME)" >> $GITHUB_ENV
77+
shell: ${{ inputs.shell_type }}
78+
79+
- name: Upload DLL(so) for Ubuntu
80+
if: runner.os == 'Linux'
81+
uses: actions/upload-artifact@v2
82+
with:
83+
name: libplateau-${{matrix.os}}
84+
path: ${{env.HOME}}/output/
85+
86+
- name: Upload DLL(dylib) for MacOS
87+
if: runner.os == 'MacOS'
88+
uses: actions/upload-artifact@v2
89+
with:
90+
name: libplateau-${{matrix.os}}-${{matrix.arch}}
91+
path: ${{env.HOME}}/output/
Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
2+
# 現在の Github Actions ランナーのOSで Android, iOS 向けにビルドし、結果をアーティファクトとしてアップロードします。
3+
4+
inputs:
5+
shell_type:
6+
description: "利用するシェルを引数で渡します。"
7+
required: true
8+
9+
runs:
10+
using: Composite
11+
12+
steps:
13+
- name: checkout submodules
14+
run: |
15+
git submodule update --init --recursive
16+
shell: bash
17+
18+
- name: setup ubuntu
19+
if: runner.os == 'Linux'
20+
run: |
21+
sudo apt-get --quiet update --yes
22+
sudo apt-get --quiet install --yes wget tar unzip lib32stdc++6 lib32z1
23+
shell: ${{ inputs.shell_type }}
24+
25+
- name: setup JDK 1.8
26+
if: runner.os == 'Linux'
27+
uses: actions/setup-java@v2
28+
with:
29+
distribution: 'zulu'
30+
java-version: '11'
31+
32+
- name: download Android SDK
33+
if: runner.os == 'Linux'
34+
run: |
35+
wget --quiet --output-document=android-sdk.zip https://dl.google.com/android/repository/commandlinetools-linux-8092744_latest.zip
36+
unzip -d android-sdk-linux android-sdk.zip
37+
sudo mkdir -p /root/.android
38+
sudo touch /root/.android/repositories.cfg
39+
echo y | android-sdk-linux/cmdline-tools/bin/sdkmanager --sdk_root=. "platforms;android-${{ matrix.compile-sdk }}" >/dev/null
40+
echo y | android-sdk-linux/cmdline-tools/bin/sdkmanager --sdk_root=. "platform-tools" >/dev/null
41+
echo y | android-sdk-linux/cmdline-tools/bin/sdkmanager --sdk_root=. "build-tools;${{ matrix.build-tools }}" >/dev/null
42+
export ANDROID_SDK_ROOT=$PWD
43+
export PATH=$PATH:$PWD/platform-tools/
44+
set +o pipefail
45+
yes | android-sdk-linux/cmdline-tools/bin/sdkmanager --sdk_root=. --licenses
46+
set -o pipefail
47+
shell: ${{ inputs.shell_type }}
48+
49+
- name: install Android NDK
50+
if: runner.os == 'Linux'
51+
run: android-sdk-linux/cmdline-tools/bin/sdkmanager --sdk_root=. --install "ndk;${{ matrix.ndk-version }}"
52+
shell: ${{ inputs.shell_type }}
53+
54+
- name: Insert NDK path
55+
if: runner.os == 'Linux'
56+
run: |
57+
echo "ndk.dir=$PWD/ndk/${{ matrix.ndk-version }}" >> ./local.properties
58+
shell: ${{ inputs.shell_type }}
59+
60+
- name: Install ninja-build tool
61+
if: runner.os == 'Linux'
62+
uses: seanmiddleditch/gha-setup-ninja@v3
63+
64+
- name: Configure CMake for Android
65+
if: runner.os == 'Linux'
66+
run: >
67+
cmake
68+
-S ${{github.workspace}}
69+
-B ${{github.workspace}}/out/build/x64-Release
70+
-G "Ninja"
71+
-D ANDROID_PLATFORM=android-23
72+
-D ANDROID_ABI=arm64-v8a
73+
-D CMAKE_MAKE_PROGRAM=ninja
74+
-D CMAKE_BUILD_TYPE=Release
75+
-D CMAKE_TOOLCHAIN_FILE=$PWD/ndk/${{ matrix.ndk-version }}/build/cmake/android.toolchain.cmake
76+
shell: ${{ inputs.shell_type }}
77+
78+
- name: Configure CMake for iOS
79+
if: runner.os == 'MacOS'
80+
run: >
81+
cmake
82+
-S ${{github.workspace}}
83+
-B ${{github.workspace}}/out/build/x64-Release
84+
-G "Xcode"
85+
-D CMAKE_SYSTEM_NAME=iOS
86+
-D CMAKE_OSX_DEPLOYMENT_TARGET=13.0
87+
-D CMAKE_BUILD_TYPE=Release
88+
shell: ${{ inputs.shell_type }}
89+
90+
- name: Build by CMake
91+
run: cmake --build ${{github.workspace}}/out/build/x64-Release --config Release
92+
shell: ${{ inputs.shell_type }}
93+
94+
- name: Upload framework for Android
95+
if: runner.os == 'Linux'
96+
uses: actions/upload-artifact@v2
97+
with:
98+
name: libplateau-android-dll
99+
path: ${{github.workspace}}/out/build/x64-Release/src/libplateau.so
100+
101+
- name: Upload framework for iOS
102+
if: runner.os == 'MacOS'
103+
uses: actions/upload-artifact@v2
104+
with:
105+
name: libplateau-ios-dll
106+
path: ${{github.workspace}}/out/build/x64-Release/src/Release-iphoneos/plateau.framework/*

.github/workflows/build-and-test.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
strategy:
1818
fail-fast: false
1919
matrix:
20-
os: [windows-2019, macos-latest, ubuntu-20.04]
20+
os: [windows-2022, macos-latest, ubuntu-20.04]
2121

2222
steps:
2323

@@ -37,6 +37,7 @@ jobs:
3737
uses: ./.github/actions/build
3838
with:
3939
shell_type: ${{ (runner.os == 'Windows' && 'powershell') || 'bash' }}
40+
visual_studio_version: "17 2022"
4041

4142
- name: Run Test
4243
run: |
Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
# upload-dlls.yml の、Visual Studioのバージョンを古くした(VS2019)版です。
2+
3+
name: Upload DLLs with Older Visual Studio (2019)
4+
5+
# 手動でgithubサイトのボタンを押したときに実行します。
6+
on:
7+
workflow_dispatch:
8+
9+
env:
10+
BUILD_TYPE: RelWithDebInfo
11+
12+
jobs:
13+
# 1つ目のジョブです。
14+
# OS別にビルドして、それぞれの成果物をアーティファクトとして保存します。
15+
upload-dlls:
16+
17+
runs-on: ${{matrix.os}}
18+
19+
strategy:
20+
fail-fast: false
21+
matrix:
22+
os: [windows-2019, macos-latest, ubuntu-20.04]
23+
arch: [x86_64]
24+
include:
25+
- os: macos-latest
26+
arch: arm64
27+
28+
steps:
29+
30+
- uses: actions/checkout@v3
31+
32+
- name: Add SSH private keys for submodule repositories
33+
uses: webfactory/ssh-agent@v0.7.0
34+
with:
35+
ssh-private-key: |
36+
${{ secrets.KEY_TO_ACCESS_FBXSDK }}
37+
38+
- name: Upload Dll
39+
uses: ./.github/actions/upload-dll
40+
with:
41+
shell_type: ${{ (runner.os == 'Windows' && 'powershell') || 'bash' }}
42+
visual_studio_version: "16 2019"
43+
44+
# 2つ目のジョブ。
45+
# AndroidとiOS用にライブラリをビルド。
46+
upload_mobile_dlls:
47+
48+
runs-on: ${{matrix.os}}
49+
strategy:
50+
fail-fast: false
51+
matrix:
52+
os: [macos-latest, ubuntu-latest]
53+
compile-sdk: [33]
54+
build-tools: [30.0.3]
55+
ndk-version: [23.1.7779620]
56+
57+
steps:
58+
- uses: actions/checkout@v3
59+
60+
- name: Add SSH private keys for submodule repositories
61+
uses: webfactory/ssh-agent@v0.7.0
62+
with:
63+
ssh-private-key: |
64+
${{ secrets.KEY_TO_ACCESS_FBXSDK }}
65+
66+
- name: Upload Dlls for Mobile
67+
uses: ./.github/actions/upload-mobile-dlls
68+
with:
69+
shell_type: ${{ (runner.os == 'Windows' && 'powershell') || 'bash' }}
70+
71+
# 3つ目のジョブです。
72+
# OSごとのアーティファクトを1つにまとめます。
73+
sum-up-dlls:
74+
runs-on: ubuntu-latest
75+
needs: [upload-dlls, upload_mobile_dlls]
76+
77+
steps:
78+
- name: download-all-artifacts
79+
uses: actions/download-artifact@v2
80+
with:
81+
path: ~/a
82+
83+
- name: sum-up-dynamic-libs
84+
run: |
85+
mkdir -p ~/a/plateau-plugins/dynamic-libs/Windows/x86_64
86+
mkdir -p ~/a/plateau-plugins/dynamic-libs/Linux/x86_64
87+
mkdir -p ~/a/plateau-plugins/dynamic-libs/MacOS/x86_64
88+
mkdir -p ~/a/plateau-plugins/dynamic-libs/MacOS/arm64
89+
mkdir -p ~/a/plateau-plugins/dynamic-libs/ManagedDLL
90+
mkdir -p ~/a/plateau-plugins/dynamic-libs/Android
91+
mkdir -p ~/a/plateau-plugins/dynamic-libs/iOS/plateau.framework
92+
cp ~/a/libplateau-windows/plateau.dll ~/a/plateau-plugins/dynamic-libs/Windows/x86_64
93+
cp ~/a/libplateau-windows/CSharpPLATEAU.dll ~/a/plateau-plugins/dynamic-libs/ManagedDLL
94+
cp ~/a/libplateau-ubuntu-20.04/*.so ~/a/plateau-plugins/dynamic-libs/Linux/x86_64
95+
cp ~/a/libplateau-macos-latest-x86_64/*.dylib ~/a/plateau-plugins/dynamic-libs/MacOS/x86_64
96+
cp ~/a/libplateau-macos-latest-arm64/*.dylib ~/a/plateau-plugins/dynamic-libs/MacOS/arm64
97+
cp ~/a/libplateau-android-dll/libplateau.so ~/a/plateau-plugins/dynamic-libs/Android
98+
cp ~/a/libplateau-ios-dll/* ~/a/plateau-plugins/dynamic-libs/iOS/plateau.framework
99+
100+
- name: sum-up-static-libs
101+
run: |
102+
mkdir -p ~/a/plateau-plugins/static-libs/windows
103+
mkdir -p ~/a/plateau-plugins/static-libs/linux
104+
mkdir -p ~/a/plateau-plugins/static-libs/macos
105+
cp ~/a/libplateau-windows/*.lib ~/a/plateau-plugins/static-libs/windows
106+
cp ~/a/libplateau-ubuntu-20.04/*.a ~/a/plateau-plugins/static-libs/linux
107+
cp ~/a/libplateau-macos-latest-x86_64/*.a ~/a/plateau-plugins/static-libs/macos/x86_64
108+
cp ~/a/libplateau-macos-latest-arm64/*.a ~/a/plateau-plugins/static-libs/macos/arm64
109+
110+
- name: upload artifact
111+
uses: actions/upload-artifact@v3
112+
with:
113+
name: all-libraries
114+
path: ~/a/plateau-plugins

0 commit comments

Comments
 (0)