mirror of https://github.com/smithy-lang/smithy-rs
4604aa5b5d
The sparse index is preferred to the crates.io API for the checks we need, according to the [documentation](https://crates.io/data-access). When the tools were first implemented, the sparse index didn't exist, so the API was used. ---- _By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice._ |
||
---|---|---|
.. | ||
changelogger | ||
crate-hasher | ||
difftags | ||
publisher | ||
runtime-versioner | ||
sdk-lints | ||
sdk-versioner | ||
smithy-rs-tool-common | ||
Dockerfile | ||
README.md | ||
add-local-user.dockerfile | ||
build.docker-compose.yml | ||
ci-action | ||
ci-create-workspace | ||
sanity-test |
README.md
ci-build
This directory includes everything to build the build/release/CI Docker image.
Dockerfile
: Dockerfile used to create the base build image. Needs to be intools/ci-build
so that it can copy all the tools source code into the image at build time.add-local-user.dockerfile
: Creates a user in the build image with the host's user IDbuild.docker-compose.yml
: Docker Compose file for using the build imageci-action
: Script for running CI actions inside the Docker build imageci-create-workspace
: Used byci-action
, but can be run manually to create a one-off workspace for debuggingsanity-test
: Script that sanity tests the Docker build image- Other directories include various tools written in Rust for build/release/CI
There are three spaces you need to conceptualize for testing this locally:
- Origin: The original
smithy-rs
where you're iterating on CI scripts. - Starting space: Directory with
smithy-rs
to run CI checks against. You have to create this. Conceptually, this is equivalent to the GitHub Actions working directory. - Action space: Temporary directory maintained by
ci-action
where the CI checks actually run.
To create the starting space, do the following:
cd /path/to/my/starting-space
git clone https://github.com/smithy-lang/smithy-rs.git
# Optionally check out the revision you want to work with in the checked out smithy-rs.
# Just make sure you are in /path/to/my/starting-space (or whatever you called it) after.
Then you can test CI against that starting space by running:
$ORIGIN_PATH/tools/ci-build/ci-action <action> [args...]
The action names are the names of the scripts in tools/ci-scripts/
, and [args...]
get forwarded to those scripts.
Note: ci-action
does not rebuild the build image, so if you modified a script,
you need to run ./acquire-build-image
from the origin .github/scripts
path.