mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2024-11-12 22:19:41 +01:00
47eb7acb44
This makes it so that the main CI workflow will only trigger if a change is made to a code file in desktop_version/ (as the CI is only for desktop_version/), or if the CI file itself is changed. The CI workflow for Android will only trigger if Android-specific code _could have_ changed. This includes all code that is definitely Android-specific (e.g. Java files), but also C/C++ files that have __ANDROID__ ifdefs. Unfortunately, it's not possible to reuse the same list of paths across two different event trigger types[1]. So we have to copy-paste here. [1]: https://github.com/orgs/community/discussions/37645
81 lines
2.6 KiB
YAML
81 lines
2.6 KiB
YAML
name: CI (Android)
|
|
|
|
# Only trigger workflow when Android-specific code could have changed.
|
|
# This includes C/C++ files that have __ANDROID__ ifdefs.
|
|
# If adding new ifdefs, make sure to update these lists.
|
|
on:
|
|
push:
|
|
paths:
|
|
- "desktop_version/CMakeLists.txt"
|
|
- "desktop_version/src/ButtonGlyphs.cpp"
|
|
- "desktop_version/src/FileSystemUtils.cpp"
|
|
- "desktop_version/src/Screen.cpp"
|
|
- "desktop_version/src/Vlogging.c"
|
|
- "desktop_version/VVVVVV-android/gradlew"
|
|
- "desktop_version/VVVVVV-android/gradlew.bat"
|
|
- "desktop_version/VVVVVV-android/**/CMakeLists.txt"
|
|
- "desktop_version/VVVVVV-android/**.java"
|
|
- "desktop_version/VVVVVV-android/**.xml"
|
|
- "desktop_version/VVVVVV-android/**.pro"
|
|
- "desktop_version/VVVVVV-android/**.mk"
|
|
- "desktop_version/VVVVVV-android/**.gradle"
|
|
- "desktop_version/VVVVVV-android/**.jar"
|
|
- "desktop_version/VVVVVV-android/**.properties"
|
|
- ".github/workflows/android.yml"
|
|
pull_request:
|
|
paths:
|
|
- "desktop_version/CMakeLists.txt"
|
|
- "desktop_version/src/ButtonGlyphs.cpp"
|
|
- "desktop_version/src/FileSystemUtils.cpp"
|
|
- "desktop_version/src/Screen.cpp"
|
|
- "desktop_version/src/Vlogging.c"
|
|
- "desktop_version/VVVVVV-android/gradlew"
|
|
- "desktop_version/VVVVVV-android/gradlew.bat"
|
|
- "desktop_version/VVVVVV-android/**/CMakeLists.txt"
|
|
- "desktop_version/VVVVVV-android/**.java"
|
|
- "desktop_version/VVVVVV-android/**.xml"
|
|
- "desktop_version/VVVVVV-android/**.pro"
|
|
- "desktop_version/VVVVVV-android/**.mk"
|
|
- "desktop_version/VVVVVV-android/**.gradle"
|
|
- "desktop_version/VVVVVV-android/**.jar"
|
|
- "desktop_version/VVVVVV-android/**.properties"
|
|
- ".github/workflows/android.yml"
|
|
|
|
env:
|
|
SRC_DIR_PATH: VVVVVV/desktop_version/VVVVVV-android
|
|
|
|
jobs:
|
|
build:
|
|
name: Build (Android)
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
submodules: true
|
|
path: 'VVVVVV'
|
|
|
|
- uses: actions/setup-java@v3
|
|
with:
|
|
distribution: 'temurin'
|
|
java-version: '17'
|
|
cache: 'gradle'
|
|
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
repository: libsdl-org/SDL
|
|
ref: release-2.28.5
|
|
path: 'SDL'
|
|
|
|
- name: Build SDL
|
|
run: |
|
|
sudo apt-get -y install ninja-build
|
|
cd SDL
|
|
./build-scripts/android-prefab.sh
|
|
mvn install:install-file -Dfile=build-android-prefab/prefab-2.28.5/SDL2-2.28.5.aar -DpomFile=build-android-prefab/prefab-2.28.5/SDL2-2.28.5.pom
|
|
|
|
- name: Build
|
|
run: |
|
|
cd ${SRC_DIR_PATH}
|
|
./gradlew build
|