From dba223f43dbd598000276db0b6342e17917ce923 Mon Sep 17 00:00:00 2001 From: kirkrodrigues <2454684+kirkrodrigues@users.noreply.github.com> Date: Mon, 11 Dec 2023 18:06:14 -0500 Subject: [PATCH] Workflow efficiency improvements: (#44) * Run build_wheels workflow only when relevant files change. * Cancel in-progress jobs when a new commit is pushed to the same branch. --- .github/workflows/build_wheels.yml | 37 +++++++++++++++++++++++++++++- 1 file changed, 36 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build_wheels.yml b/.github/workflows/build_wheels.yml index 29c2ad70..2cf23647 100644 --- a/.github/workflows/build_wheels.yml +++ b/.github/workflows/build_wheels.yml @@ -1,6 +1,41 @@ name: Build -on: [push, pull_request] +on: + pull_request: + paths: + - ".clang-format" + - ".clang-tidy" + - ".github/workflows/build_wheels.yml" + - ".gitmodules" + - "clp_ffi_py/**" + - "MANIFEST.in" + - "pyproject.toml" + - "README.md" + - "requirements-dev.txt" + - "setup.cfg" + - "setup.py" + - "src/**" + - "tests/**" + push: + paths: + - ".clang-format" + - ".clang-tidy" + - ".github/workflows/build_wheels.yml" + - ".gitmodules" + - "clp_ffi_py/**" + - "MANIFEST.in" + - "pyproject.toml" + - "README.md" + - "requirements-dev.txt" + - "setup.cfg" + - "setup.py" + - "src/**" + - "tests/**" + +concurrency: + group: "${{github.workflow}}-${{github.ref}}" + # Cancel in-progress jobs for efficiency + cancel-in-progress: true jobs: linters: