-
-
Notifications
You must be signed in to change notification settings - Fork 260
143 lines (128 loc) · 5.4 KB
/
extension_builds.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
name: ⚙️ Extension Builds
on:
# push:
# branches: [ master ]
# pull_request:
# branches: [ master ]
# workflow_call:
workflow_dispatch:
concurrency:
# Not using `${{ github.workflow }}` because when called from another workflow, it takes the value of the caller,
# which leads to unexpected cancellation.
# See https://github.com/orgs/community/discussions/30708
# group: ${{ github.workflow }}-${{ github.ref }}
group: extension-builds-${{ github.ref }}
cancel-in-progress: true
env:
GODOT_CPP_PATH: thirdparty/godot-cpp
LIB_NAME: libvoxel
jobs:
build:
strategy:
fail-fast: false
matrix:
# A build is made for every possible combination of parameters
# You can add or remove entries from the arrays of each parameter to customize which builds you want to run
# See https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/running-variations-of-jobs-in-a-workflow
target:
[
{ platform: linux, arch: x86_64, os: ubuntu-22.04 },
{ platform: windows, arch: x86_64, os: windows-latest },
# { platform: windows, arch: x86_32, os: windows-latest },
{ platform: macos, arch: universal, os: macos-latest },
{ platform: android, arch: arm64, os: ubuntu-22.04 },
# { platform: android, arch: arm32, os: ubuntu-22.04 },
{ platform: android, arch: x86_64, os: ubuntu-22.04 },
# { platform: android, arch: x86_32, os: ubuntu-22.04 },
{ platform: ios, arch: arm64, os: macos-latest },
# { platform: web, arch: wasm32, os: ubuntu-22.04 }
]
target-type: [editor, template_release]
float-precision: [single, double]
# include: # Also build a release version for these specific targets. Remove if you add template_release above.
# - target: { platform: linux, arch: x86_64, os: ubuntu-22.04 }
# target-type: template_release
# float-precision: single
# - target: { platform: linux, arch: x86_64, os: ubuntu-22.04 }
# target-type: template_release
# float-precision: double
runs-on: ${{ matrix.target.os }}
steps:
# Clone our repo
- uses: actions/checkout@v4
# 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
# Get GodotCpp
- name: Checkout GodotCpp
uses: actions/checkout@v4
with:
repository: godotengine/godot-cpp
ref: master
path: ${{env.GODOT_CPP_PATH}}
# Setup dependencies (Python, SCons, Android SDK...)
- name: Setup godot-cpp
# uses: ${{env.GODOT_CPP_PATH}}/.github/actions/setup-godot-cpp
uses: ./thirdparty/godot-cpp/.github/actions/setup-godot-cpp
with:
platform: ${{ matrix.target.platform }}
em-version: 3.1.62
# windows-compiler: msvc
# Load build cache
- name: Cache .scons_cache
uses: actions/cache@v4
with:
path: ${{ github.workspace }}/.scons-cache/
key: ${{ matrix.target.platform }}_${{ matrix.target.arch }}_${{ matrix.float-precision }}_${{ matrix.target-type }}_gdextension_cache
- name: Build
shell: sh
env:
SCONS_CACHE: ${{ github.workspace }}/.scons-cache/
run: |
scons target=${{ matrix.target-type }} platform=${{ matrix.target.platform }} arch=${{ matrix.target.arch }} precision=${{ matrix.float-precision }} dev_build=no
# Sign the binary (macOS only)
# - name: Mac Sign
# # Disable sign if secrets are not set
# if: ${{ matrix.target.platform == 'macos' && env.APPLE_CERT_BASE64 }}
# env:
# APPLE_CERT_BASE64: ${{ secrets.APPLE_CERT_BASE64 }}
# uses: ./.github/actions/sign
# with:
# FRAMEWORK_PATH: bin/macos/macos.framework
# APPLE_CERT_BASE64: ${{ secrets.APPLE_CERT_BASE64 }}
# APPLE_CERT_PASSWORD: ${{ secrets.APPLE_CERT_PASSWORD }}
# APPLE_DEV_PASSWORD: ${{ secrets.APPLE_DEV_PASSWORD }}
# APPLE_DEV_ID: ${{ secrets.APPLE_DEV_ID }}
# APPLE_DEV_TEAM_ID: ${{ secrets.APPLE_DEV_TEAM_ID }}
# APPLE_DEV_APP_ID: ${{ secrets.APPLE_DEV_APP_ID }}
# Clean up compilation files
# - name: Windows - Delete compilation files
# if: ${{ matrix.target.platform == 'windows' }}
# shell: pwsh
# run: |
# Remove-Item bin/* -Include *.exp,*.lib,*.pdb -Force
# Upload the build
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: ${{env.LIB_NAME}}-${{ matrix.target.platform }}-${{ matrix.target.arch }}-${{ matrix.float-precision }}-${{ matrix.target-type }}
path: |
${{ github.workspace }}/project/addons/zylann.voxel/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-22.04
needs: build
steps:
- name: Merge Artifacts
uses: actions/upload-artifact/merge@v4
with:
name: ${{env.LIB_NAME}}
pattern: ${{env.LIB_NAME}}-*
delete-merged: true