1
0
Fork 0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-12-22 17:49:43 +01:00

Only trigger CI workflows for code or CI changes

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
This commit is contained in:
Misa 2024-01-07 16:41:28 -08:00 committed by Misa Elizabeth Kai
parent 5f7cb46a35
commit 47eb7acb44
2 changed files with 57 additions and 4 deletions

View file

@ -1,7 +1,45 @@
name: CI (Android) name: CI (Android)
# Trigger this workflow on push or pull request # Only trigger workflow when Android-specific code could have changed.
on: [push, pull_request] # 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: env:
SRC_DIR_PATH: VVVVVV/desktop_version/VVVVVV-android SRC_DIR_PATH: VVVVVV/desktop_version/VVVVVV-android

View file

@ -1,7 +1,22 @@
name: CI name: CI
# Trigger this workflow on push or pull request # Only trigger workflow when code changes, or this file is changed.
on: [push, pull_request] # Android has a different workflow and different rules.
on:
push:
paths:
- "desktop_version/CMakeLists.txt"
- "desktop_version/src/**.cpp"
- "desktop_version/src/**.c"
- "desktop_version/src/**.h"
- ".github/workflows/ci.yml"
pull_request:
paths:
- "desktop_version/CMakeLists.txt"
- "desktop_version/src/**.cpp"
- "desktop_version/src/**.c"
- "desktop_version/src/**.h"
- ".github/workflows/ci.yml"
env: env:
SRC_DIR_PATH: desktop_version SRC_DIR_PATH: desktop_version