Skip to content

Commit a7c5c53

Browse files
committed
chore: resolve modify/delete conflict by removing deleted file
2 parents cdff10b + d7c9fe1 commit a7c5c53

63 files changed

Lines changed: 3715 additions & 2100 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Copyright (c) 2026 Arpit Singh
2+
#
3+
# SPDX-License-Identifier: BSL-1.0
4+
# Distributed under the Boost Software License, Version 1.0. (See accompanying
5+
# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
6+
7+
param(
8+
[Parameter(Mandatory = $true)]
9+
[string]$Path
10+
)
11+
12+
$resolved_path = Resolve-Path -Path $Path -ErrorAction Stop
13+
$exclude_targets = Get-Content -Path $resolved_path |
14+
Where-Object { $_ -notmatch '^\s*(#|$)' } |
15+
ForEach-Object { $_.Trim() }
16+
17+
[System.String]::Join('|', $exclude_targets)
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
# Copyright (c) 2026 Arpit Khandelwal
2+
#
3+
# SPDX-License-Identifier: BSL-1.0
4+
# Distributed under the Boost Software License, Version 1.0. (See accompanying
5+
# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
6+
7+
name: Cancel Workflows
8+
9+
on:
10+
pull_request_target:
11+
types: [labeled]
12+
issue_comment:
13+
types: [created]
14+
15+
jobs:
16+
cancel-all:
17+
# Trigger if label 'cancel-ci' is added OR if a comment contains '/cancel-ci'
18+
if: |
19+
(github.event_name == 'pull_request_target' && github.event.label.name == 'cancel-ci') ||
20+
(github.event_name == 'issue_comment' && github.event.issue.pull_request && contains(github.event.comment.body, '/cancel-ci'))
21+
runs-on: ubuntu-latest
22+
permissions:
23+
actions: write
24+
pull-requests: write
25+
issues: write
26+
steps:
27+
- name: Authorize and Extract PR Number
28+
id: context
29+
env:
30+
EVENT_NAME: ${{ github.event_name }}
31+
AUTHOR_ASSOC: ${{ github.event.comment.author_association }}
32+
COMMENT_USER_ID: ${{ github.event.comment.user.id }}
33+
PR_AUTHOR_ID: ${{ github.event.issue.user.id }}
34+
run: |
35+
if [ "$EVENT_NAME" == "issue_comment" ]; then
36+
# Authorize: Maintainers (OWNER, MEMBER, COLLABORATOR) or PR Author
37+
if [[ "$AUTHOR_ASSOC" =~ ^(OWNER|MEMBER|COLLABORATOR)$ ]] || [ "$COMMENT_USER_ID" == "$PR_AUTHOR_ID" ]; then
38+
echo "User authorized."
39+
else
40+
echo "Error: Unauthorized user attempted to cancel CI."
41+
exit 1
42+
fi
43+
echo "pr_number=${{ github.event.issue.number }}" >> "$GITHUB_OUTPUT"
44+
else
45+
# Labels addition is already restricted by GitHub to those with write access
46+
echo "pr_number=${{ github.event.pull_request.number }}" >> "$GITHUB_OUTPUT"
47+
fi
48+
49+
- name: Cancel Workflow Runs
50+
env:
51+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
52+
PR_NUMBER: ${{ steps.context.outputs.pr_number }}
53+
CURRENT_RUN_ID: ${{ github.run_id }}
54+
run: |
55+
echo "Cancelling runs for PR #$PR_NUMBER..."
56+
57+
# Get all runs for the PR that are NOT completed, excluding this current run
58+
RUN_IDS=$(gh run list --pr "$PR_NUMBER" --limit 200 --json databaseId,status --jq '.[] | select(.status != "completed" and .databaseId != (env.CURRENT_RUN_ID | tonumber)) | .databaseId')
59+
60+
if [ -z "$RUN_IDS" ]; then
61+
echo "No active runs found to cancel."
62+
else
63+
echo "Found the following run IDs to cancel:"
64+
echo "$RUN_IDS"
65+
for ID in $RUN_IDS; do
66+
echo "Cancelling run $ID..."
67+
gh run cancel "$ID" || echo "Failed to cancel run $ID (it might have already finished)"
68+
done
69+
fi
70+
71+
# Remove label if triggered by label
72+
if [ "${{ github.event_name }}" == "pull_request_target" ]; then
73+
echo "Removing 'cancel-ci' label..."
74+
gh pr edit "$PR_NUMBER" --remove-label "cancel-ci" || echo "Failed to remove label"
75+
fi

