Skip to content

Commit 901d9b0

Browse files
ci: merge per-OS build steps into single bash branch
1 parent 88833df commit 901d9b0

1 file changed

Lines changed: 16 additions & 18 deletions

File tree

.github/workflows/android.yml

Lines changed: 16 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -50,16 +50,15 @@ jobs:
5050
run: yarn install
5151
working-directory: example
5252
- name: Build android example app with new arch disabled
53-
if: runner.os != 'Windows'
54-
run: ./gradlew assembleDebug -PnewArchEnabled=false
55-
working-directory: example/android
56-
- name: Build android example app with new arch disabled (Windows)
57-
if: runner.os == 'Windows'
58-
shell: cmd
5953
run: |
60-
subst W: "%GITHUB_WORKSPACE%"
61-
cd /D W:\example\android
62-
call gradlew.bat assembleDebug -PnewArchEnabled=false
54+
if [[ "$RUNNER_OS" == "Windows" ]]; then
55+
# subst the workspace to a short drive to avoid Windows MAX_PATH
56+
# in CMake-generated object file names from autolinked codegen.
57+
MSYS_NO_PATHCONV=1 cmd /c 'subst W: "%GITHUB_WORKSPACE%" && cd /D W:\example\android && call gradlew.bat assembleDebug -PnewArchEnabled=false'
58+
else
59+
cd example/android
60+
./gradlew assembleDebug -PnewArchEnabled=false
61+
fi
6362
android-build-fabric:
6463
runs-on: ${{ matrix.os }}
6564
strategy:
@@ -93,13 +92,12 @@ jobs:
9392
run: yarn install
9493
working-directory: example
9594
- name: Build android example app with new arch enabled
96-
if: runner.os != 'Windows'
97-
run: ./gradlew assembleDebug -PnewArchEnabled=true
98-
working-directory: example/android
99-
- name: Build android example app with new arch enabled (Windows)
100-
if: runner.os == 'Windows'
101-
shell: cmd
10295
run: |
103-
subst W: "%GITHUB_WORKSPACE%"
104-
cd /D W:\example\android
105-
call gradlew.bat assembleDebug -PnewArchEnabled=true
96+
if [[ "$RUNNER_OS" == "Windows" ]]; then
97+
# subst the workspace to a short drive to avoid Windows MAX_PATH
98+
# in CMake-generated object file names from autolinked codegen.
99+
MSYS_NO_PATHCONV=1 cmd /c 'subst W: "%GITHUB_WORKSPACE%" && cd /D W:\example\android && call gradlew.bat assembleDebug -PnewArchEnabled=true'
100+
else
101+
cd example/android
102+
./gradlew assembleDebug -PnewArchEnabled=true
103+
fi

0 commit comments

Comments
 (0)