Skip to content

Commit 8773cf0

Browse files
authored
Merge branch 'master' into mh-more-issue-template-work
2 parents 649baa6 + 2a79e2b commit 8773cf0

7 files changed

Lines changed: 119 additions & 49 deletions

.github/workflows/ci_build_library.yaml

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ on:
3838
permissions: read-all
3939

4040
concurrency:
41-
# Cancel any previously-started but still active runs on the same branch.
4241
cancel-in-progress: true
4342
group: ${{github.workflow}}-${{github.event.pull_request.number||github.ref}}
4443

@@ -48,10 +47,12 @@ jobs:
4847
uses: ./.github/workflows/_find_changes.yaml
4948
secrets: inherit
5049

51-
build-library:
52-
name: Build for ${{matrix.conf.os}}/${{matrix.conf.pyarch}}/py3${{matrix.conf.py}}
50+
run-tests:
51+
if: ${{needs.find-changes.outputs.code == 'true' || inputs.debug}}
52+
name: Run tests
5353
needs: find-changes
5454
runs-on: ${{matrix.conf.os}}
55+
continue-on-error: true
5556
timeout-minutes: 30
5657
strategy:
5758
fail-fast: false
@@ -83,8 +84,7 @@ jobs:
8384
{os: windows-2025, pyarch: x64, py: 13},
8485
]
8586
env:
86-
# Must use explicit test for true so it works when inputs.debug is null.
87-
use-verbose: ${{github.event.inputs.debug == true}}
87+
use-verbose: ${{inputs.debug}}
8888
steps:
8989
- if: >-
9090
${{needs.find-changes.outputs.code == 'false'
@@ -125,7 +125,7 @@ jobs:
125125
- if: matrix.conf.os != 'windows-2025'
126126
name: Run the build and test script (non-Windows case)
127127
env:
128-
# Add xtrace to SHELLOPTS for all Bash scripts when doing debug runs.
128+
# Add xtrace to SHELLOPTS for all Bash scripts when doing debug runs.
129129
SHELLOPTS: ${{inputs.debug && 'xtrace' || '' }}
130130
run: dev_tools/test_libs.sh ${{env.use-verbose && '--config=verbose'}}
131131

@@ -140,3 +140,15 @@ jobs:
140140
SHELLOPTS: ${{env.use-verbose && 'xtrace' || '' }}
141141
shell: cmd
142142
run: bash -x dev_tools/test_libs.sh ${{env.use-verbose && '--config=verbose'}} --action_env PYTHON_BIN_PATH=${{env.pyroot}}\\${{env.pyexe}}
143+
144+
report-results:
145+
if: always()
146+
name: ${{github.workflow}}
147+
needs: run-tests
148+
runs-on: ubuntu-24.04
149+
timeout-minutes: 2
150+
steps:
151+
- name: Exit with an appropriate status code
152+
run: |
153+
result="${{needs.run-tests.result}}"
154+
[[ "$result" == "success" || "$result" == "skipped" ]]

.github/workflows/ci_build_wheels.yaml

Lines changed: 15 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ on:
3838
permissions: read-all
3939

4040
concurrency:
41-
# Cancel any previously-started but still active runs on the same branch.
4241
cancel-in-progress: true
4342
group: ${{github.workflow}}-${{github.event.pull_request.number||github.ref}}
4443

@@ -48,26 +47,23 @@ jobs:
4847
uses: ./.github/workflows/_find_changes.yaml
4948
secrets: inherit
5049

51-
build-wheels-skip:
52-
if: >-
53-
${{needs.find-changes.outputs.code == 'false'
54-
&& github.event_name != 'workflow_dispatch'}}
55-
# Important: the name must be the same as that of the build-wheels job.
56-
name: Build & verify wheels
57-
needs: find-changes
58-
runs-on: ubuntu-24.04
59-
timeout-minutes: 5
60-
steps:
61-
- name: Exit with success if there were no changes to code files
62-
run: exit 0
63-
64-
build-wheels:
65-
if: >-
66-
${{needs.find-changes.outputs.code == 'true'
67-
|| github.event_name == 'workflow_dispatch'}}
68-
name: Build & verify wheels
50+
run-tests:
51+
if: ${{needs.find-changes.outputs.code == 'true' || inputs.debug}}
52+
name: Run tests
6953
needs: find-changes
7054
uses: ./.github/workflows/_build_wheels.yaml
7155
secrets: inherit
7256
with:
7357
debug: ${{inputs.debug == true}}
58+
59+
report-results:
60+
if: always()
61+
name: ${{github.workflow}}
62+
needs: run-tests
63+
runs-on: ubuntu-24.04
64+
timeout-minutes: 2
65+
steps:
66+
- name: Exit with an appropriate status code
67+
run: |
68+
result="${{needs.run-tests.result}}"
69+
[[ "$result" == "success" || "$result" == "skipped" ]]

.github/workflows/ci_docker_tests.yaml

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ on:
3838
permissions: read-all
3939

4040
concurrency:
41-
# Cancel any previously-started but still active runs on the same branch.
4241
cancel-in-progress: true
4342
group: ${{github.workflow}}-${{github.event.pull_request.number||github.ref}}
4443

@@ -48,10 +47,12 @@ jobs:
4847
uses: ./.github/workflows/_find_changes.yaml
4948
secrets: inherit
5049

51-
build-and-test:
52-
name: Build & test Docker images
50+
run-tests:
51+
if: ${{needs.find-changes.outputs.code == 'true' || inputs.debug}}
52+
name: Run tests
5353
needs: find-changes
5454
runs-on: ubuntu-24.04
55+
continue-on-error: true
5556
timeout-minutes: 30
5657
env:
5758
# The next environment variable is used by Docker.
@@ -91,3 +92,15 @@ jobs:
9192
run: |
9293
cd install/tests
9394
docker compose build
95+
96+
report-results:
97+
if: always()
98+
name: ${{github.workflow}}
99+
needs: run-tests
100+
runs-on: ubuntu-24.04
101+
timeout-minutes: 2
102+
steps:
103+
- name: Exit with an appropriate status code
104+
run: |
105+
result="${{needs.run-tests.result}}"
106+
[[ "$result" == "success" || "$result" == "skipped" ]]

.github/workflows/ci_format_checks.yml

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
name: 'CI: check code format'
16-
run-name: Test with linters and formatters
15+
name: 'CI: run code format tests'
16+
run-name: Check source code with linters and formatters
1717

1818
on:
1919
push:
@@ -38,7 +38,6 @@ on:
3838
permissions: read-all
3939

4040
concurrency:
41-
# Cancel any previously-started but still active runs on the same branch.
4241
cancel-in-progress: true
4342
group: ${{github.workflow}}-${{github.event.pull_request.number||github.ref}}
4443

@@ -48,10 +47,12 @@ jobs:
4847
uses: ./.github/workflows/_find_changes.yaml
4948
secrets: inherit
5049

51-
check-format:
52-
name: Check Python code format
50+
run-tests:
51+
if: ${{needs.find-changes.outputs.python == 'true' || inputs.debug}}
52+
name: Run tests
5353
needs: find-changes
5454
runs-on: ubuntu-24.04
55+
continue-on-error: true
5556
timeout-minutes: 30
5657
env:
5758
# Add xtrace to SHELLOPTS for all Bash scripts when doing debug runs.
@@ -85,3 +86,15 @@ jobs:
8586
8687
- name: Check Python file format
8788
run: check/format-incremental
89+
90+
report-results:
91+
if: always()
92+
name: ${{github.workflow}}
93+
needs: run-tests
94+
runs-on: ubuntu-24.04
95+
timeout-minutes: 2
96+
steps:
97+
- name: Exit with an appropriate status code
98+
run: |
99+
result="${{needs.run-tests.result}}"
100+
[[ "$result" == "success" || "$result" == "skipped" ]]

.github/workflows/ci_hardware_options.yaml

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ on:
3838
permissions: read-all
3939

4040
concurrency:
41-
# Cancel any previously-started but still active runs on the same branch.
4241
cancel-in-progress: true
4342
group: ${{github.workflow}}-${{github.event.pull_request.number||github.ref}}
4443

@@ -48,10 +47,12 @@ jobs:
4847
uses: ./.github/workflows/_find_changes.yaml
4948
secrets: inherit
5049

51-
test-options:
52-
name: Test ${{matrix.hardware_opt}} + ${{matrix.parallel_opt}}
50+
run-tests:
51+
if: ${{needs.find-changes.outputs.code == 'true' || inputs.debug}}
52+
name: Run tests
5353
needs: find-changes
5454
runs-on: ubuntu-24.04
55+
continue-on-error: true
5556
timeout-minutes: 30
5657
strategy:
5758
matrix:
@@ -60,8 +61,7 @@ jobs:
6061
# Optimizers for parallelism.
6162
parallel_opt: [openmp, nopenmp]
6263
env:
63-
# Must use explicit test for true so it works when inputs.debug is null.
64-
use-verbose: ${{github.event.inputs.debug == true}}
64+
use-verbose: ${{inputs.debug}}
6565
steps:
6666
- if: >-
6767
${{needs.find-changes.outputs.code == 'false'
@@ -112,3 +112,15 @@ jobs:
112112
--config=${{matrix.parallel_opt}} \
113113
${{env.use-verbose && '--config=verbose'}} \
114114
apps:qsim_base -- -c circuits/circuit_q24
115+
116+
report-results:
117+
if: always()
118+
name: ${{github.workflow}}
119+
needs: run-tests
120+
runs-on: ubuntu-24.04
121+
timeout-minutes: 2
122+
steps:
123+
- name: Exit with an appropriate status code
124+
run: |
125+
result="${{needs.run-tests.result}}"
126+
[[ "$result" == "success" || "$result" == "skipped" ]]

.github/workflows/ci_sanitizer_tests.yaml

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ on:
3838
permissions: read-all
3939

4040
concurrency:
41-
# Cancel any previously-started but still active runs on the same branch.
4241
cancel-in-progress: true
4342
group: ${{github.workflow}}-${{github.event.pull_request.number||github.ref}}
4443

@@ -48,18 +47,19 @@ jobs:
4847
uses: ./.github/workflows/_find_changes.yaml
4948
secrets: inherit
5049

51-
sanitizer-tests:
52-
name: Test with sanitizers
50+
run-tests:
51+
if: ${{needs.find-changes.outputs.code == 'true' || inputs.debug}}
52+
name: Run tests
5353
needs: find-changes
5454
runs-on: ubuntu-24.04
55+
continue-on-error: true
5556
timeout-minutes: 30
5657
strategy:
5758
matrix:
5859
# Memory and address sanitizers.
5960
sanitizer_opt: [msan, asan]
6061
env:
61-
# Must use explicit test for true so it works when inputs.debug is null.
62-
use-verbose: ${{github.event.inputs.debug == true}}
62+
use-verbose: ${{inputs.debug}}
6363
steps:
6464
- if: >-
6565
${{needs.find-changes.outputs.code == 'false'
@@ -103,3 +103,15 @@ jobs:
103103
--config=${{matrix.sanitizer_opt}} \
104104
${{env.use-verbose && '--config=verbose'}} \
105105
tests:all
106+
107+
report-results:
108+
if: always()
109+
name: ${{github.workflow}}
110+
needs: run-tests
111+
runs-on: ubuntu-24.04
112+
timeout-minutes: 2
113+
steps:
114+
- name: Exit with an appropriate status code
115+
run: |
116+
result="${{needs.run-tests.result}}"
117+
[[ "$result" == "success" || "$result" == "skipped" ]]

.github/workflows/ci_tcmalloc_test.yaml

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
name: 'CI: run TCMalloc test'
15+
name: 'CI: run TCMalloc tests'
1616
run-name: Test with TCMalloc (thread-caching malloc)
1717

1818
on:
@@ -38,7 +38,6 @@ on:
3838
permissions: read-all
3939

4040
concurrency:
41-
# Cancel any previously-started but still active runs on the same branch.
4241
cancel-in-progress: true
4342
group: ${{github.workflow}}-${{github.event.pull_request.number||github.ref}}
4443

@@ -48,14 +47,15 @@ jobs:
4847
uses: ./.github/workflows/_find_changes.yaml
4948
secrets: inherit
5049

51-
tcmalloc-test:
52-
name: Test with TCMalloc
50+
run-tests:
51+
if: ${{needs.find-changes.outputs.code == 'true' || inputs.debug}}
52+
name: Run tests
5353
needs: find-changes
5454
runs-on: ubuntu-24.04
55+
continue-on-error: true
5556
timeout-minutes: 30
5657
env:
57-
# Must use explicit test for true so it works when inputs.debug is null.
58-
use-verbose: ${{github.event.inputs.debug == true}}
58+
use-verbose: ${{inputs.debug}}
5959
steps:
6060
- if: >-
6161
${{needs.find-changes.outputs.code == 'false'
@@ -106,3 +106,15 @@ jobs:
106106
--config=tcmalloc \
107107
${{env.use-verbose && '--config=verbose'}} \
108108
tests:all
109+
110+
report-results:
111+
if: always()
112+
name: ${{github.workflow}}
113+
needs: run-tests
114+
runs-on: ubuntu-24.04
115+
timeout-minutes: 2
116+
steps:
117+
- name: Exit with an appropriate status code
118+
run: |
119+
result="${{needs.run-tests.result}}"
120+
[[ "$result" == "success" || "$result" == "skipped" ]]

0 commit comments

Comments
 (0)