Next #513
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: Package V-Sekai SDK | |
on: | |
push: | |
branches: | |
- "main" | |
pull_request: | |
branches: | |
- "**" | |
concurrency: | |
group: ci-${{github.actor}}-${{github.head_ref || github.run_number}}-${{github.ref}}-deploy | |
cancel-in-progress: true | |
env: | |
GODOT_REF: groups-4.3.2024-07-02T224837Z | |
GODOT_REPOSITORY: v-sekai/godot | |
SCONSFLAGS: verbose=yes warnings=extra werror=no module_text_server_fb_enabled=yes use_thinlto=yes | |
DOTNET_NOLOGO: true | |
DOTNET_CLI_TELEMETRY_OPTOUT: true | |
EM_VERSION: 3.1.18 | |
EM_CACHE_FOLDER: "emsdk-cache" | |
jobs: | |
godot-build: | |
runs-on: ${{ matrix.os }} | |
name: ${{ matrix.name }} | |
strategy: | |
matrix: | |
include: | |
- name: vsekai_game_windows_x86_64 | |
os: ubuntu-22.04 | |
cache-name: windows-editor-x86_64 | |
target: editor | |
tests: false | |
sconsflags: linker=gold precision=double use_mingw=yes | |
doc-test: false | |
bin: ./19_godot/bin/godot.linuxbsd.editor.double.x86_64 | |
deploy-bin: ./19_godot/bin/godot.windows.editor.double.x86_64.exe | |
editor-bin-name: godot.windows.editor.double.x86_64.exe | |
proj-conv: false | |
artifact: true | |
platform: linuxbsd | |
deploy: true | |
deploy-pdb: false | |
deploy-platform: windows | |
export-platform: Windows | |
deploy-arch: x86_64 | |
arch: x86_64 | |
deploy-target: editor | |
game_name: vsekai_game | |
game-repository: v-sekai/v-sekai-game | |
game-repository-ref: bc396caf2a62ca93e9adf9ae6116e3804e5046df | |
- name: vsekai_game_linux_x86_64 | |
os: ubuntu-22.04 | |
cache-name: linux-editor-x86_64 | |
target: editor | |
tests: false | |
sconsflags: linker=gold precision=double use_llvm=yes | |
doc-test: false | |
bin: ./19_godot/bin/godot.linuxbsd.editor.double.x86_64.llvm | |
deploy-bin: ./19_godot/bin/godot.linuxbsd.editor.double.x86_64.llvm | |
editor-bin-name: godot.linuxbsd.editor.double.x86_64.llvm | |
proj-conv: false | |
artifact: true | |
platform: linuxbsd | |
deploy: true | |
deploy-platform: linux | |
export-platform: Linux | |
deploy-arch: x86_64 | |
arch: x86_64 | |
deploy-target: editor | |
game_name: vsekai_game | |
game-repository: v-sekai/v-sekai-game | |
game-repository-ref: bc396caf2a62ca93e9adf9ae6116e3804e5046df | |
- name: editor_web_wasm32 | |
os: ubuntu-22.04 | |
cache-name: web-editor-wasm32 | |
target: editor | |
tests: false | |
sconsflags: linker=gold precision=double | |
doc-test: false | |
bin: ./19_godot/bin/godot.web.editor.double.wasm32 | |
editor-bin-name: godot.web.editor.double.wasm32 | |
proj-conv: false | |
artifact: true | |
platform: web | |
deploy: false | |
export-platform: Web | |
build-arch: wasm32 | |
arch: wasm32 | |
- name: editor_android_arm64 | |
os: ubuntu-22.04 | |
cache-name: android-editor-arm64 | |
target: editor | |
tests: false | |
sconsflags: linker=gold precision=double use_llvm=yes module_mvsqlite_enabled=no module_speech_enabled=no | |
doc-test: false | |
bin: ./19_godot/bin/libgodot.android.editor.double.arm64.so | |
editor-bin-name: libgodot.android.editor.double.arm64.so | |
proj-conv: false | |
artifact: true | |
platform: android | |
export-platform: Android | |
arch: arm64 | |
deploy: false | |
steps: | |
- name: Harden Runner | |
uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1 | |
with: | |
egress-policy: audit | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Linux dependencies for gold linker | |
if: ${{ matrix.platform == 'linux' }} | |
run: | | |
sudo apt-get install -qq binutils | |
shell: bash | |
- name: Install MinGW | |
if: ${{ matrix.deploy-platform == 'windows' }} | |
run: | | |
sudo add-apt-repository ppa:savoury1/build-tools | |
sudo apt-get update | |
sudo apt-get install mingw-w64 | |
sudo update-alternatives --set x86_64-w64-mingw32-gcc /usr/bin/x86_64-w64-mingw32-gcc-posix | |
sudo update-alternatives --set x86_64-w64-mingw32-g++ /usr/bin/x86_64-w64-mingw32-g++-posix | |
shell: bash | |
- name: Setup Godot build cache | |
uses: ./.github/actions/godot-world-cache | |
with: | |
cache-name: ${{ matrix.cache-name }} | |
continue-on-error: true | |
- name: Setup Vulkan SDK | |
if: ${{ matrix.platform == 'macos' }} | |
run: | | |
sh ./.github/install_vulkan_sdk_macos.sh | |
- name: Set up Emscripten latest | |
if: ${{ matrix.platform == 'web' || matrix.deploy-platform == 'web'}} | |
uses: mymindstorm/setup-emsdk@6ab9eb1bda2574c4ddb79809fc9247783eaf9021 # v14 | |
with: | |
version: ${{env.EM_VERSION}} | |
actions-cache-folder: ${{env.EM_CACHE_FOLDER}} | |
- name: Verify Emscripten setup | |
if: ${{ matrix.platform == 'web' || matrix.deploy-platform == 'web'}} | |
run: | | |
emcc -v | |
shell: bash | |
- name: Setup python, scons and golang | |
uses: ./.github/actions/godot-world-deps | |
- name: Set up .NET Sdk | |
uses: actions/setup-dotnet@4d6c8fcf3c8f7a60068d26b594648e99df24cee3 # v4.0.0 | |
if: ${{ matrix.build-mono }} | |
with: | |
dotnet-version: "6.0.x" | |
- name: Setup GCC problem matcher | |
uses: ammaraskar/gcc-problem-matcher@0f9c86f9e693db67dacf53986e1674de5f2e5f28 # master | |
- name: Compilation | |
uses: ./.github/actions/godot-world-build | |
if: ${{ matrix.platform != 'android' }} | |
with: | |
sconsflags: ${{ env.SCONSFLAGS }} ${{ matrix.sconsflags }} | |
platform: ${{ matrix.platform }} | |
target: ${{ matrix.target }} | |
tests: ${{ matrix.tests }} | |
deploy: ${{ matrix.deploy }} | |
arch: ${{ matrix.arch }} | |
- name: Compilation | |
if: ${{ matrix.platform == 'macos' }} | |
uses: ./.github/actions/godot-world-build | |
with: | |
sconsflags: ${{ env.SCONSFLAGS }} ${{ matrix.sconsflags }} | |
platform: ${{ matrix.platform }} | |
target: ${{ matrix.target }} | |
tests: false | |
deploy: false | |
arch: x86_64 | |
- name: Compilation | |
if: ${{ matrix.platform == 'android' }} | |
uses: ./.github/actions/godot-world-build | |
with: | |
sconsflags: ${{ env.SCONSFLAGS }} ${{ matrix.sconsflags }} | |
platform: ${{ matrix.platform }} | |
target: ${{ matrix.target }} | |
tests: false | |
deploy: false | |
arch: arm32 | |
- name: Compilation | |
if: ${{ matrix.platform == 'android' }} | |
uses: ./.github/actions/godot-world-build | |
with: | |
sconsflags: ${{ env.SCONSFLAGS }} ${{ matrix.sconsflags }} generate_apk=yes | |
platform: ${{ matrix.platform }} | |
target: ${{ matrix.target }} | |
tests: false | |
deploy: false | |
arch: arm64 | |
- name: Compilation | |
if: ${{ matrix.deploy }} | |
uses: ./.github/actions/godot-world-build | |
with: | |
sconsflags: ${{ env.SCONSFLAGS }} ${{ matrix.sconsflags }} | |
platform: ${{ matrix.deploy-platform }} | |
target: ${{ matrix.deploy-target }} | |
tests: false | |
deploy: false | |
arch: ${{ matrix.deploy-arch }} | |
- name: generateGodotTemplates | |
if: ${{ matrix.arch == 'arm64' && matrix.platform == 'android' }} | |
run: | | |
cd 19_godot/platform/android/java | |
./gradlew generateGodotTemplates | |
shell: bash | |
- name: Export and Prepare Game Artifacts | |
if: ${{ matrix.deploy }} | |
uses: ./.github/actions/godot-world-godot-export | |
with: | |
deploy-platform: ${{ matrix.deploy-platform }} | |
export-platform: ${{ matrix.export-platform }} | |
bin: ${{ matrix.bin }} | |
deploy-bin: ${{ matrix.deploy-bin }} | |
game-name: ${{ matrix.GAME_NAME }} | |
game-repository: ${{ matrix.game-repository }} | |
game-repository-ref: ${{ matrix.game-repository-ref }} | |
- name: Generate C# glue | |
if: ${{ matrix.build-mono }} | |
run: | | |
${{ matrix.bin }} --headless --generate-mono-glue ./modules/mono/glue || true | |
shell: bash | |
- name: Build .NET solutions | |
if: ${{ matrix.build-mono }} | |
run: | | |
./modules/mono/build_scripts/build_assemblies.py --godot-output-dir=./bin --godot-platform=linuxbsd | |
shell: bash | |
- name: Unit tests | |
if: ${{ matrix.tests }} | |
run: | | |
${{ matrix.bin }} --version | |
${{ matrix.bin }} --help | |
${{ matrix.bin }} --test --headless | |
shell: bash | |
- name: Check for class reference updates | |
if: ${{ matrix.doc-test }} | |
run: | | |
echo "Running --doctool to see if this changes the public API without updating the documentation." | |
echo -e "If a diff is shown, it means that your code/doc changes are incomplete and you should update the class reference with --doctool.\n\n" | |
${{ matrix.bin }} --doctool --headless 2>&1 > /dev/null || true | |
git diff --color --exit-code && ! git ls-files --others --exclude-standard | sed -e 's/^/New doc file missing in PR: /' | grep 'xml$' | |
shell: bash | |
- name: Test project converter | |
if: ${{ matrix.proj-conv }} | |
run: | | |
mkdir -p converter_test | |
cd converter_test | |
touch project.godot | |
${{ matrix.bin }} --headless --validate-conversion-3to4 | |
cd .. | |
rm converter_test -rf | |
shell: bash | |
- name: Prepare artifact | |
if: ${{ matrix.artifact }} | |
run: | | |
chmod +x 19_godot/bin/godot.* || true | |
shell: bash |