-
Notifications
You must be signed in to change notification settings - Fork 2.1k
CI: build and run sqllogictests binary directly in extended workflow #20282
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
Changes from 9 commits
2fa9377
1b4dbee
be84d47
304d28d
7b5b2a9
8d9bcb8
3e64ee2
e0ae244
cd967ba
ceb7d76
882251a
2b5a995
04b3bf1
937fab9
b830912
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -167,11 +167,18 @@ jobs: | |
| uses: ./.github/actions/setup-builder | ||
| with: | ||
| rust-version: stable | ||
| - name: Build sqllogictest binary | ||
| run: | | ||
| TEST_BIN=$(cargo test --features backtrace,parquet_encryption --profile release-nonlto --test sqllogictests --no-run --message-format=json | sed -n 's/.*"executable":"\([^"]*\)".*/\1/p' | head -n 1) | ||
| if [ -z "$TEST_BIN" ]; then | ||
| echo "Could not find sqllogictests test binary" | ||
| exit 1 | ||
| fi | ||
| echo "TEST_BIN=$TEST_BIN" >> "$GITHUB_ENV" | ||
| - name: Run sqllogictest | ||
| run: | | ||
| cargo test --features backtrace,parquet_encryption --profile release-nonlto --test sqllogictests -- --include-sqlite | ||
| ( | ||
|
Contributor
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. Why the
Contributor
Author
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. The The subshell I’ll remove the subshell and switch to a cleaner step-level |
||
| cd datafusion/sqllogictest | ||
| "$TEST_BIN" --include-sqlite | ||
| ) | ||
| cargo clean | ||
|
|
||
|
|
||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rather than
cargo testanother idea would be to usecargo build🤔Also, what is the reason to use
--message-format=json?Finally, what is the
headcommand for? I didn't see any obvious reason inhttps://github.com/apache/datafusion/actions/runs/21890300850/job/63194519053
Perhaps you could add a comment explaining what those commands are for
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, good suggestions. I agree
cargo buildis clearer here since this step only compiles thesqllogicteststarget and does not run it.I used
--message-format=jsonto capture the exact emitted test binary path because Cargo places test executables undertarget/.../depswith a hash suffix. Thehead -n 1was a simple way to select the first extracted executable path from the stream.I’ll simplify and document this more clearly in the workflow so the intent is explicit.