Skip to content

Commit c9f341e

Browse files
authored
Remove check-examples from CI (#1352)
This PR is a post-cleanup task following #1351 for CI to reflect the removal of the `examples` directory. Verifing [a CI run against this branch](https://github.com/awslabs/aws-sdk-rust/actions/runs/17587814067) --- By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
1 parent 9b1db58 commit c9f341e

File tree

2 files changed

+5
-58
lines changed

2 files changed

+5
-58
lines changed

.github/workflows/ci.yaml

Lines changed: 0 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -68,59 +68,6 @@ jobs:
6868
with:
6969
jobs: ${{ toJSON(needs) }}
7070

71-
generate-check-examples-matrix:
72-
runs-on: ubuntu-latest
73-
name: Generate Check Matrix (examples)
74-
steps:
75-
- uses: actions/checkout@v3
76-
- name: Generate the matrix
77-
id: generate-matrix
78-
# Run the `crate-range.py` script to calculate a matrix for the `check-examples` job.
79-
# This script outputs JSON that GitHub Actions can consume as a matrix definition.
80-
# Rust versions to check against are arguments to this script.
81-
run: echo "matrix=$(./tools/ci/crate-range.py generate-matrix -b ${EXAMPLES_BATCH_COUNT} --folder examples ${RUST_VERSIONS})" >> "${GITHUB_OUTPUT}"
82-
outputs:
83-
matrix: ${{ steps.generate-matrix.outputs.matrix }}
84-
85-
check-examples:
86-
needs: generate-check-examples-matrix
87-
runs-on: ubuntu-latest
88-
name: Check Examples
89-
env:
90-
CARGO_INCREMENTAL: "0"
91-
RUSTFLAGS: ""
92-
RUSTDOCFLAGS: ""
93-
strategy:
94-
# Use the matrix generated by the previous job
95-
matrix: ${{ fromJson(needs.generate-check-examples-matrix.outputs.matrix) }}
96-
steps:
97-
- uses: actions/checkout@v3
98-
- uses: dtolnay/rust-toolchain@master
99-
with:
100-
toolchain: ${{ matrix.rust_version }}
101-
targets: wasm32-unknown-unknown
102-
# Pinned to the commit hash of v2.1.0
103-
- uses: Swatinem/rust-cache@b894d59a8d236e2979b247b80dac8d053ab340dd
104-
with:
105-
shared-key: check
106-
- name: Cargo Check
107-
run: ./tools/ci/crate-range.py run ${{ matrix.crate_range }} --folder examples -- cargo check --all-features
108-
109-
# Psuedo-job that depends on the check job so that we don't have to enter
110-
# the myriad of crate range combinations into GitHub's protected branch rules
111-
require-check-examples:
112-
needs: check-examples
113-
# Run this job even if its dependency jobs fail
114-
if: always()
115-
runs-on: ubuntu-latest
116-
name: Check Matrix Success (examples)
117-
steps:
118-
- name: Verify jobs succeeded
119-
# Pinned to commit hash of v1.2.2
120-
uses: re-actors/alls-green@05ac9388f0aebcb5727afa17fcccfecd6f8ec5fe
121-
with:
122-
jobs: ${{ toJSON(needs) }}
123-
12471
check-manifests:
12572
runs-on: ubuntu-latest
12673
steps:

tools/ci/crate-range.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@
1010
#
1111
# generate-matrix
1212
#
13-
# This sub-command counts the total number of crates in the SDK (including examples),
13+
# This sub-command counts the total number of crates in the SDK,
1414
# and creates a set of batches based on that size in a format that GitHub Actions
1515
# can consume as a matrix strategy.
1616
#
1717
# run
1818
#
1919
# This sub-command will run the given command on the given crate range.
20-
# It deterministically distributes the SDK crates (including examples) fairly across
20+
# It deterministically distributes the SDK crates fairly across
2121
# the batch range by counting lines of code in attempt to keep batches with roughly
2222
# the same workloads.
2323
#
@@ -109,7 +109,7 @@ def organize_crate_list(batch_count, crates):
109109
return result
110110

111111

112-
# Lists all SDK crates including examples
112+
# Lists all SDK crates
113113
def list_crates(repository_root, path):
114114
to_examine = []
115115
to_examine.extend(list(map(lambda p: f"{repository_root}/{path}/{p}", os.listdir(f"{repository_root}/{path}"))))
@@ -179,15 +179,15 @@ def main():
179179
subparser_generate_matrix = subparsers.add_parser("generate-matrix", help="Generate a test matrix")
180180
subparser_generate_matrix.add_argument("rust_versions", type=str, nargs=argparse.ONE_OR_MORE)
181181
subparser_generate_matrix.add_argument("-b", type=int, dest="batches", required=True, help="Number of batches")
182-
subparser_generate_matrix.add_argument("--folder", required=True, type=str, choices=["sdk", "examples"],
182+
subparser_generate_matrix.add_argument("--folder", required=True, type=str, choices=["sdk"],
183183
help="Name of the folder containing the crates you want to generate a "
184184
"matrix for")
185185

186186
subparser_run = subparsers.add_parser("run", help="Run command on crate range")
187187
subparser_run.add_argument("-b", required=True, type=int, dest="batches", help="Number of batches")
188188
subparser_run.add_argument("-s", required=True, type=int, dest="start_inclusive", help="Range start inclusive")
189189
subparser_run.add_argument("-e", required=True, type=int, dest="end_exclusive", help="Range end exclusive")
190-
subparser_run.add_argument("--folder", required=True, type=str, choices=["sdk", "examples"],
190+
subparser_run.add_argument("--folder", required=True, type=str, choices=["sdk"],
191191
help="Name of the folder containing the crates you want to run a command on")
192192
subparser_run.add_argument("cmd", type=str, nargs=argparse.ONE_OR_MORE)
193193

0 commit comments

Comments
 (0)