Skip to content

Commit 22190d4

Browse files
committed
rework: make actions matrix build only clone whats needed
1 parent 28d8d6d commit 22190d4

1 file changed

Lines changed: 34 additions & 18 deletions

File tree

.github/workflows/build_android.yml

Lines changed: 34 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -14,28 +14,44 @@ jobs:
1414
build:
1515
runs-on: ubuntu-latest
1616
strategy:
17-
matrix:
18-
module: [
19-
"MobileGlues",
20-
"kopper-zink",
21-
"HolyGL4ES",
22-
"krypton_wrapper",
23-
"SDL",
24-
"zstd",
25-
"imgui-java",
26-
"arc_dns_injector",
27-
"lwjgl-build",
28-
"openal-soft",
29-
"angle"
30-
]
17+
matrix:
18+
- module: "MobileGlues"
19+
path: "renderers/MobileGlues"
20+
- module: "kopper-zink"
21+
path: "renderers/mesa-libs/*"
22+
- module: "HolyGL4ES"
23+
path: "renderers/HolyGL4ES"
24+
- module: "krypton_wrapper"
25+
path: "renderers/krypton_wrapper"
26+
- module: "SDL"
27+
path: "SDL/*"
28+
- module: "zstd"
29+
path: "misc/zstd"
30+
- module: "imgui-java"
31+
path: "misc/imgui-java"
32+
- module: "arc_dns_injector"
33+
path: "misc/arc_dns_injector"
34+
- module: "lwjgl3"
35+
path: "misc/lwjgl-classes/*"
36+
- module: "openal-soft"
37+
path: "misc/openal-soft"
38+
- module: "angle" # ANGLE needs special treatment with depot-tools
39+
path: "renderers/ANGLE"
3140
steps:
3241
- name: Checkout
3342
uses: actions/checkout@v4
3443
with:
35-
submodules: "recursive"
36-
- name: Initialize ANGLE manually # depot-tools is the proper tool to handle the nested submodules so we block git recursively checking those out and just init the repo without submodules.
44+
submodules: false
45+
fetch-depth: 1
46+
- name: Checkout only submodule to be built
3747
run: |
38-
git submodule update --init --depth 1 --checkout renderers/ANGLE/angle
48+
MODULE_NAME="${{ matrix.module }}"
49+
MODULE_PATH="${{ matrix.path }}"
50+
if [ "$MODULE_NAME" == "angle" ]; then # ANGLE's special treatment. depot-tools is the one that clones submodules properly.
51+
git submodule update --init --depth 1 "$MODULE_PATH"
52+
else
53+
git submodule update --init --recursive --depth 1 "$MODULE_PATH"
54+
fi
3955
- name: Set up JDK 8
4056
id: jdk8
4157
uses: actions/setup-java@v4
@@ -58,7 +74,7 @@ jobs:
5874
~/.gradle/wrapper
5975
key: gradle-${{ runner.os }}-${{ matrix.module }}-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
6076
restore-keys: |
61-
gradle-${{ runner.os }}-${{ matrix.module }}-
77+
gradle-${{ runner.os }}-${{ matrix.module }}
6278
- name: Build everything
6379
run: |
6480
sudo apt install -y python3-mako meson

0 commit comments

Comments
 (0)