-
Notifications
You must be signed in to change notification settings - Fork 1k
add initial cargo ci #3409
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
add initial cargo ci #3409
Changes from 29 commits
Commits
Show all changes
39 commits
Select commit
Hold shift + click to select a range
4824f5f
add initial cargo ci
Kasama c8581e2
merge master into add/cargo-ci
Kasama 1c0406d
update cargo ci
Kasama c5ea361
[add/cargo-ci]: Merge remote-tracking branch 'origin/master' into add…
bfops b86cce7
Merge branch 'master' of github.com:clockworklabs/SpacetimeDB into ad…
Kasama 852c13c
fix: PR comments
Kasama 2b2250a
update ci to call cargo for unreal test
Kasama a9b46b2
update cargo ci docs
Kasama 89b40c0
merge master into add/cargo-ci
Kasama b318678
Merge branch 'master' of github.com:clockworklabs/SpacetimeDB into ad…
Kasama fe350f5
fix: temp disable unreal engine tests running from `cargo ci`
Kasama d546167
Merge branch 'master' of github.com:clockworklabs/SpacetimeDB into ad…
Kasama ac25ba8
fix cargo lock
Kasama 93e12b7
update smoketests call
Kasama 8bf7367
add directory check for cli-docs
Kasama a733f12
update cargo ci docs
Kasama 51a0c14
merge master into add/cargo-ci
Kasama 8a37584
Merge branch 'master' of github.com:clockworklabs/SpacetimeDB into ad…
Kasama 44eafca
remove unreal tests from cargo ci initially
Kasama 05d4693
[add/cargo-ci]: Merge remote-tracking branch 'origin/master' into add…
bfops 661af74
[add/cargo-ci]: fixes
bfops b3e115f
[add/cargo-ci]: review
bfops e0517e0
[add/cargo-ci]: rm
bfops 8a479f5
[add/cargo-ci]: revert
bfops dabe11f
[add/cargo-ci]: update self-docs
bfops f67e95d
[add/cargo-ci]: fix?
bfops 4498429
[add/cargo-ci]: remove stale comment
bfops a7202ef
[add/cargo-ci]: review
bfops 42ed67c
Merge branch 'master' of github.com:clockworklabs/SpacetimeDB into ad…
Kasama d13b20a
merge master into add/cargo-ci
Kasama 941763d
workaround: don't use cargo ci for windows jobs
Kasama 7cf2039
merge master into add/cargo-ci
Kasama 7fd39fd
add: bash macro for python3 check
Kasama 922dc0c
Merge branch 'master' into add/cargo-ci
bfops 4070974
Apply suggestion from @bfops
bfops 3fb016d
Apply suggestion from @bfops
bfops a3a2ea9
Merge branch 'master' of github.com:clockworklabs/SpacetimeDB into ad…
Kasama 77a71ef
Merge branch 'add/cargo-ci' of github.com:clockworklabs/SpacetimeDB i…
Kasama 94302a8
Update tools/ci/src/main.rs
Kasama File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| [package] | ||
| name = "ci" | ||
| version = "0.1.0" | ||
| edition.workspace = true | ||
|
|
||
| [dependencies] | ||
| log.workspace = true | ||
| anyhow.workspace = true | ||
| chrono = { workspace = true, features=["clock"] } | ||
| clap.workspace = true | ||
| regex.workspace = true | ||
| duct.workspace = true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,148 @@ | ||
| # SpacetimeDB's cargo ci | ||
|
|
||
| ## Overview | ||
|
|
||
| This document provides an overview of the `cargo ci` command-line tool, and documentation for each of its subcommands and options. | ||
|
|
||
| ## `cargo ci` | ||
|
|
||
| SpacetimeDB CI tasks | ||
|
|
||
| This tool provides several subcommands for automating CI workflows in SpacetimeDB. | ||
|
|
||
| It may be invoked via `cargo ci <subcommand>`, or simply `cargo ci` to run all subcommands in sequence. It is mostly designed to be run in CI environments via the github workflows, but can also be run locally | ||
|
|
||
| **Usage:** | ||
| ```bash | ||
| Usage: cargo ci [OPTIONS] [COMMAND] | ||
| ``` | ||
|
|
||
| **Options:** | ||
|
|
||
| - `--skip`: Skip specified subcommands when running all | ||
|
|
||
| When no subcommand is specified, all subcommands are run in sequence. This option allows specifying subcommands to skip when running all. For example, to skip the `unreal-tests` subcommand, use `--skip unreal-tests`. | ||
|
|
||
| - `--help`: Print help (see a summary with '-h') | ||
|
|
||
| ### `test` | ||
|
|
||
| Runs tests | ||
|
|
||
| Runs rust tests, codegens csharp sdk and runs csharp tests. This does not include Unreal tests. This expects to run in a clean git state. | ||
|
|
||
| **Usage:** | ||
| ```bash | ||
| Usage: test | ||
| ``` | ||
|
|
||
| **Options:** | ||
|
|
||
| - `--help`: Print help (see a summary with '-h') | ||
|
|
||
| ### `lint` | ||
|
|
||
| Lints the codebase | ||
|
|
||
| Runs rustfmt, clippy, csharpier and generates rust docs to ensure there are no warnings. | ||
|
|
||
| **Usage:** | ||
| ```bash | ||
| Usage: lint | ||
| ``` | ||
|
|
||
| **Options:** | ||
|
|
||
| - `--help`: Print help (see a summary with '-h') | ||
|
|
||
| ### `wasm-bindings` | ||
|
|
||
| Tests Wasm bindings | ||
|
|
||
| Runs tests for the codegen crate and builds a test module with the wasm bindings. | ||
|
|
||
| **Usage:** | ||
| ```bash | ||
| Usage: wasm-bindings | ||
| ``` | ||
|
|
||
| **Options:** | ||
|
|
||
| - `--help`: Print help (see a summary with '-h') | ||
|
|
||
| ### `smoketests` | ||
|
|
||
| Runs smoketests | ||
|
|
||
| Executes the smoketests suite with some default exclusions. | ||
|
|
||
| **Usage:** | ||
| ```bash | ||
| Usage: smoketests [ARGS]... | ||
| ``` | ||
|
|
||
| **Options:** | ||
|
|
||
| - `args`: Additional arguments to pass to the smoketests runner. These are usually set by the CI environment, such as `-- --docker` | ||
| - `--help`: Print help (see a summary with '-h') | ||
|
|
||
| ### `update-flow` | ||
|
|
||
| Tests the update flow | ||
|
|
||
| Tests the self-update flow by building the spacetimedb-update binary for the specified target, by default the current target, and performing a self-install into a temporary directory. | ||
|
|
||
| **Usage:** | ||
| ```bash | ||
| Usage: update-flow [OPTIONS] | ||
| ``` | ||
|
|
||
| **Options:** | ||
|
|
||
| - `--target`: Target triple to build for, by default the current target. Used by github workflows to check the update flow on multiple platforms. | ||
| - `--github-token-auth`: Whether to enable github token authentication feature when building the update binary. By default this is disabled. | ||
| - `--help`: Print help (see a summary with '-h') | ||
|
|
||
| ### `cli-docs` | ||
|
|
||
| **Usage:** | ||
| ```bash | ||
| Usage: cli-docs [OPTIONS] | ||
| ``` | ||
|
|
||
| **Options:** | ||
|
|
||
| - `--spacetime-path`: specify a custom path to the SpacetimeDB repository root (where the main Cargo.toml is located) | ||
| - `--help`: Print help (see a summary with '-h') | ||
|
|
||
| ### `self-docs` | ||
|
|
||
| **Usage:** | ||
| ```bash | ||
| Usage: self-docs [OPTIONS] | ||
| ``` | ||
|
|
||
| **Options:** | ||
|
|
||
| - `--check`: Only check for changes, do not generate the docs | ||
| - `--help`: Print help (see a summary with '-h') | ||
|
|
||
| ### `help` | ||
|
|
||
| **Usage:** | ||
| ```bash | ||
| Usage: help [COMMAND]... | ||
| ``` | ||
|
|
||
| **Options:** | ||
|
|
||
| - `subcommand`: | ||
|
|
||
|
|
||
| --- | ||
|
|
||
| This document is auto-generated by running: | ||
|
|
||
| ```bash | ||
| cargo ci self-docs | ||
| ``` |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.