Add github extensions (from godot template) #1
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: Build GDExtension | |
on: | |
workflow_call: | |
push: | |
env: | |
LIBNAME: example | |
jobs: | |
build: | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- platform: linux | |
float-precision: double | |
arch: x86_64 | |
os: ubuntu-20.04 | |
- platform: windows | |
float-precision: double | |
arch: x86_64 | |
os: windows-latest | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
submodules: true | |
fetch-depth: 0 | |
# Lint | |
#- name: Setup clang-format | |
# shell: bash | |
# run: | | |
# python -m pip install clang-format | |
#- name: Run clang-format | |
# shell: bash | |
# run: | | |
# clang-format src/** --dry-run --Werror | |
# Build | |
- name: 🔗 GDExtension Build | |
uses: ./.github/actions/build | |
with: | |
platform: ${{ matrix.platform }} | |
arch: ${{ matrix.arch }} | |
float-precision: ${{ matrix.float-precision }} | |
build-target-type: template_release | |
- name: Windows - Delete compilation files | |
if: ${{ matrix.platform == 'windows' }} | |
shell: pwsh | |
run: | | |
Remove-Item bin/* -Include *.exp,*.lib,*.pdb -Force | |
- name: Upload Artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: godot-cpp-template | |
path: | | |
${{ github.workspace }}/bin/** |