mirror of
https://github.com/launchbadge/sqlx.git
synced 2025-12-30 13:20:59 +00:00
52 lines
1.5 KiB
YAML
52 lines
1.5 KiB
YAML
name: Rust
|
|
|
|
on:
|
|
pull_request:
|
|
push:
|
|
branches:
|
|
- master
|
|
|
|
jobs:
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v1
|
|
|
|
# Rust ------------------------------------------------
|
|
|
|
- name: Install Rust toolchain
|
|
uses: actions-rs/toolchain@v1
|
|
if: steps.cache_rust.outputs.cache-hit != 'true'
|
|
with:
|
|
toolchain: stable
|
|
profile: minimal
|
|
override: true
|
|
|
|
- name: Cache target/
|
|
uses: actions/cache@v1
|
|
with:
|
|
path: target
|
|
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}
|
|
|
|
# -----------------------------------------------------
|
|
|
|
- run: cargo check --no-default-features --features 'chrono uuid postgres mysql macros tls runtime-async-std'
|
|
|
|
- run: cargo check --no-default-features --features 'chrono uuid postgres mysql macros tls runtime-tokio'
|
|
|
|
- run: cargo test -p sqlx-core --no-default-features --features 'chrono uuid postgres mysql macros tls runtime-async-std'
|
|
|
|
- run: cargo test -p sqlx-core --no-default-features --features 'chrono uuid postgres mysql macros tls runtime-tokio'
|
|
|
|
# Rust ------------------------------------------------
|
|
|
|
- name: Prepare build directory for cache
|
|
run: |
|
|
find ./target/debug -maxdepth 1 -type f -delete \
|
|
&& rm -fr ./target/debug/{deps,.fingerprint}/*sqlx* \
|
|
&& rm -f ./target/.rustc_info.json
|
|
|
|
# -----------------------------------------------------
|