mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2024-12-22 01:29: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:
parent
5f7cb46a35
commit
47eb7acb44
2 changed files with 57 additions and 4 deletions
42
.github/workflows/android.yml
vendored
42
.github/workflows/android.yml
vendored
|
@ -1,7 +1,45 @@
|
|||
name: CI (Android)
|
||||
|
||||
# Trigger this workflow on push or pull request
|
||||
on: [push, pull_request]
|
||||
# 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
|
||||
|
|
19
.github/workflows/ci.yml
vendored
19
.github/workflows/ci.yml
vendored
|
@ -1,7 +1,22 @@
|
|||
name: CI
|
||||
|
||||
# Trigger this workflow on push or pull request
|
||||
on: [push, pull_request]
|
||||
# Only trigger workflow when code changes, or this file is changed.
|
||||
# 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:
|
||||
SRC_DIR_PATH: desktop_version
|
||||
|
|
Loading…
Reference in a new issue