Skip to content

Commit 9ba9b35

Browse files
committed
add option to not only build teh release for 3ds, switch and android, build debug per default, but use release in CI
1 parent 3640622 commit 9ba9b35

File tree

5 files changed

+32
-12
lines changed

5 files changed

+32
-12
lines changed

.github/workflows/android.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ jobs:
5050
5151
- name: Build natibe libraries
5252
run: |
53-
bash ./platforms/build-android.sh ${{ matrix.config.arch }}
53+
bash ./platforms/build-android.sh ${{ matrix.config.arch }} complete_rebuild release
5454
cp -r ./assets/ platforms/android/app/src/main
5555
5656
- name: Build APK

.github/workflows/nintendo.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
4444
- name: Configure and Build
4545
run: |
46-
bash ./platforms/build-${{ matrix.config.name }}.sh
46+
bash ./platforms/build-${{ matrix.config.name }}.sh complete_rebuild release
4747
4848
- name: Upload artifacts
4949
uses: actions/upload-artifact@v4

platforms/build-3ds.sh

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -215,13 +215,18 @@ cd ..
215215
## options: "smart, complete_rebuild"
216216
export COMPILE_TYPE="smart"
217217

218+
export BUILDTYPE="debug"
219+
218220
if [ "$#" -eq 0 ]; then
219221
# nothing
220222
echo "Using compile type '$COMPILE_TYPE'"
221223
elif [ "$#" -eq 1 ]; then
222224
COMPILE_TYPE="$1"
225+
elif [ "$#" -eq 2 ]; then
226+
COMPILE_TYPE="$1"
227+
BUILDTYPE="$2"
223228
else
224-
echo "Too many arguments given, expected at most 1"
229+
echo "Too many arguments given, expected 1 or 2"
225230
exit 1
226231
fi
227232

@@ -247,7 +252,7 @@ if [ "$COMPILE_TYPE" == "complete_rebuild" ] || [ ! -e "$BUILD_DIR" ]; then
247252
meson setup "$BUILD_DIR" \
248253
"--wipe" \
249254
--cross-file "$CROSS_FILE" \
250-
-Dbuildtype=release \
255+
"-Dbuildtype=$BUILDTYPE" \
251256
-Ddefault_library=static
252257

253258
fi

platforms/build-android.sh

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@
22

33
set -e
44

5-
## options: "smart, complete_rebuild"
6-
export COMPILE_TYPE="smart"
7-
85
mkdir -p toolchains
96

107
export NDK_VER_DOWNLOAD="r26d"
@@ -47,10 +44,15 @@ mapfile -t ARCH_KEYS < <(jq 'keys' -M -r -c "$BASE_PATH/meta/abis.json" | tr -d
4744

4845
export ARCH_KEYS_INDEX=("${!ARCH_KEYS[@]}")
4946

47+
## options: "smart, complete_rebuild"
48+
export COMPILE_TYPE="smart"
49+
50+
export BUILDTYPE="debug"
51+
5052
if [ "$#" -eq 0 ]; then
5153
# nothing
5254
echo "Using all architectures"
53-
elif [ "$#" -eq 1 ]; then
55+
elif [ "$#" -eq 1 ] || [ "$#" -eq 2 ] || [ "$#" -eq 3 ]; then
5456
ARCH=$1
5557

5658
FOUND=""
@@ -67,8 +69,16 @@ elif [ "$#" -eq 1 ]; then
6769
fi
6870

6971
ARCH_KEYS_INDEX=("$FOUND")
72+
73+
if [ "$#" -eq 2 ]; then
74+
COMPILE_TYPE="$2"
75+
elif [ "$#" -eq 3 ]; then
76+
COMPILE_TYPE="$2"
77+
BUILDTYPE="$3"
78+
fi
79+
7080
else
71-
echo "Too many arguments given, expected at most 1"
81+
echo "Too many arguments given, expected 1 ,2 or 3"
7282
exit 1
7383
fi
7484

@@ -334,7 +344,7 @@ EOF
334344
"--includedir=$INC_PATH" \
335345
"--libdir=usr/lib/$ARM_NAME_TRIPLE/$SDK_VERSION" \
336346
--cross-file "./platforms/crossbuild-android-$ARM_TARGET_ARCH.ini" \
337-
-Dbuildtype=release \
347+
"-Dbuildtype=$BUILDTYPE" \
338348
-Dsdl2:use_hidapi=disabled \
339349
-Dcpp_args=-DAUDIO_PREFER_MP3 \
340350
-Dclang_libcpp=disabled

platforms/build-switch.sh

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,13 +112,18 @@ EOF
112112
## options: "smart, complete_rebuild"
113113
export COMPILE_TYPE="smart"
114114

115+
export BUILDTYPE="debug"
116+
115117
if [ "$#" -eq 0 ]; then
116118
# nothing
117119
echo "Using compile type '$COMPILE_TYPE'"
118120
elif [ "$#" -eq 1 ]; then
119121
COMPILE_TYPE="$1"
122+
elif [ "$#" -eq 2 ]; then
123+
COMPILE_TYPE="$1"
124+
BUILDTYPE="$2"
120125
else
121-
echo "Too many arguments given, expected at most 1"
126+
echo "Too many arguments given, expected 1 or 2"
122127
exit 1
123128
fi
124129

@@ -144,7 +149,7 @@ if [ "$COMPILE_TYPE" == "complete_rebuild" ] || [ ! -e "$BUILD_DIR" ]; then
144149
meson setup "$BUILD_DIR" \
145150
"--wipe" \
146151
--cross-file "$CROSS_FILE" \
147-
-Dbuildtype=release \
152+
"-Dbuildtype=$BUILDTYPE" \
148153
-Ddefault_library=static
149154

150155
fi

0 commit comments

Comments
 (0)