Skip to content

Commit

Permalink
github actions settings 9
Browse files Browse the repository at this point in the history
  • Loading branch information
erayzesen committed Dec 22, 2024
1 parent e93737f commit 026f5c9
Showing 1 changed file with 245 additions and 26 deletions.
271 changes: 245 additions & 26 deletions .github/workflows/builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,83 +2,295 @@ name: Build QuarkPhysics Extension
on:
workflow_call:
push:
pull_request:
merge_group:

env:
LIBNAME: example

jobs:
build:
strategy:
fail-fast: false
matrix:
include:
# Debug templates
- platform: linux
float-precision: single
arch: x86_64
target-type: template_debug
os: ubuntu-20.04

- platform: windows
float-precision: single
arch: x86_32
target-type: template_debug
os: windows-latest

- platform: windows
float-precision: single
arch: x86_64
target-type: template_debug
os: windows-latest

- platform: macos
float-precision: single
arch: universal
target-type: template_debug
os: macos-latest

- platform: android
float-precision: single
arch: arm64
target-type: template_debug
os: ubuntu-20.04

- platform: android
float-precision: single
arch: arm32
target-type: template_debug
os: ubuntu-20.04

- platform: android
float-precision: single
arch: x86_64
target-type: template_debug
os: ubuntu-20.04

- platform: android
float-precision: single
arch: x86_32
target-type: template_debug
os: ubuntu-20.04

- platform: ios
float-precision: single
arch: arm64
target-type: template_debug
os: macos-latest

- platform: web
float-precision: single
arch: wasm32
target-type: template_debug
os: ubuntu-20.04

# Release templates
- platform: linux
float-precision: single
arch: x86_64
target-type: template_release
os: ubuntu-20.04

# - platform: windows
# float-precision: single
# arch: x86_32
# target-type: template_release
# os: windows-latest

# - platform: windows
# float-precision: single
# arch: x86_64
# target-type: template_release
# os: windows-latest

# - platform: macos
# float-precision: single
# arch: universal
# target-type: template_release
# os: macos-latest

# - platform: android
# float-precision: single
# arch: arm64
# target-type: template_release
# os: ubuntu-20.04

# - platform: android
# float-precision: single
# arch: arm32
# target-type: template_release
# os: ubuntu-20.04

# - platform: android
# float-precision: single
# arch: x86_64
# target-type: template_release
# os: ubuntu-20.04

# - platform: android
# float-precision: single
# arch: x86_32
# target-type: template_release
# os: ubuntu-20.04

# - platform: ios
# float-precision: single
# arch: arm64
# target-type: template_release
# os: macos-latest

# - platform: web
# float-precision: single
# arch: wasm32
# target-type: template_release
# os: ubuntu-20.04

# Double precision templates
# Double precision debug templates
- platform: linux
float-precision: double
arch: x86_64
target-type: template_debug
os: ubuntu-20.04

- platform: windows
float-precision: double
arch: x86_32
target-type: template_debug
os: windows-latest

- platform: windows
float-precision: double
arch: x86_64
target-type: template_debug
os: windows-latest

- platform: macos
float-precision: double
arch: universal
target-type: template_debug
os: macos-latest

- platform: android
float-precision: double
arch: arm64
target-type: template_debug
os: ubuntu-20.04

- platform: android
float-precision: double
arch: arm32
target-type: template_debug
os: ubuntu-20.04

- platform: android
float-precision: double
arch: x86_64
target-type: template_debug
os: ubuntu-20.04

- platform: android
float-precision: double
arch: x86_32
target-type: template_debug
os: ubuntu-20.04

- platform: ios
float-precision: double
arch: arm64
target-type: template_debug
os: macos-latest

- platform: web
float-precision: double
arch: wasm32
target-type: template_debug
os: ubuntu-20.04

# Double precision release templates
- platform: linux
float-precision: double
arch: x86_64
target-type: template_release
os: ubuntu-20.04

# - platform: windows
# float-precision: double
# arch: x86_32
# target-type: template_release
# os: windows-latest

# - platform: windows
# float-precision: double
# arch: x86_64
# target-type: template_release
# os: windows-latest

# - platform: macos
# float-precision: double
# arch: universal
# target-type: template_release
# os: macos-latest

# - platform: android
# float-precision: double
# arch: arm64
# target-type: template_release
# os: ubuntu-20.04

# - platform: android
# float-precision: double
# arch: arm32
# target-type: template_release
# os: ubuntu-20.04

# - platform: android
# float-precision: double
# arch: x86_64
# target-type: template_release
# os: ubuntu-20.04

# - platform: android
# float-precision: double
# arch: x86_32
# target-type: template_release
# os: ubuntu-20.04

# - platform: ios
# float-precision: double
# arch: arm64
# target-type: template_release
# os: macos-latest

# - platform: web
# float-precision: double
# arch: wasm32
# target-type: template_release
# os: ubuntu-20.04
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: true

- name: Copy Project Directory
run: |
# Proje klasörünü kopyala
cp -r ${{ github.workspace }}/project ${{ github.workspace }}/project_copy

- name: 🔗 GDExtension Build
uses: godotengine/godot-cpp-template/.github/actions/build@main
with:
platform: ${{ matrix.platform }}
arch: ${{ matrix.arch }}
float-precision: single
build-target-type: template_release
# 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

- name: 🔗 GDExtension Build (Debug)
# Build
- name: 🔗 GDExtension Debug Build
uses: ./.github/actions/build
with:
platform: ${{ matrix.platform }}
arch: ${{ matrix.arch }}
float-precision: ${{ matrix.float-precision }}
build-target-type: template_debug

- name: Move Build Outputs to Target Directory
run: |
# Derleme çıktılarını project/addons/quarkphysics/bin klasörüne taşı
mkdir -p ${{ github.workspace }}/project_copy/addons/quarkphysics/bin
cp -r ${{ github.workspace }}/bin/* ${{ github.workspace }}/project_copy/addons/quarkphysics/bin
build-target-type: ${{ matrix.target-type }}

# Sign
- name: Mac Sign
# Disable sign if secrets are not set
if: ${{ matrix.platform == 'macos' && env.APPLE_CERT_BASE64 }}
env:
APPLE_CERT_BASE64: ${{ secrets.APPLE_CERT_BASE64 }}
uses: godotengine/godot-cpp-template/.github/actions/sign@main
uses: ./.github/actions/sign
with:
FRAMEWORK_PATH: bin/macos/macos.framework
APPLE_CERT_BASE64: ${{ secrets.APPLE_CERT_BASE64 }}
Expand All @@ -88,20 +300,27 @@ jobs:
APPLE_DEV_TEAM_ID: ${{ secrets.APPLE_DEV_TEAM_ID }}
APPLE_DEV_APP_ID: ${{ secrets.APPLE_DEV_APP_ID }}

- 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@v4
with:
name: GDExtension-${{ matrix.platform }}-${{ matrix.arch }}
name: godot-cpp-template-${{ matrix.platform }}-${{ matrix.arch }}-${{ matrix.float-precision }}-${{ matrix.target-type }}
path: |
${{ github.workspace }}/project_copy/**
${{ github.workspace }}/bin/**
# Merges all the build artifacts together into a single godot-cpp-template artifact.
# If you comment out this step, all the builds will be uploaded individually.
merge:
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
needs: build
steps:
- name: Merge Artifacts
uses: actions/upload-artifact/merge@v4
with:
name: GDExtension-all
pattern: GDExtension-*
name: godot-cpp-template
pattern: godot-cpp-template-*
delete-merged: true

0 comments on commit 026f5c9

Please sign in to comment.