GDExtension #8
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: GDExtension | |
on: workflow_dispatch | |
jobs: | |
build: | |
name: ${{ matrix.name }} | |
runs-on: ${{ matrix.runner }} | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- identifier: Linux | |
name: Linux | |
runner: ubuntu-latest | |
platform: linux | |
arch: x86_64 | |
- identifier: Windows | |
name: Windows | |
runner: windows-latest | |
platform: windows | |
arch: x86_64 | |
steps: | |
- name: Checkout project | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Setup python and scons | |
uses: ./.github/actions/scons | |
- name: Setup MSVC | |
if: ${{ startsWith(matrix.identifier, 'Windows') }} | |
uses: ./.github/actions/msvc | |
- name: Compile | |
run: | | |
cd 4.x | |
scons target=template_debug platform='${{ matrix.platform }}' arch='${{ matrix.arch }}' -j2 | |
scons target=template_release platform='${{ matrix.platform }}' arch='${{ matrix.arch }}' -j2 | |
- name: Upload artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ github.event.repository.name }}-${{ matrix.platform }} | |
path: ${{ github.workspace }}/4.x/project/ | |
combine-artifacts: | |
name: Combine | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- name: Download and merge the artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
merge-multiple: true | |
path: artifacts | |
- name: Upload combined artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ github.event.repository.name }} | |
path: artifacts |