forked from launchbadge/sqlx
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix CI after Rust 1.80, remove dead feature references (launchbadge#3381
) * fix(ci): update workflows/examples.yml * Removed archived `actions-rs` actions * Upgraded `Swatinem/rust-cache`, `actions/checkout`, `actions/download-artifact`, `actions/upload-artifact` * chore: deprecate `AnyKind` * fix: remove dead references to DB features in `sqlx-core` This reactivates a couple of tests that had stopped working. * chore(ci): move sqlx-cli checks to their own workflow * fix(ci): remove remaining `uses: actions-rs/cargo` * fix warnings * chore: add titles to sqlx-cli jobs * fix warnings (2) * fix error in pool example * fix warnings (3) * fix query_builder test * fix: don't run CLI tests on Windows * chore: upgrade `rust-toolchain` to 1.80 * fix(postgres): fix missing Tokio specialization in `PgCopyIn` Caught by the new `unexpected_cfgs` lint. * fix new warnings
- Loading branch information
Showing
22 changed files
with
334 additions
and
352 deletions.
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
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,100 @@ | ||
name: SQLx CLI | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- main | ||
- "*-dev" | ||
|
||
jobs: | ||
check: | ||
name: Check | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- run: | | ||
rustup update | ||
rustup component add clippy | ||
rustup toolchain install beta | ||
rustup component add --toolchain beta clippy | ||
- uses: Swatinem/rust-cache@v2 | ||
|
||
- run: cargo clippy --manifest-path sqlx-cli/Cargo.toml -- -D warnings | ||
|
||
# Run beta for new warnings but don't break the build. | ||
# Use a subdirectory of `target` to avoid clobbering the cache. | ||
- run: > | ||
cargo +beta clippy | ||
--manifest-path sqlx-cli/Cargo.toml | ||
--target-dir target/beta/ | ||
test: | ||
name: Test | ||
runs-on: ${{ matrix.os }} | ||
|
||
strategy: | ||
matrix: | ||
# Note: macOS-latest uses M1 Silicon (ARM64) | ||
os: | ||
- ubuntu-latest | ||
# FIXME: migrations tests fail on Windows for whatever reason | ||
# - windows-latest | ||
- macOS-13 | ||
- macOS-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: Swatinem/rust-cache@v2 | ||
with: | ||
key: ${{ runner.os }}-test | ||
|
||
- run: cargo test --manifest-path sqlx-cli/Cargo.toml | ||
|
||
build: | ||
name: Build | ||
runs-on: ${{ matrix.os }} | ||
|
||
strategy: | ||
matrix: | ||
# Note: macOS-latest uses M1 Silicon (ARM64) | ||
os: | ||
- ubuntu-latest | ||
- windows-latest | ||
- macOS-13 | ||
- macOS-latest | ||
include: | ||
- os: ubuntu-latest | ||
target: x86_64-unknown-linux-musl | ||
args: --features openssl-vendored | ||
bin: target/debug/cargo-sqlx | ||
- os: windows-latest | ||
target: x86_64-pc-windows-msvc | ||
bin: target/debug/cargo-sqlx.exe | ||
- os: macOS-13 | ||
target: x86_64-apple-darwin | ||
bin: target/debug/cargo-sqlx | ||
- os: macOS-latest | ||
target: aarch64-apple-darwin | ||
bin: target/debug/cargo-sqlx | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Use latest Rust | ||
run: rustup override set stable | ||
|
||
- uses: Swatinem/rust-cache@v2 | ||
with: | ||
key: ${{ runner.os }}-cli | ||
|
||
- run: cargo build --manifest-path sqlx-cli/Cargo.toml --bin cargo-sqlx ${{ matrix.args }} | ||
|
||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: cargo-sqlx-${{ matrix.target }} | ||
path: ${{ matrix.bin }} |
Oops, something went wrong.