From 972b924bc05001b032b476834d25b7f41c85c134 Mon Sep 17 00:00:00 2001 From: Jeremy Felder Date: Wed, 15 May 2024 13:17:13 +0300 Subject: [PATCH] Update CI to run on some non-code changes (#515) ## Describe the changes This PR: - Updates the CI to run on CI workflow file changes - Updates examples CI to run on examples file changes --- .github/changed-files.yml | 9 ++++++++- .github/workflows/check-changed-files.yml | 5 +++++ .github/workflows/examples.yml | 4 ++-- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/.github/changed-files.yml b/.github/changed-files.yml index c8ccee88..34771d7d 100644 --- a/.github/changed-files.yml +++ b/.github/changed-files.yml @@ -3,8 +3,11 @@ golang: - wrappers/golang/**/*.h - wrappers/golang/**/*.tmpl - go.mod + - .github/workflows/golang.yml rust: - wrappers/rust/**/* + - '!wrappers/rust/README.md' + - .github/workflows/rust.yml cpp: - icicle/**/*.cu - icicle/**/*.cuh @@ -12,4 +15,8 @@ cpp: - icicle/**/*.hpp - icicle/**/*.c - icicle/**/*.h - - icicle/CMakeLists.txt \ No newline at end of file + - icicle/CMakeLists.txt + - .github/workflows/cpp_cuda.yml +examples: + - examples/**/* + - .github/workflows/examples.yml diff --git a/.github/workflows/check-changed-files.yml b/.github/workflows/check-changed-files.yml index 61564300..db0dac45 100644 --- a/.github/workflows/check-changed-files.yml +++ b/.github/workflows/check-changed-files.yml @@ -12,6 +12,9 @@ on: cpp_cuda: description: "Flag for if C++/CUDA files changed" value: ${{ jobs.check-changed-files.outputs.cpp_cuda }} + examples: + description: "Flag for if example files changed" + value: ${{ jobs.check-changed-files.outputs.examples }} jobs: check-changed-files: @@ -21,6 +24,7 @@ jobs: golang: ${{ steps.changed_files.outputs.golang }} rust: ${{ steps.changed_files.outputs.rust }} cpp_cuda: ${{ steps.changed_files.outputs.cpp_cuda }} + examples: ${{ steps.changed_files.outputs.examples }} steps: - name: Checkout Repo uses: actions/checkout@v4 @@ -37,3 +41,4 @@ jobs: echo "golang=${{ steps.changed-files-yaml.outputs.golang_any_modified }}" >> "$GITHUB_OUTPUT" echo "rust=${{ steps.changed-files-yaml.outputs.rust_any_modified }}" >> "$GITHUB_OUTPUT" echo "cpp_cuda=${{ steps.changed-files-yaml.outputs.cpp_any_modified }}" >> "$GITHUB_OUTPUT" + echo "examples=${{ steps.changed-files-yaml.outputs.examples_any_modified }}" >> "$GITHUB_OUTPUT" diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml index 594b2ad3..c6fe2c24 100644 --- a/.github/workflows/examples.yml +++ b/.github/workflows/examples.yml @@ -33,7 +33,7 @@ jobs: uses: actions/checkout@v4 - name: c++ examples working-directory: ./examples/c++ - if: needs.check-changed-files.outputs.cpp_cuda == 'true' + if: needs.check-changed-files.outputs.cpp_cuda == 'true' || needs.check-changed-files.outputs.examples == 'true' run: | # loop over all directories in the current directory for dir in $(find . -mindepth 1 -maxdepth 1 -type d); do @@ -47,7 +47,7 @@ jobs: done - name: Rust examples working-directory: ./examples/rust - if: needs.check-changed-files.outputs.rust == 'true' + if: needs.check-changed-files.outputs.rust == 'true' || needs.check-changed-files.outputs.examples == 'true' run: | # loop over all directories in the current directory for dir in $(find . -mindepth 1 -maxdepth 1 -type d); do