Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/clang-format-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:

clang-format-check:
needs: detect-clang-format-changes
if: ${{ needs.detect-clang-format-changes.outputs.has_changes == 'true' }}
if: ${{ (needs.detect-clang-format-changes.outputs.has_changes == 'true') || (github.event_name == 'workflow_dispatch') || (env.ACT == 'true') }}
runs-on: ubuntu-latest
permissions:
contents: read
Expand All @@ -69,7 +69,7 @@ jobs:

clang-format-check-skipped:
needs: detect-clang-format-changes
if: ${{ needs.detect-clang-format-changes.outputs.has_changes != 'true' }}
if: ${{ (needs.detect-clang-format-changes.outputs.has_changes != 'true') && (github.event_name != 'workflow_dispatch') && (env.ACT != 'true') }}
runs-on: ubuntu-latest
permissions:
contents: read
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/clang-format-fix.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ jobs:
path: phlex-src
ref: ${{ needs.check.outputs.ref_name }}
repository: ${{ needs.check.outputs.repo_name }}
token: ${{ secrets.WORKFLOW_PAT }}

- uses: DoozyX/clang-format-lint-action@bcb4eb2cb0d707ee4f3e5cc3b456eb075f12cf73 # v0.20
with:
Expand All @@ -59,6 +60,7 @@ jobs:
- uses: EndBug/add-and-commit@a94899bca583c204427a224a7af87c02f9b325d5 # v9.1.4
id: add_and_commit
with:
token: ${{ secrets.WORKFLOW_PAT }}
cwd: phlex-src
author_name: "github-actions[bot]"
author_email: "41898282+github-actions[bot]@users.noreply.github.com"
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/clang-tidy-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,8 @@ jobs:
needs: [ detect-clang-tidy-changes, check_comment_trigger ]
if: |
(github.event_name == 'pull_request' && needs.detect-clang-tidy-changes.outputs.has_changes == 'true') ||
(github.event_name == 'issue_comment' && needs.check_comment_trigger.outputs.match_result == 'match' && (github.event.comment.author_association == 'COLLABORATOR' || github.event.comment.author_association == 'OWNER'))
(github.event_name == 'issue_comment' && needs.check_comment_trigger.outputs.match_result == 'match' && (github.event.comment.author_association == 'COLLABORATOR' || github.event.comment.author_association == 'OWNER')) ||
(github.event_name == 'workflow_dispatch') || (env.ACT == 'true')
runs-on: ubuntu-24.04

container:
Expand Down Expand Up @@ -187,7 +188,7 @@ jobs:

clang-tidy-check-skipped:
needs: detect-clang-tidy-changes
if: github.event_name == 'pull_request' && needs.detect-clang-tidy-changes.outputs.has_changes != 'true'
if: github.event_name == 'pull_request' && (needs.detect-clang-tidy-changes.outputs.has_changes != 'true') && (github.event_name != 'workflow_dispatch') && (env.ACT != 'true')
runs-on: ubuntu-latest
permissions:
contents: read
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/clang-tidy-fix.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ jobs:
path: phlex-src
ref: ${{ needs.check.outputs.ref_name }}
repository: ${{ needs.check.outputs.repo_name }}
token: ${{ secrets.WORKFLOW_PAT }}

- name: Setup build environment
uses: Framework-R-D/phlex/.github/actions/setup-build-env@main
Expand Down Expand Up @@ -96,6 +97,7 @@ jobs:
uses: EndBug/add-and-commit@a94899bca583c204427a224a7af87c02f9b325d5 # v9.1.4
id: add_and_commit
with:
token: ${{ secrets.WORKFLOW_PAT }}
cwd: phlex-src
author_name: "github-actions[bot]"
author_email: "41898282+github-actions[bot]@users.noreply.github.com"
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/cmake-format-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:

cmake-format-check:
needs: detect-cmake-format-changes
if: ${{ needs.detect-cmake-format-changes.outputs.has_changes == 'true' }}
if: ${{ (needs.detect-cmake-format-changes.outputs.has_changes == 'true') || (github.event_name == 'workflow_dispatch') || (env.ACT == 'true') }}
runs-on: ubuntu-latest

steps:
Expand Down Expand Up @@ -98,7 +98,7 @@ jobs:

cmake-format-check-skipped:
needs: detect-cmake-format-changes
if: ${{ needs.detect-cmake-format-changes.outputs.has_changes != 'true' }}
if: ${{ (needs.detect-cmake-format-changes.outputs.has_changes != 'true') && (github.event_name != 'workflow_dispatch') && (env.ACT != 'true') }}
runs-on: ubuntu-latest

