Skip to content
This repository was archived by the owner on Dec 29, 2024. It is now read-only.

Commit 97504a9

Browse files
committed
add IOS, Android and Web (#126)
1 parent 5a43565 commit 97504a9

18 files changed

Lines changed: 1050 additions & 209 deletions
Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,120 @@
1+
name: 🤖 Android
2+
on:
3+
workflow_call:
4+
inputs:
5+
fullbuild:
6+
description: "Weather or not to build all targets"
7+
required: true
8+
type: boolean
9+
default: false
10+
11+
env:
12+
BASE_BRANCH: main
13+
SCONSFLAGS: "production=yes extra_suffix=luaAPI"
14+
SCONS_CACHE_LIMIT: 7168
15+
GODOT_VERSION: ${{ vars.GODOT_VERSION }}-stable
16+
17+
jobs:
18+
android-builds:
19+
runs-on: "ubuntu-20.04"
20+
name: ${{ matrix.opts.name }}
21+
strategy:
22+
fail-fast: false
23+
matrix:
24+
opts:
25+
- name: Android Template (target=template_debug,arch=arm64)
26+
cache-name: android-debug-arm64
27+
artifact-name: android-templates
28+
build-options: "target=template_debug arch=arm64"
29+
should-run: true
30+
31+
- name: Android Template (target=template_debug,arch=arm32)
32+
cache-name: android-debug-arm32
33+
artifact-name: android-templates
34+
build-options: "target=template_debug arch=arm32"
35+
should-run: ${{ inputs.fullbuild }}
36+
37+
- name: Android Template (target=template_debug,arch=x86_64)
38+
cache-name: android-debug-x86_64
39+
artifact-name: android-templates
40+
build-options: "target=template_debug arch=x86_64"
41+
should-run: ${{ inputs.fullbuild }}
42+
43+
- name: Android Template (target=template_debug,arch=x86_32)
44+
cache-name: android-debug-x86_32
45+
artifact-name: android-templates
46+
build-options: "target=template_debug arch=x86_32"
47+
should-run: ${{ inputs.fullbuild }}
48+
49+
- name: Android Template (target=template_release,arch=arm64)
50+
cache-name: android-debug-arm64
51+
artifact-name: android-templates
52+
build-options: "target=template_release arch=arm64"
53+
should-run: ${{ inputs.fullbuild }}
54+
55+
- name: Android Template (target=template_release,arch=arm32)
56+
cache-name: android-debug-arm32
57+
artifact-name: android-templates
58+
build-options: "target=template_release arch=arm32"
59+
should-run: ${{ inputs.fullbuild }}
60+
61+
- name: Android Template (target=template_release,arch=x86_64)
62+
cache-name: android-debug-x86_64
63+
artifact-name: android-templates
64+
build-options: "target=template_release arch=x86_64"
65+
should-run: ${{ inputs.fullbuild }}
66+
67+
- name: Android Template (target=template_release,arch=x86_32)
68+
cache-name: android-debug-x86_32
69+
artifact-name: android-templates
70+
build-options: "target=template_release arch=x86_32"
71+
should-run: ${{ inputs.fullbuild }}
72+
73+
exclude:
74+
- {opts: {should-run: false}}
75+
76+
steps:
77+
- uses: actions/checkout@v3
78+
with:
79+
submodules: recursive
80+
81+
- name: Set up Java 11
82+
uses: actions/setup-java@v3
83+
with:
84+
distribution: temurin
85+
java-version: 11
86+
87+
- name: Load .scons_cache directory
88+
uses: actions/cache@v2
89+
with:
90+
path: ${{github.workspace}}/.scons_cache/
91+
key: ${{matrix.opts.cache-name}}-${{env.BASE_BRANCH}}-${{github.ref}}-${{github.sha}}
92+
restore-keys: |
93+
${{matrix.opts.cache-name}}-${{env.BASE_BRANCH}}-${{github.ref}}-${{github.sha}}
94+
${{matrix.opts.cache-name}}-${{env.BASE_BRANCH}}-${{github.ref}}
95+
${{matrix.opts.cache-name}}-${{env.BASE_BRANCH}}
96+
97+
- name: Set up Python 3.x
98+
uses: actions/setup-python@v2
99+
with:
100+
python-version: "3.x"
101+
architecture: "x64"
102+
103+
- name: Configuring Python packages
104+
run: |
105+
python -c "import sys; print(sys.version)"
106+
python -m pip install scons
107+
python --version
108+
scons --version
109+
110+
- name: Compilation
111+
working-directory: ./scripts
112+
env:
113+
SCONS_CACHE: ${{github.workspace}}/.scons_cache/
114+
run: |
115+
scons platform=android ${{ matrix.opts.build-options }} ${{ env.SCONSFLAGS }}
116+
117+
- uses: actions/upload-artifact@v2
118+
with:
119+
name: ${{matrix.opts.artifact-name}}
120+
path: scripts/godot/platform/android/java/lib/libs/*
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
name: 🤖 Android Package
2+
on:
3+
workflow_call:
4+
5+
jobs:
6+
android-package:
7+
runs-on: "ubuntu-20.04"
8+
name: ${{ matrix.opts.name }}
9+
strategy:
10+
fail-fast: false
11+
matrix:
12+
opts:
13+
- name: Android Templates
14+
artifact-name: android-templates
15+
final-artifact-name: export-templates
16+
17+
steps:
18+
- uses: actions/checkout@v3
19+
20+
- name: Checkout Godot
21+
uses: actions/checkout@v3
22+
with:
23+
repository: godotengine/godot
24+
ref: master
25+
path: scripts/godot
26+
27+
- name: Download Artifact
28+
id: download-artifact
29+
uses: actions/download-artifact@v2
30+
with:
31+
name: ${{ matrix.opts.artifact-name }}
32+
path: scripts/godot/platform/android/java/lib/libs
33+
34+
- name: Delete Artifact
35+
uses: geekyeggo/delete-artifact@v2
36+
with:
37+
name: ${{ matrix.opts.artifact-name }}
38+
39+
- name: Set up Java 11
40+
uses: actions/setup-java@v3
41+
with:
42+
distribution: temurin
43+
java-version: 11
44+
45+
- name: Set up Python 3.x
46+
uses: actions/setup-python@v2
47+
with:
48+
python-version: "3.x"
49+
architecture: "x64"
50+
51+
- name: Configuring Python packages
52+
run: |
53+
python -c "import sys; print(sys.version)"
54+
python -m pip install scons
55+
python --version
56+
scons --version
57+
58+
- name: Make apk (template)
59+
working-directory: ./scripts/godot
60+
run: |
61+
cd platform/android/java
62+
./gradlew generateGodotTemplates
63+
cd ../../..
64+
mkdir templates
65+
cp bin/android_source.zip templates/android_source.zip
66+
cp bin/android_debug.apk templates/android_debug.apk
67+
cp bin/android_release.apk templates/android_release.apk
68+
rm -rf bin/*
69+
mv templates bin/templates
70+
71+
- uses: actions/upload-artifact@v2
72+
with:
73+
name: ${{ matrix.opts.final-artifact-name }}
74+
path: scripts/godot/bin/*

.github/workflows/gdextension-unit-tests.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: ⚙️ GDExtension Unit Tests
22
on:
33
workflow_call:
4-
4+
55
env:
66
BASE_BRANCH: main
77

@@ -12,8 +12,8 @@ jobs:
1212
name: GDExtension Unit Tests
1313
steps:
1414
- uses: actions/checkout@v3
15-
- name: Download godot 4.0.3
16-
run: wget -O godot.zip https://downloads.tuxfamily.org/godotengine/4.0.3/Godot_v4.0.3-stable_linux.x86_64.zip
15+
- name: Download godot ${{ vars.GODOT_VERSION }}
16+
run: wget -O godot.zip https://downloads.tuxfamily.org/godotengine/${{ vars.GODOT_VERSION }}/Godot_v${{ vars.GODOT_VERSION }}-stable_linux.x86_64.zip
1717
- name: Extract godot
1818
run: |
1919
7z x godot.zip
@@ -42,8 +42,8 @@ jobs:
4242
name: LuaJIT GDExtension Unit Tests
4343
steps:
4444
- uses: actions/checkout@v3
45-
- name: Download godot 4.0.3
46-
run: wget -O godot.zip https://downloads.tuxfamily.org/godotengine/4.0.3/Godot_v4.0.3-stable_linux.x86_64.zip
45+
- name: Download godot ${{ vars.GODOT_VERSION }}
46+
run: wget -O godot.zip https://downloads.tuxfamily.org/godotengine/${{ vars.GODOT_VERSION }}/Godot_v${{ vars.GODOT_VERSION }}-stable_linux.x86_64.zip
4747
- name: Extract godot
4848
run: |
4949
7z x godot.zip

0 commit comments

Comments
 (0)