-
Notifications
You must be signed in to change notification settings - Fork 40
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
Run cargo nextest
in addition to cargo test
in CI
#788
Closed
Closed
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
7d0e33b
try cargo-nextest in CI, why not
david-crespo 540abb2
try --failure-output immediate-final
david-crespo 15d49cb
also try nextest binary install action
david-crespo c7128dc
add some other random test failures
david-crespo 64b361e
take out the failures
david-crespo ab1eb4a
Merge branch 'main' into cargo-nextest
david-crespo d941113
nextest config file + turn on junit output
david-crespo d4ce216
Merge branch 'main' into cargo-nextest
david-crespo 720c55c
error so we can see that beautiful output
david-crespo d71595e
Revert "error so we can see that beautiful output"
david-crespo 2134e59
archive JUnit output, also change a test to try to force tests to run
david-crespo 96c6fbd
do junit upload more goodly
david-crespo c5ebb72
as the wachowskis said after revolutions, forgive me for this horribl…
david-crespo cc46662
only attempt to upload nextest junit.xml when we're using nextest
david-crespo 5f04247
be less appalling
david-crespo 6b0c970
do nextest in its own job instead of adding to build-and-test
david-crespo 937a475
attempt to add buildomat nextest run too
david-crespo 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
There are no files selected for viewing
This file contains 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,6 @@ | ||
[profile.ci] | ||
fail-fast = false | ||
failure-output = "immediate-final" | ||
|
||
[profile.ci.junit] | ||
path = "junit.xml" | ||
This file contains 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,61 @@ | ||
#!/bin/bash | ||
#: | ||
#: name = "helios / build-and-test" | ||
#: variety = "basic" | ||
#: target = "helios" | ||
#: rust_toolchain = "nightly-2021-11-24" | ||
#: output_rules = [] | ||
#: | ||
|
||
set -o errexit | ||
set -o pipefail | ||
set -o xtrace | ||
|
||
cargo --version | ||
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/out/cockroachdb/bin:$PWD/out/clickhouse" | ||
|
||
ptime -m cargo install cargo-nextest | ||
|
||
# | ||
# We build with: | ||
# | ||
# - RUSTFLAGS="-D warnings" RUSTDOCFLAGS="-D warnings": disallow warnings | ||
# in CI builds. This can result in breakage when the toolchain is | ||
# updated, but that should only happen with a change to the repo, which | ||
# gives us an opportunity to find and fix any newly-introduced warnings. | ||
# | ||
# - `--locked`: do not update Cargo.lock when building. Checking in | ||
# Cargo.lock ensures that everyone is using the same dependencies and | ||
# 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. | ||
# | ||
banner build | ||
export RUSTFLAGS="-D warnings" | ||
export RUSTDOCFLAGS="-D warnings" | ||
ptime -m cargo +'nightly-2021-11-24' build --locked --all-targets --verbose | ||
|
||
# | ||
# Check that building individual packages as when deploying Omicron succeeds | ||
# | ||
banner deploy-check | ||
ptime -m cargo run --bin omicron-package -- check | ||
|
||
# | ||
# NOTE: We're using using the same RUSTFLAGS and RUSTDOCFLAGS as above to avoid | ||
# having to rebuild here. | ||
# | ||
banner test | ||
ptime -m cargo +'nightly-2021-11-24' nextest run --profile ci --workspace --locked --config-file .cargo/nextest.toml |
This file contains 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 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 |
---|---|---|
|
@@ -105,25 +105,7 @@ jobs: | |
- name: Report cargo version | ||
run: cargo --version | ||
- name: Remove unnecessary software | ||
run: | | ||
echo "Disk space:" | ||
df -h | ||
|
||
if [ -d "/usr/share/dotnet" ]; then | ||
echo "Removing dotnet" | ||
sudo rm -rf /usr/share/dotnet | ||
fi | ||
if [ -d "/usr/local/lib/android" ]; then | ||
echo "Removing android" | ||
sudo rm -rf /usr/local/lib/android | ||
fi | ||
if [ -d "/opt/ghc" ]; then | ||
echo "Removing haskell" | ||
sudo rm -rf /opt/ghc | ||
fi | ||
|
||
echo "Disk space:" | ||
df -h | ||
run: ./tools/ci_clear_space | ||
- name: Configure GitHub cache for CockroachDB binaries | ||
id: cache-cockroachdb | ||
# actions/[email protected] | ||
|
@@ -160,13 +142,16 @@ jobs: | |
# - TMPDIR=$OMICRON_TMP: we specify a specific temporary directory so that | ||
# failed test outputs will be in a known place that we can grab at the | ||
# end without also grabbing random other temporary files. | ||
run: TMPDIR=$OMICRON_TMP PATH="$PATH:$PWD/out/cockroachdb/bin:$PWD/out/clickhouse" RUSTFLAGS="-D warnings" RUSTDOCFLAGS="-D warnings" cargo build --locked --all-targets --verbose | ||
- name: Run tests | ||
# Use the same RUSTFLAGS and RUSTDOCFLAGS as above to avoid having to | ||
# rebuild here. | ||
# Put "./cockroachdb/bin" and "./clickhouse" on the PATH for the test | ||
# suite. | ||
run: TMPDIR=$OMICRON_TMP PATH="$PATH:$PWD/out/cockroachdb/bin:$PWD/out/clickhouse" RUSTFLAGS="-D warnings" RUSTDOCFLAGS="-D warnings" cargo test --no-fail-fast --workspace --locked --verbose | ||
run: | | ||
TMPDIR=$OMICRON_TMP PATH="$PATH:$PWD/out/cockroachdb/bin:$PWD/out/clickhouse" RUSTFLAGS="-D warnings" RUSTDOCFLAGS="-D warnings" \ | ||
cargo build --locked --all-targets --verbose | ||
|
||
# Use the same RUSTFLAGS and RUSTDOCFLAGS as above to avoid a rebuild. | ||
# Put "./cockroachdb/bin" and "./clickhouse" on the PATH. | ||
- name: Run tests with cargo test | ||
run: | | ||
TMPDIR=$OMICRON_TMP PATH="$PATH:$PWD/out/cockroachdb/bin:$PWD/out/clickhouse" RUSTFLAGS="-D warnings" RUSTDOCFLAGS="-D warnings" \ | ||
cargo test --no-fail-fast --workspace --locked --verbose | ||
- name: Archive any failed test results | ||
if: ${{ failure() }} | ||
# actions/[email protected] | ||
|
@@ -178,3 +163,78 @@ jobs: | |
${{ env.OMICRON_TMP }} | ||
!${{ env.OMICRON_TMP }}/crdb-base | ||
!${{ env.OMICRON_TMP }}/rustc* | ||
|
||
# Copy of build-and-test. Only difference is it uses cargo-nextest instead of | ||
# cargo test and archives JUnit output instead of all of OMICRON_TMP | ||
build-and-nextest: | ||
env: | ||
OMICRON_TMP: /tmp/omicron_tmp | ||
needs: skip_duplicate_jobs | ||
if: ${{ needs.skip_duplicate_jobs.outputs.should_skip != 'true' }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ ubuntu-18.04, macos-11 ] | ||
steps: | ||
# actions/checkout@v2 | ||
- uses: actions/checkout@28c7f3d2b5162b5ddd3dfd9a45aa55eaf396478b | ||
- uses: Swatinem/rust-cache@v1 | ||
if: ${{ github.ref != 'refs/heads/main' }} | ||
- uses: taiki-e/install-action@nextest | ||
- name: Report cargo version | ||
run: cargo --version | ||
- name: Remove unnecessary software | ||
run: ./tools/ci_clear_space | ||
- name: Configure GitHub cache for CockroachDB binaries | ||
id: cache-cockroachdb | ||
# actions/[email protected] | ||
uses: actions/cache@26968a09c0ea4f3e233fdddbafd1166051a095f6 | ||
with: | ||
key: ${{ runner.os }}-cockroach-binary-${{ hashFiles('tools/cockroachdb_checksums') }} | ||
path: "./out/cockroachdb" | ||
- name: Configure GitHub cache for ClickHouse binaries | ||
id: cache-clickhouse | ||
# actions/[email protected] | ||
uses: actions/cache@26968a09c0ea4f3e233fdddbafd1166051a095f6 | ||
with: | ||
key: ${{ runner.os }}-clickhouse-binary-${{ hashFiles('tools/clickhouse_checksums') }} | ||
path: "./out/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: Create temporary directory for test outputs | ||
run: mkdir -p $OMICRON_TMP | ||
- name: Build | ||
# We build with: | ||
# - RUSTFLAGS="-D warnings" RUSTDOCFLAGS="-D warnings": disallow warnings | ||
# in CI builds. This can result in breakage when the toolchain is | ||
# updated, but that should only happen with a change to the repo, which | ||
# gives us an opportunity to find and fix any newly-introduced warnings. | ||
# - `--locked`: do not update Cargo.lock when building. Checking in | ||
# Cargo.lock ensures that everyone is using the same dependencies and | ||
# 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. | ||
# - TMPDIR=$OMICRON_TMP: we specify a specific temporary directory so that | ||
# failed test outputs will be in a known place that we can grab at the | ||
# end without also grabbing random other temporary files. | ||
run: | | ||
TMPDIR=$OMICRON_TMP PATH="$PATH:$PWD/out/cockroachdb/bin:$PWD/out/clickhouse" RUSTFLAGS="-D warnings" RUSTDOCFLAGS="-D warnings" \ | ||
cargo build --locked --all-targets --verbose | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we could skip the |
||
# Use the same RUSTFLAGS and RUSTDOCFLAGS as above to avoid a rebuild. | ||
# Put "./cockroachdb/bin" and "./clickhouse" on the PATH. | ||
- name: Run tests with cargo nextest | ||
run: | | ||
TMPDIR=$OMICRON_TMP PATH="$PATH:$PWD/out/cockroachdb/bin:$PWD/out/clickhouse" RUSTFLAGS="-D warnings" RUSTDOCFLAGS="-D warnings" \ | ||
cargo nextest run --profile ci --workspace --locked --config-file .cargo/nextest.toml | ||
- name: Archive nextest JUnit output | ||
# actions/[email protected] | ||
uses: actions/upload-artifact@82c141cc518b40d92cc801eee768e7aafc9c2fa2 | ||
with: | ||
name: junit_${{ runner.os }} | ||
retention-days: 90 | ||
path: target/nextest/ci/junit.xml |
This file contains 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 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,20 @@ | ||
#!/bin/bash | ||
|
||
echo "Disk space:" | ||
df -h | ||
|
||
if [ -d "/usr/share/dotnet" ]; then | ||
echo "Removing dotnet" | ||
sudo rm -rf /usr/share/dotnet | ||
fi | ||
if [ -d "/usr/local/lib/android" ]; then | ||
echo "Removing android" | ||
sudo rm -rf /usr/local/lib/android | ||
fi | ||
if [ -d "/opt/ghc" ]; then | ||
echo "Removing haskell" | ||
sudo rm -rf /opt/ghc | ||
fi | ||
|
||
echo "Disk space:" | ||
df -h |
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.
This comment was marked as resolved.
Sorry, something went wrong.
This comment was marked as resolved.
Sorry, something went wrong.