The open source OpenXR runtime
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

ci: Refactor paths, and only build containers for CI path changes

+25 -17
+25 -17
.gitlab-ci/ci-rules.yml
··· 15 15 # Outside of monado. 16 16 - if: &is-forked-branch '$CI_PROJECT_NAMESPACE != "monado" && $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME != $CI_COMMIT_REF_NAME' 17 17 when: manual 18 + # GitLab CI paths 19 + - changes: &paths-ci-files 20 + - ".gitlab-ci.yml" 21 + - ".gitlab-ci/**/*" 22 + when: on_success 23 + # All paths, 1 hours have been wasted trying to combine the above arrays. 24 + - changes: &paths-ci-code-sys-files 25 + # Code 26 + - "scripts/**/*" 27 + - "src/**/*" 28 + # Build sys 29 + - CMakeLists.txt 30 + - "*.cmake" 31 + - "**/*.gradle" 32 + - "cmake/**/*" 33 + - "gradle/**/*" 34 + # CI paths 35 + - ".gitlab-ci.yml" 36 + - ".gitlab-ci/**/*" 37 + when: on_success 18 38 19 39 20 40 # When to automatically run the CI for build jobs ··· 22 42 rules: 23 43 # If any files affecting the pipeline are changed, build/test jobs run 24 44 # automatically once all dependency jobs have passed 25 - - changes: &all_paths 26 - # build sys 27 - - CMakeLists.txt 28 - - "*.cmake" 29 - - "**/*.gradle" 30 - - "cmake/**/*" 31 - - "gradle/**/*" 32 - # GitLab CI 33 - - ".gitlab-ci.yml" 34 - - ".gitlab-ci/**/*" 35 - # Source code 36 - - "scripts/**/*" 37 - - "src/**/*" 45 + - changes: 46 + *paths-ci-code-sys-files 38 47 when: on_success 39 48 # Don't build on forked repos. 40 49 - if: *is-forked-branch ··· 48 57 # configuration files were changed, to ensure docker images are up to date 49 58 - if: *is-post-merge 50 59 changes: 51 - - ".gitlab-ci.yml" 52 - - ".gitlab-ci/**/*" 60 + *paths-ci-files 53 61 when: on_success 54 62 # Run pipeline by default if it is for a merge request, and any files 55 63 # affecting the pipeline were changed 56 64 - if: *is-pre-merge 57 65 changes: 58 - *all_paths 66 + *paths-ci-files 59 67 when: on_success 60 68 # Allow triggering jobs manually in other cases if any files affecting the 61 69 # pipeline were changed: Disabled for now because it causes the pipeline on 62 70 # main to be blocked because it gets stuck in the container stage. 63 71 #- changes: 64 - # *all_paths 72 + # *paths-ci-files 65 73 # when: manual 66 74 # Don't build on forked repos. 67 75 - if: *is-forked-branch