Skip to content

Upload DLLs

Upload DLLs #335

Workflow file for this run

# 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-latest, ubuntu-20.04]
arch: [x86_64]
include:
- os: macos-latest
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-latest, 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-latest-x86_64/*.dylib ~/a/plateau-plugins/dynamic-libs/MacOS/x86_64
cp ~/a/libplateau-macos-latest-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-latest-x86_64/*.a ~/a/plateau-plugins/static-libs/macos/x86_64
cp ~/a/libplateau-macos-latest-arm64/*.a ~/a/plateau-plugins/static-libs/macos/arm64
- name: upload artifact
uses: actions/upload-artifact@v3
with:
name: all-libraries
path: ~/a/plateau-plugins