处理句柄类成员作为的文档关键词映射。 #245
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: 🛠️ Builds | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ${{ matrix.runner }} | |
name: ${{ matrix.name }} | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- identifier: linux-x64-debug | |
name: 🐧 Linux x64 Debug | |
runner: ubuntu-20.04 | |
target: template_debug | |
platform: linux | |
arch: x86_64 | |
- identifier: linux-x64-release | |
name: 🐧Linux x64 Release | |
runner: ubuntu-20.04 | |
target: template_release | |
platform: linux | |
arch: x86_64 | |
- identifier: macos-universal-debug | |
name: 🍎 macOS (universal) Debug | |
runner: macos-latest | |
target: template_debug | |
platform: macos | |
arch: universal | |
- identifier: macos-universal-release | |
name: 🍎 macOS (universal) Release | |
runner: macos-latest | |
target: template_release | |
platform: macos | |
arch: universal | |
- identifier: windows-x64-debug | |
name: 🏁 Windows x64 Debug | |
runner: windows-latest | |
target: template_debug | |
platform: windows | |
arch: x86_64 | |
- identifier: windows-x64-release | |
name: 🏁 Windows x64 Release | |
runner: windows-latest | |
target: template_release | |
platform: windows | |
arch: x86_64 | |
- identifier: windows-x86-debug | |
name: 🏁 Windows x86 Debug | |
runner: windows-latest | |
target: template_debug | |
platform: windows | |
arch: x86_32 | |
- identifier: windows-x86-release | |
name: 🏁 Windows x86 Release | |
runner: windows-latest | |
target: template_release | |
platform: windows | |
arch: x86_32 | |
- identifier: android-arm64-debug | |
name: 🤖 Android arm64 Debug | |
runner: ubuntu-20.04 | |
target: template_debug | |
platform: android | |
arch: arm64 | |
- identifier: android-arm64-release | |
name: 🤖 Android arm64 Release | |
runner: ubuntu-20.04 | |
target: template_release | |
platform: android | |
arch: arm64 | |
- identifier: android-x86_64-debug | |
name: 🤖 Android x86_64 Debug | |
runner: ubuntu-20.04 | |
target: template_debug | |
platform: android | |
arch: x86_64 | |
- identifier: android-x86_64-release | |
name: 🤖 Android x86_64 Release | |
runner: ubuntu-20.04 | |
target: template_release | |
platform: android | |
arch: x86_64 | |
- identifier: android-arm32-debug | |
name: 🤖 Android arm32 Debug | |
runner: ubuntu-20.04 | |
target: template_debug | |
platform: android | |
arch: arm32 | |
- identifier: android-arm32-release | |
name: 🤖 Android arm32 Release | |
runner: ubuntu-20.04 | |
target: template_release | |
platform: android | |
arch: arm32 | |
- identifier: android-x86_32-debug | |
name: 🤖 Android x86_32 Debug | |
runner: ubuntu-20.04 | |
target: template_debug | |
platform: android | |
arch: x86_32 | |
- identifier: android-x86_32-release | |
name: 🤖 Android x86_32 Release | |
runner: ubuntu-20.04 | |
target: template_release | |
platform: android | |
arch: x86_32 | |
steps: | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.x" | |
- name: Set up SCons | |
shell: bash | |
run: | | |
python -c "import sys; print(sys.version)" | |
python -m pip install scons | |
scons --version | |
- name: Checkout project | |
uses: actions/checkout@v4 | |
with: | |
submodules: false | |
- name: Setup version | |
if: ${{ matrix.platform != 'windows' }} | |
run: | | |
python build_version.py >> $GITHUB_ENV | |
- name: Setup version (Windows) | |
if: ${{ matrix.platform == 'windows' }} | |
run: | | |
python build_version.py >> $env:GITHUB_ENV | |
- name: Checkout godot-cpp | |
uses: actions/checkout@v4 | |
with: | |
repository: godotengine/godot-cpp | |
path: godot-cpp | |
# 4.2-stable | |
ref: 54136ee8357c5140a3775c54f08db5f7deda2058 | |
submodules: recursive | |
- name: Checkout private EOS SDK repo | |
uses: actions/checkout@v4 | |
with: | |
token: ${{ secrets.PRIVATE_EOS_SDK_TOKEN }} | |
repository: Daylily-Zeleen/eos-sdk | |
path: thirdparty/eos-sdk | |
ref: main | |
- name: (Windows) Install mingw64 | |
if: ${{ matrix.platform == 'windows' }} | |
# change to egor-tensin/setup-mingw@v2 once pr #16 is merged | |
uses: e-t-l/setup-mingw@patch-1 | |
- name: (Linux) Install dependencies | |
if: ${{ matrix.platform == 'linux' }} | |
run: | | |
sudo apt-get update -qq | |
sudo apt-get install -qqq build-essential pkg-config | |
- name: (Linux32) Install dependencies | |
if: ${{ matrix.platform == 'linux' && matrix.arch == 'x86_32' }} | |
run: | | |
sudo apt-get install gcc-multilib g++-multilib | |
- name: (Android) Install dependencies | |
if: ${{ matrix.platform == 'android' }} | |
uses: nttld/setup-ndk@v1 | |
with: | |
ndk-version: r23c | |
link-to-sdk: true | |
- name: Setup build cache | |
uses: actions/cache@v4 | |
with: | |
path: ${{ github.workspace }}/.scons-cache/ | |
key: ${{ matrix.identifier }} | |
# key: ${{ matrix.identifier }}-${{ github.ref }} | |
restore-keys: | | |
# ${{ matrix.identifier }}-${{ github.ref }} | |
${{ matrix.identifier }} | |
continue-on-error: true | |
- name: Compile extension | |
shell: sh | |
env: | |
SCONS_CACHE: ${{ github.workspace }}/.scons-cache/ | |
SCONS_CACHE_LIMIT: 7168 | |
run: | | |
scons target='${{ matrix.target }}' platform='${{ matrix.platform }}' arch='${{ matrix.arch }}' | |
# - name: Copy extra files to addon folder | |
# shell: sh | |
# run: | | |
# cp -n '${{ github.workspace }}/README.md' '${{ github.workspace }}/README.zh.md' '${{ github.workspace }}/LICENSE' '${{ github.workspace }}/demo/addons/gd-eos/' | |
- name: Create artifact folder ${{ matrix.platform }}-${{ matrix.target }}-${{ matrix.arch }} | |
shell: sh | |
run: | | |
mkdir -p '${{ github.workspace }}/${{ matrix.platform }}-${{ matrix.target }}-${{ matrix.arch }}/artifact/${{ github.event.repository.name }}/' | |
- name: Create artifact folder for all in one. | |
shell: sh | |
run: | | |
mkdir -p '${{ github.workspace }}/artifact/${{ github.event.repository.name }}/' | |
- name: Copy addons folder to artifact folder ${{ matrix.platform }}-${{ matrix.target }}-${{ matrix.arch }} | |
shell: sh | |
run: | | |
cp -n -r '${{ github.workspace }}/demo/addons' '${{ github.workspace }}/${{ matrix.platform }}-${{ matrix.target }}-${{ matrix.arch }}/artifact/${{ github.event.repository.name }}/' | |
- name: Copy addons folder to artifact folder | |
shell: sh | |
run: | | |
cp -n -r '${{ github.workspace }}/demo/addons' '${{ github.workspace }}/artifact/${{ github.event.repository.name }}/' | |
- name: Upload artifact ${{ matrix.platform }}-${{ matrix.target }}-${{ matrix.arch }} | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ github.event.repository.name }}-${{ matrix.platform }}-${{ matrix.target }}-${{ matrix.arch }}-${{ env.BUILD_VERSION }}-${{ github.sha }} | |
path: | | |
${{ github.workspace }}/${{ matrix.platform }}-${{ matrix.target }}-${{ matrix.arch }}/artifact/ | |
retention-days: 14 | |
- name: Upload artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ github.event.repository.name }}-all-platforms-${{ env.BUILD_VERSION }}-${{ github.sha }} | |
path: | | |
${{ github.workspace }}/artifact/ | |
retention-days: 14 | |
if-no-files-found: error |