steps:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/cmake-format-fix.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ jobs:
path: phlex-src
ref: ${{ needs.check.outputs.ref_name }}
repository: ${{ needs.check.outputs.repo_name }}
token: ${{ secrets.WORKFLOW_PAT }}

- name: Set up Python
uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6
Expand Down Expand Up @@ -81,6 +82,7 @@ jobs:
uses: EndBug/add-and-commit@a94899bca583c204427a224a7af87c02f9b325d5 # v9.1.4
id: add_and_commit
with:
token: ${{ secrets.WORKFLOW_PAT }}
cwd: phlex-src
author_name: "github-actions[bot]"
author_email: "41898282+github-actions[bot]@users.noreply.github.com"
Expand Down
40 changes: 6 additions & 34 deletions .github/workflows/coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ jobs:
packages: read

outputs:
has_changes: ${{ steps.act_force.outputs.matched == 'true' && 'true' || steps.filter.outputs.matched }}
changed_files: ${{ steps.act_force.outputs.matched == 'true' && steps.act_force.outputs.matched_files || steps.filter.outputs.matched_files }}
has_changes: ${{ steps.filter.outputs.matched }}
changed_files: ${{ steps.filter.outputs.matched_files }}

steps:
- name: Check out source code
Expand All @@ -40,25 +40,8 @@ jobs:
fetch-depth: 0
path: phlex-src

- name: Detect act environment
id: detect_act
run: |
if [ "${GITHUB_ACTOR}" = "nektos/act" ] || [ "${ACT:-}" = "true" ] || [ "${ACT:-}" = "1" ]; then
echo "is_act=true" >> "$GITHUB_OUTPUT"
else
echo "is_act=false" >> "$GITHUB_OUTPUT"
fi

- name: Force coverage execution when running under act
id: act_force
if: ${{ steps.detect_act.outputs.is_act == 'true' }}
run: |
echo "matched=true" >> "$GITHUB_OUTPUT"
echo "matched_files=act-run: forced coverage execution" >> "$GITHUB_OUTPUT"

- name: Detect coverage relevant changes
id: filter
if: ${{ steps.detect_act.outputs.is_act != 'true' }}
uses: Framework-R-D/phlex/.github/actions/detect-relevant-changes@main
with:
repo-path: phlex-src
Expand All @@ -69,29 +52,18 @@ jobs:
cmake

- name: Report detection outcome
env:
IS_ACT: ${{ steps.detect_act.outputs.is_act }}
ACT_MATCHED: ${{ steps.act_force.outputs.matched }}
ACT_FILES: ${{ steps.act_force.outputs.matched_files }}
FILTER_MATCHED: ${{ steps.filter.outputs.matched }}
FILTER_FILES: ${{ steps.filter.outputs.matched_files }}
run: |
if [ "${IS_ACT}" = "true" ]; then
echo "::notice::Running under act; forcing coverage workflow to execute."
if [ -n "${ACT_FILES}" ]; then
printf '%s\n' "${ACT_FILES}"
fi
elif [ "${FILTER_MATCHED}" != "true" ]; then
if [ "${{ steps.filter.outputs.matched }}" != "true" ]; then
echo "::notice::No coverage relevant changes detected; workflow will be skipped."
else
echo "::group::Coverage relevant files"
printf '%s\n' "${FILTER_FILES}"
printf '%s\n' "${{ steps.filter.outputs.matched_files }}"
echo "::endgroup::"
fi

coverage:
needs: detect-coverage-changes
if: ${{ needs.detect-coverage-changes.outputs.has_changes == 'true' }}
if: ${{ (needs.detect-coverage-changes.outputs.has_changes == 'true') || (github.event_name == 'workflow_dispatch') || (env.ACT == 'true') }}
runs-on: ubuntu-24.04

container:
Expand Down Expand Up @@ -366,7 +338,7 @@ jobs:

coverage-skipped:
needs: detect-coverage-changes
if: ${{ needs.detect-coverage-changes.outputs.has_changes != 'true' }}
if: ${{ (needs.detect-coverage-changes.outputs.has_changes != 'true') && (github.event_name != 'workflow_dispatch') && (env.ACT != 'true') }}
runs-on: ubuntu-latest
permissions:
contents: read
Expand Down
Loading