-
-
Notifications
You must be signed in to change notification settings - Fork 3
121 lines (105 loc) · 3.3 KB
/
build_gdextension.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
name: 🔌 Build GDExtension libs
on:
workflow_call:
inputs:
ref:
type: string
default: ''
description: 'The branch, tag or SHA to checkout (leave empty for event SHA)'
workflow_dispatch:
inputs:
ref:
type: string
default: ''
description: 'The branch, tag or SHA to checkout (leave empty for event SHA)'
env:
# Default SCons flags applied to each build.
SCONSFLAGS: verbose=yes debug_symbols=yes symbols_visibility=visible
jobs:
build:
name: ${{matrix.name}}
runs-on: ${{matrix.runner}}
strategy:
fail-fast: false
matrix:
include:
- name: 🐧 Linux (x86_64, release)
runner: ubuntu-22.04
platform: linux
target: template_release
arch: x86_64
- name: 🐧 Linux (x86_64, debug)
runner: ubuntu-22.04
platform: linux
target: editor
arch: x86_64
- name: 🪟 Windows (x86_64, release)
runner: windows-latest
platform: windows
target: template_release
arch: x86_64
- name: 🪟 Windows (x86_64, debug)
runner: windows-latest
platform: windows
target: editor
arch: x86_64
- name: 🍎 macOS (universal, release)
runner: macos-latest
platform: macos
target: template_release
arch: universal
- name: 🍎 macOS (universal, debug)
runner: macos-latest
platform: macos
target: editor
arch: universal
steps:
- name: Checkout repo and submodules
uses: actions/checkout@v4
with:
submodules: recursive
ref: ${{inputs.ref}}
- name: Install Linux dependencies
if: matrix.platform == 'linux'
run: |
sudo apt update
sudo apt install libcurl4-openssl-dev
- name: Install SCons
run: |
python -m pip install scons
python --version
scons --version
- name: Compile GDExtension library
shell: bash
run: |
scons platform=${{matrix.platform}} target=${{matrix.target}} arch=${{matrix.arch}}
- name: Separate debug symbols on Linux
if: matrix.platform == 'linux'
env:
BUILD_TYPE: ${{matrix.target == 'template_release' && 'release' || 'debug'}}
shell: bash
run: |
cd project/addons/sentrysdk/bin/linux/
lib=libsentrysdk.${{matrix.platform}}.${BUILD_TYPE}.${{matrix.arch}}.so
objcopy --only-keep-debug ${lib} ${lib}.debug
objcopy --add-gnu-debuglink ${lib}.debug ${lib}
strip --strip-debug ${lib}
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: libsentrysdk.${{matrix.platform}}.${{matrix.target}}.${{matrix.arch}}
path: |
project/
!project/addons/gdUnit4
!project/test/
package:
name: 📦 Package GDExtension
runs-on: ubuntu-22.04
needs: build
steps:
- name: Merge artifacts
uses: actions/upload-artifact/merge@v4
with:
name: sentry-godot-gdextension
pattern: libsentrysdk.*
delete-merged: true