.github/workflows/windows_clang_debug.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,11 @@ jobs:
5858
cmake --install build --config Debug
5959
- name: Test
6060
run: |
61-
Set-Alias -Name grep -Value 'C:\Program Files\Git\usr\bin\grep.exe'
62-
Set-Alias -Name sed -Value 'C:\Program Files\Git\usr\bin\sed.exe'
61+
$exclude_regex = & "$env:GITHUB_WORKSPACE/.github/ci-scripts/generate_ctest_exclude_regex.ps1" `
62+
"$env:GITHUB_WORKSPACE/.github/workflows/tests.examples.targets"
6363
cd build
6464
ctest `
6565
--output-on-failure `
6666
--build-config Debug `
6767
--tests-regex tests.examples `
68-
--exclude-regex `
69-
$(grep -v -e ^# -e ^$ D:/a/hpx/hpx/.github/workflows/tests.examples.targets | sed ':b;N;$!bb;s/\n/|/g')
68+
--exclude-regex $exclude_regex

.github/workflows/windows_clang_release.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,11 @@ jobs:
5555
cmake --install build --config Release
5656
- name: Test
5757
run: |
58-
Set-Alias -Name grep -Value "C:\Program Files\Git\usr\bin\grep.exe"
59-
Set-Alias -Name sed -Value "C:\Program Files\Git\usr\bin\sed.exe"
58+
$exclude_regex = & "$env:GITHUB_WORKSPACE/.github/ci-scripts/generate_ctest_exclude_regex.ps1" `
59+
"$env:GITHUB_WORKSPACE/.github/workflows/tests.examples.targets"
6060
cd build
6161
ctest `
6262
--output-on-failure `
6363
--build-config Release `
6464
--tests-regex tests.examples `
65-
--exclude-regex `
66-
$(grep -v -e ^# -e ^$ D:/a/hpx/hpx/.github/workflows/tests.examples.targets | sed ':b;N;$!bb;s/\n/|/g')
65+
--exclude-regex $exclude_regex

.github/workflows/windows_debug_vs2022.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,12 +61,11 @@ jobs:
6161
cmake --install build --config Debug
6262
- name: Test
6363
run: |
64-
Set-Alias -Name grep -Value 'C:\Program Files\Git\usr\bin\grep.exe'
65-
Set-Alias -Name sed -Value 'C:\Program Files\Git\usr\bin\sed.exe'
64+
$exclude_regex = & "$env:GITHUB_WORKSPACE/.github/ci-scripts/generate_ctest_exclude_regex.ps1" `
65+
"$env:GITHUB_WORKSPACE/.github/workflows/tests.examples.targets"
6666
cd build
6767
ctest `
6868
--output-on-failure `
6969
--build-config Debug `
7070
--tests-regex tests.examples `
71-
--exclude-regex `
72-
$(grep -v -e ^# -e ^$ D:/a/hpx/hpx/.github/workflows/tests.examples.targets | sed ':b;N;$!bb;s/\n/|/g')
71+
--exclude-regex $exclude_regex

.github/workflows/windows_debug_vs2022_fetch_boost.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,11 @@ jobs:
5656
cmake --install build --config Debug
5757
- name: Test
5858
run: |
59-
Set-Alias -Name grep -Value 'C:\Program Files\Git\usr\bin\grep.exe'
60-
Set-Alias -Name sed -Value 'C:\Program Files\Git\usr\bin\sed.exe'
59+
$exclude_regex = & "$env:GITHUB_WORKSPACE/.github/ci-scripts/generate_ctest_exclude_regex.ps1" `
60+
"$env:GITHUB_WORKSPACE/.github/workflows/tests.examples.targets"
6161
cd build
6262
ctest `
63-
--output-on-failure `
63+
--output-on-failure `
6464
--build-config Debug `
6565
--tests-regex tests.examples `
66-
--exclude-regex `
67-
$(grep -v -e ^# -e ^$ D:/a/hpx/hpx/.github/workflows/tests.examples.targets | sed ':b;N;$!bb;s/\n/|/g')
66+
--exclude-regex $exclude_regex

.github/workflows/windows_debug_vs2022_fetch_hwloc.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,11 @@ jobs:
5959
cmake --install build --config Debug
6060
- name: Test
6161
run: |
62-
Set-Alias -Name grep -Value 'C:\Program Files\Git\usr\bin\grep.exe'
63-
Set-Alias -Name sed -Value 'C:\Program Files\Git\usr\bin\sed.exe'
62+
$exclude_regex = & "$env:GITHUB_WORKSPACE/.github/ci-scripts/generate_ctest_exclude_regex.ps1" `
63+
"$env:GITHUB_WORKSPACE/.github/workflows/tests.examples.targets"
6464
cd build
6565
ctest `
6666
--output-on-failure `
6767
--build-config Debug `
6868
--tests-regex tests.examples `
69-
--exclude-regex `
70-
$(grep -v -e ^# -e ^$ D:/a/hpx/hpx/.github/workflows/tests.examples.targets | sed ':b;N;$!bb;s/\n/|/g')
69+
--exclude-regex $exclude_regex

.github/workflows/windows_debug_vs2022_local_runtime.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,11 @@ jobs:
5656
cmake --install build --config Debug
5757
- name: Test
5858
run: |
59-
Set-Alias -Name grep -Value 'C:\Program Files\Git\usr\bin\grep.exe'
60-
Set-Alias -Name sed -Value 'C:\Program Files\Git\usr\bin\sed.exe'
59+
$exclude_regex = & "$env:GITHUB_WORKSPACE/.github/ci-scripts/generate_ctest_exclude_regex.ps1" `
60+
"$env:GITHUB_WORKSPACE/.github/workflows/tests.examples.targets"
6161
cd build
6262
ctest `
6363
--output-on-failure `
6464
--build-config Debug `
6565
--tests-regex tests.examples `
66-
--exclude-regex `
67-
$(grep -v -e ^# -e ^$ D:/a/hpx/hpx/.github/workflows/tests.examples.targets | sed ':b;N;$!bb;s/\n/|/g')
66+
--exclude-regex $exclude_regex

.github/workflows/windows_debug_vs2022_modules.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,12 +62,11 @@ jobs:
6262
cmake --install build --config Debug
6363
- name: Test
6464
run: |
65-
Set-Alias -Name grep -Value 'C:\Program Files\Git\usr\bin\grep.exe'
66-
Set-Alias -Name sed -Value 'C:\Program Files\Git\usr\bin\sed.exe'
65+
$exclude_regex = & "$env:GITHUB_WORKSPACE/.github/ci-scripts/generate_ctest_exclude_regex.ps1" `
66+
"$env:GITHUB_WORKSPACE/.github/workflows/tests.examples.targets"
6767
cd build
6868
ctest `
6969
--output-on-failure `
7070
--build-config Debug `
7171
--tests-regex tests.examples `
72-
--exclude-regex `
73-
$(grep -v -e ^# -e ^$ D:/a/hpx/hpx/.github/workflows/tests.examples.targets | sed ':b;N;$!bb;s/\n/|/g')
72+
--exclude-regex $exclude_regex

.github/workflows/windows_debug_vs2022_tracy.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,12 +61,11 @@ jobs:
6161
cmake --install build --config Debug
6262
- name: Test
6363
run: |
64-
Set-Alias -Name grep -Value 'C:\Program Files\Git\usr\bin\grep.exe'
65-
Set-Alias -Name sed -Value 'C:\Program Files\Git\usr\bin\sed.exe'
64+
$exclude_regex = & "$env:GITHUB_WORKSPACE/.github/ci-scripts/generate_ctest_exclude_regex.ps1" `
65+
"$env:GITHUB_WORKSPACE/.github/workflows/tests.examples.targets"
6666
cd build
6767
ctest `
6868
--output-on-failure `
6969
--build-config Debug `
7070
--tests-regex tests.examples `
71-
--exclude-regex `
72-
$(grep -v -e ^# -e ^$ D:/a/hpx/hpx/.github/workflows/tests.examples.targets | sed ':b;N;$!bb;s/\n/|/g')
71+
--exclude-regex $exclude_regex

0 commit comments

Comments
 (0)