Skip to content
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

Update CI to test with a newer Rust version #62

Merged
merged 4 commits into from
May 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
48 changes: 28 additions & 20 deletions .github/workflows/validation-rust.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,20 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: dtolnay/[email protected]
with:
components: clippy
- run: rustup default 1.78.0 && rustup component add clippy && rustup update
- uses: Swatinem/rust-cache@v2
- run: cargo clippy --all-features --all-targets
- run: cargo clippy --no-default-features --all-targets

msrv:
name: "Check MSRV"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: rustup default 1.65.0 && rustup update
- uses: Swatinem/rust-cache@v2
- run: cargo clippy --all-features --all-targets -- -D warnings
- run: cargo clippy --no-default-features --all-targets -- -D warnings
- run: cargo check --all-features --all-targets
- run: cargo check --no-default-features --all-targets

test:
strategy:
Expand All @@ -50,22 +58,24 @@ jobs:
name: "Test on ${{ matrix.os }} (cargo test)"
runs-on: ${{ matrix.os }}
env:
MYSQLCLIENT_LIB_DIR: C:\mysql\lib
MYSQLCLIENT_LIB_DIR: 'C:\Program Files\MySQL\MySQL Server 8.0\lib'
# will be accepted by a later Diesel version
MYSQLCLIENT_LIB_DIR_X86_64_PC_WINDOWS_MSVC: 'C:\Program Files\MySQL\MySQL Server 8.0\lib'
steps:
- uses: actions/checkout@v2
- name: List files
run: |
pwd
ls
# use a version later than MSRV for trybuild consistency
- run: rustup default 1.70 && rustup update
- run: rustc -vV
- uses: Swatinem/rust-cache@v2
- uses: dtolnay/[email protected]
- run: cargo test
- run: cargo test -vvv

integration:
name: "Integration testing (docker)"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: rustup default stable && rustup update
- uses: Swatinem/rust-cache@v2
- name: Cache Docker layers
uses: actions/cache@v2
id: cache-docker
Expand Down Expand Up @@ -104,7 +114,9 @@ jobs:
-e RUST_LIB_BACKTRACE=1
--name mdb-example-container
mdb-example-so
- uses: dtolnay/rust-toolchain@stable
&& sleep 4
# verify we started successfully
- run: mysql -uroot -pexample -h0.0.0.0 -P12300 --protocol=tcp -e 'show databases'
- name: Run integration testing
# Run only integration tests with `--test '*'`
run: cargo test -p udf-examples --test '*' --features backend
Expand All @@ -121,9 +133,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: dtolnay/rust-toolchain@nightly
with:
components: miri
- run: rustup default nightly && rustup component add miri && rustup update
- uses: Swatinem/rust-cache@v2
- name: Run Miri
env:
Expand All @@ -136,9 +146,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: dtolnay/rust-toolchain@nightly
with:
components: rustfmt
- run: rustup default nightly && rustup component add rustfmt && rustup update
- uses: Swatinem/rust-cache@v2
- run: cargo fmt --all -- --check
- uses: actions/setup-python@v3
Expand All @@ -151,7 +159,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: dtolnay/rust-toolchain@nightly
- run: rustup default nightly && rustup update
- uses: Swatinem/rust-cache@v2
- run: cargo doc

Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
**/target
**/Cargo.lock
**/.DS_Store
.docker-cargo/
Loading
Loading