forked from godot-dlang/godot-dlang
-
Notifications
You must be signed in to change notification settings - Fork 0
82 lines (69 loc) · 3.22 KB
/
d.yml
File metadata and controls
82 lines (69 loc) · 3.22 KB
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
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
name: D
on:
push:
branches: [ main, master, develop, godot-4.2 ]
pull_request:
branches: [ main, master, develop, godot-4.2 ]
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
engine_version: [ '4.2.2', '4.3', '4.4.1' ]
flavor: ['structs', 'classes']
steps:
- uses: actions/checkout@v4
- uses: dlang-community/setup-dlang@v1
with:
compiler: ldc-latest
- uses: dsaltares/fetch-gh-release-asset@master
with:
repo: 'godotengine/godot'
version: 'tags/${{matrix.engine_version}}-stable'
file: 'Godot_v${{matrix.engine_version}}-stable_linux.x86_64.zip'
- name: 'Godot doesnt works without X server'
run: export DISPLAY=:99
sudo Xvfb -ac :99 -screen 0 1280x1024x24 > /dev/null 2>&1 &
- name: 'Get godot & dump api'
run: |
sudo apt-get install -y unzip
unzip Godot_v${{matrix.engine_version}}-stable_linux.x86_64.zip
export GDEXE=./Godot_v${{matrix.engine_version}}-stable_linux.x86_64
echo "GDEXE=$GDEXE" >> $GITHUB_ENV
$GDEXE --headless --dump-extension-api
- name: 'Generate bindings'
# braces block adds an extra build flags based on flavor, the general syntax is `expr && truthy || falsy`
run: dub run :generator --verbose -- -j extension_api.json -o ${{ matrix.flavor == 'classes' && '-c' || '' }}
- name: 'Build Test Project'
run: |
dub build :test --verbose --compiler=$DC ${{ matrix.flavor == 'classes' && '-c classes' || ''}}
- name: 'Build Asteroids Project'
# not updated yet so can't test for classes
if: matrix.flavor == 'structs'
run: |
dub build :asteroids --verbose --compiler=$DC
- name: 'Run demo project'
# currently both godot and godot-dlang doesn't exits cleanly
# yet it is useful to see if there is any potential logic errors
continue-on-error: false
# a fancy workaround of an issue with being unable to generate assets required to run
# https://github.com/godotengine/godot-proposals/issues/1362#issuecomment-1379140108
run: |
timeout 60 xvfb-run "${{ env.GDEXE }}" --audio-driver Dummy --editor --quit --headless --path ./examples/test/project || true
timeout 10 "${{ env.GDEXE }}" --verbose --headless --path ./examples/test/project 2>&1 | tee sanitizers_log.txt || true
python3 misc/scripts/check_ci_log.py sanitizers_log.txt
- name: 'Run Asteroids project'
# not updated yet so can't test for classes
if: matrix.flavor == 'structs'
# currently both godot and godot-dlang doesn't exits cleanly
continue-on-error: false
run: |
timeout 60 xvfb-run "${{ env.GDEXE }}" --audio-driver Dummy --editor --quit --headless --path ./examples/asteroids/project || true
timeout 10 "${{ env.GDEXE }}" --verbose --headless --path ./examples/asteroids/project 2>&1 | tee sanitizers_log.txt || true
python3 misc/scripts/check_ci_log.py sanitizers_log.txt