Skip to content
Merged
Show file tree
Hide file tree
Changes from 17 commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
082c009
[nexus] Refactor test-utilities to helper crate, add test benchmarks
smklein Dec 8, 2021
444aaa0
No need to be screamy about disk posting, that's for another PR
smklein Dec 8, 2021
42727a7
Optimize CRDB setup by using 'compile-time' population of a seed data…
smklein Dec 8, 2021
d1c1345
Merge branch 'main' into benchmark-tests
smklein Dec 8, 2021
54b6f68
Add to top-level workspace
smklein Dec 9, 2021
6850f67
Merge branch 'benchmark-tests' into optimize-crdb-setup
smklein Dec 9, 2021
c736fe0
Add some explanations
smklein Dec 9, 2021
05aed1b
re-run if build.rs changes
smklein Dec 9, 2021
304d03d
The temporary directory might not exist
smklein Dec 9, 2021
61d3fd3
Merge branch 'main' into benchmark-tests
smklein Dec 9, 2021
a992ee8
Merge branch 'benchmark-tests' into optimize-crdb-setup
smklein Dec 9, 2021
c5427aa
proby dropshot
smklein Dec 9, 2021
fea3cd9
Remove test-utils from default workspace
smklein Dec 9, 2021
0153e19
Download database executables *before* we build/test all targets
smklein Dec 9, 2021
0bcdc28
Merge branch 'main' into benchmark-tests
smklein Dec 9, 2021
52b31c6
Merge branch 'benchmark-tests' into optimize-crdb-setup
smklein Dec 9, 2021
a0c88a4
Adjust path when building, we want that executable for our build script
smklein Dec 9, 2021
43b75c9
Merge branch 'main' into benchmark-tests
smklein Dec 9, 2021
3dd98d8
Merge branch 'benchmark-tests' into optimize-crdb-setup
smklein Dec 9, 2021
419d89e
Merge branch 'main' into benchmark-tests
smklein Dec 9, 2021
7b9dc1b
Merge branch 'benchmark-tests' into optimize-crdb-setup
smklein Dec 9, 2021
9ad763c
Merge branch 'main' into optimize-crdb-setup
smklein Dec 9, 2021
1b19c57
fixup
smklein Dec 9, 2021
4f9feef
review feedback
smklein Dec 9, 2021
8eb0549
OUT of the default members again gah
smklein Dec 9, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions .github/buildomat/jobs/build-and-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,18 @@ set -o xtrace
cargo --version
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The change here - and in the ".github/workflows/rust.yml" file - just make sure cockroach is downloaded and on the PATH before we cargo build --all-targets, since we're now using it in a build script.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you update the README to reflect this? Basically this part:

CockroachDB v21.1.10.
The test suite expects to be able to start a single-node CockroachDB cluster using the cockroach executable on your PATH.

I think that should now say "the build and test suite expect..."

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated

rustc --version

banner clickhouse
ptime -m ./tools/ci_download_clickhouse

banner cockroach
ptime -m bash ./tools/ci_download_cockroachdb

#
# Put "./cockroachdb/bin" and "./clickhouse" on the PATH for the test
# suite.
#
export PATH="$PATH:$PWD/cockroachdb/bin:$PWD/clickhouse"

#
# We build with:
#
Expand All @@ -33,18 +45,6 @@ export RUSTFLAGS="-D warnings"
export RUSTDOCFLAGS="-D warnings"
ptime -m cargo +'nightly-2021-11-24' build --locked --all-targets --verbose

banner clickhouse
ptime -m ./tools/ci_download_clickhouse

banner cockroach
ptime -m bash ./tools/ci_download_cockroachdb

#
# Put "./cockroachdb/bin" and "./clickhouse" on the PATH for the test
# suite.
#
export PATH="$PATH:$PWD/cockroachdb/bin:$PWD/clickhouse"

#
# NOTE: We're using using the same RUSTFLAGS and RUSTDOCFLAGS as above to avoid
# having to rebuild here.
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,12 @@ jobs:
with:
key: ${{ runner.os }}-clickhouse-binary-${{ hashFiles('tools/clickhouse_checksums') }}
path: "clickhouse"
- name: Download ClickHouse
if: steps.cache-clickhouse.outputs.cache-hit != 'true'
run: ./tools/ci_download_clickhouse
- name: Download CockroachDB binary
if: steps.cache-cockroachdb.outputs.cache-hit != 'true'
run: bash ./tools/ci_download_cockroachdb
- name: Build
# We build with:
# - RUSTFLAGS="-D warnings" RUSTDOCFLAGS="-D warnings": disallow warnings
Expand All @@ -111,13 +117,7 @@ jobs:
# also gives us a record of which dependencies were used for each CI
# run. Building with `--locked` ensures that the checked-in Cargo.lock
# is up to date.
run: RUSTFLAGS="-D warnings" RUSTDOCFLAGS="-D warnings" cargo +${{ matrix.toolchain }} build --locked --all-targets --verbose
- name: Download ClickHouse
if: steps.cache-clickhouse.outputs.cache-hit != 'true'
run: ./tools/ci_download_clickhouse
- name: Download CockroachDB binary
if: steps.cache-cockroachdb.outputs.cache-hit != 'true'
run: bash ./tools/ci_download_cockroachdb
run: PATH="$PATH:$PWD/cockroachdb/bin:$PWD/clickhouse" RUSTFLAGS="-D warnings" RUSTDOCFLAGS="-D warnings" cargo +${{ matrix.toolchain }} build --locked --all-targets --verbose
- name: Run tests
# Use the same RUSTFLAGS and RUSTDOCFLAGS as above to avoid having to
# rebuild here.
Expand Down
176 changes: 174 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ members = [
"common",
"nexus",
"nexus/src/db/db-macros",
"nexus/test-utils",
"nexus-client",
"package",
"rpaths",
Expand Down
9 changes: 5 additions & 4 deletions nexus/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,9 @@ version = "0.8"
features = [ "serde", "v4" ]

[dev-dependencies]
bytes = "1.0.1"
criterion = { version = "0.3", features = [ "async_tokio" ] }
expectorate = "1.0.4"
nexus-test-utils = { path = "test-utils" }
omicron-test-utils = { path = "../test-utils" }
openapiv3 = "0.5.0"
oximeter-db = { path = "../oximeter/db" }
Expand All @@ -118,9 +119,9 @@ subprocess = "0.2.8"
git = "https://github.com/oxidecomputer/openapi-lint"
branch = "main"

[dev-dependencies.oximeter-collector]
version = "0.1.0"
path = "../oximeter/collector"
[[bench]]
name = "setup_benchmark"
harness = false

#
# Disable doc builds by default for our binaries to work around issue
Expand Down
Loading