diff --git a/.github/workflows/deadpool-diesel.yml b/.github/workflows/deadpool-diesel.yml index 1cfee70b..7bb0ce6c 100644 --- a/.github/workflows/deadpool-diesel.yml +++ b/.github/workflows/deadpool-diesel.yml @@ -6,13 +6,22 @@ env: jobs: check-integration: name: Check integration - runs-on: ubuntu-latest + runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v3 - uses: actions-rs/toolchain@v1 with: profile: minimal toolchain: stable + - if: runner.os == 'Windows' && matrix.feature == 'mysql' + name: Install mysql (Windows) + run: |- + echo "MYSQLCLIENT_LIB_DIR=C:\Program Files\MySQL\MySQL Server 8.0\lib" >> $GITHUB_ENV + echo "MYSQLCLIENT_VERSION=8.0.40" >> $GITHUB_ENV + echo "C:\Program Files\MySQL\MySQL Server 8.0\lib" >> $GITHUB_PATH + echo "C:\Program Files\MySQL\MySQL Server 8.0\bin" >> $GITHUB_PATH + dir "C:\Program Files\MySQL\MySQL Server 8.0\lib" + shell: bash - run: cargo check --features ${{ matrix.feature }} strategy: fail-fast: false @@ -25,6 +34,9 @@ jobs: - mysql - postgres - sqlite + os: + - ubuntu-latest + - windows-2025 check-reexported-features: name: Check re-exported features runs-on: ubuntu-latest @@ -104,10 +116,12 @@ name: deadpool-diesel - main paths: - crates/deadpool-diesel/** + - .github/workflows/deadpool-diesel.yml push: branches: - main paths: - crates/deadpool-diesel/** + - .github/workflows/deadpool-diesel.yml tags: - deadpool-diesel-v* diff --git a/.github/workflows/deadpool-lapin.yml b/.github/workflows/deadpool-lapin.yml index 34caa416..0d9d01e2 100644 --- a/.github/workflows/deadpool-lapin.yml +++ b/.github/workflows/deadpool-lapin.yml @@ -6,7 +6,7 @@ env: jobs: check-integration: name: Check integration - runs-on: ubuntu-latest + runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v3 - uses: actions-rs/toolchain@v1 @@ -21,6 +21,9 @@ jobs: - serde - rt_async-std_1 - rt_tokio_1 + os: + - ubuntu-latest + - windows-2025 check-reexported-features: name: Check re-exported features runs-on: ubuntu-latest @@ -109,10 +112,12 @@ name: deadpool-lapin - main paths: - crates/deadpool-lapin/** + - .github/workflows/deadpool-lapin.yml push: branches: - main paths: - crates/deadpool-lapin/** + - .github/workflows/deadpool-lapin.yml tags: - deadpool-lapin-v* diff --git a/.github/workflows/deadpool-libsql.yml b/.github/workflows/deadpool-libsql.yml index cfe741d1..b65a2377 100644 --- a/.github/workflows/deadpool-libsql.yml +++ b/.github/workflows/deadpool-libsql.yml @@ -6,7 +6,7 @@ env: jobs: check-integration: name: Check integration - runs-on: ubuntu-latest + runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v3 - uses: actions-rs/toolchain@v1 @@ -23,6 +23,9 @@ jobs: - remote - replication - sync + os: + - ubuntu-latest + - windows-2025 check-reexported-features: name: Check re-exported features runs-on: ubuntu-latest @@ -102,10 +105,12 @@ name: deadpool-libsql - main paths: - crates/deadpool-libsql/** + - .github/workflows/deadpool-libsql.yml push: branches: - main paths: - crates/deadpool-libsql/** + - .github/workflows/deadpool-libsql.yml tags: - deadpool-libsql-v* diff --git a/.github/workflows/deadpool-memcached.yml b/.github/workflows/deadpool-memcached.yml index 9b96ce1d..d8361fc1 100644 --- a/.github/workflows/deadpool-memcached.yml +++ b/.github/workflows/deadpool-memcached.yml @@ -83,10 +83,12 @@ name: deadpool-memcached - main paths: - crates/deadpool-memcached/** + - .github/workflows/deadpool-memcached.yml push: branches: - main paths: - crates/deadpool-memcached/** + - .github/workflows/deadpool-memcached.yml tags: - deadpool-memcached-v* diff --git a/.github/workflows/deadpool-postgres.yml b/.github/workflows/deadpool-postgres.yml index 6163c914..9c29cdb0 100644 --- a/.github/workflows/deadpool-postgres.yml +++ b/.github/workflows/deadpool-postgres.yml @@ -6,7 +6,7 @@ env: jobs: check-integration: name: Check integration - runs-on: ubuntu-latest + runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v3 - uses: actions-rs/toolchain@v1 @@ -21,6 +21,9 @@ jobs: - serde - rt_tokio_1 - rt_async-std_1 + os: + - ubuntu-latest + - windows-2025 check-integration-wasm: name: Check integration (WebAssembly) runs-on: ubuntu-latest @@ -131,10 +134,12 @@ name: deadpool-postgres - main paths: - crates/deadpool-postgres/** + - .github/workflows/deadpool-postgres.yml push: branches: - main paths: - crates/deadpool-postgres/** + - .github/workflows/deadpool-postgres.yml tags: - deadpool-postgres-v* diff --git a/.github/workflows/deadpool-r2d2.yml b/.github/workflows/deadpool-r2d2.yml index f642394d..0819c282 100644 --- a/.github/workflows/deadpool-r2d2.yml +++ b/.github/workflows/deadpool-r2d2.yml @@ -4,6 +4,27 @@ defaults: env: RUST_BACKTRACE: 1 jobs: + check-integration: + name: Check integration + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v3 + - uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + - run: cargo check --features ${{ matrix.feature }} + strategy: + fail-fast: false + matrix: + feature: + - rt_async-std_1 + - rt_tokio_1 + - serde + - tracing + os: + - ubuntu-latest + - windows-2025 check-reexported-features: name: Check re-exported features runs-on: ubuntu-latest @@ -97,10 +118,12 @@ name: deadpool-r2d2 - main paths: - crates/deadpool-r2d2/** + - .github/workflows/deadpool-r2d2.yml push: branches: - main paths: - crates/deadpool-r2d2/** + - .github/workflows/deadpool-r2d2.yml tags: - deadpool-r2d2-v* diff --git a/.github/workflows/deadpool-redis.yml b/.github/workflows/deadpool-redis.yml index ccbc8469..fb485c3c 100644 --- a/.github/workflows/deadpool-redis.yml +++ b/.github/workflows/deadpool-redis.yml @@ -6,7 +6,7 @@ env: jobs: check-integration: name: Check integration - runs-on: ubuntu-latest + runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v3 - uses: actions-rs/toolchain@v1 @@ -23,6 +23,9 @@ jobs: - rt_async-std_1 - cluster - sentinel + os: + - ubuntu-latest + - windows-2025 check-reexported-features: name: Check re-exported features runs-on: ubuntu-latest @@ -121,10 +124,12 @@ name: deadpool-redis - main paths: - crates/deadpool-redis/** + - .github/workflows/deadpool-redis.yml push: branches: - main paths: - crates/deadpool-redis/** + - .github/workflows/deadpool-redis.yml tags: - deadpool-redis-v* diff --git a/.github/workflows/deadpool-runtime.yml b/.github/workflows/deadpool-runtime.yml index 576d61f5..54477b4e 100644 --- a/.github/workflows/deadpool-runtime.yml +++ b/.github/workflows/deadpool-runtime.yml @@ -71,10 +71,12 @@ name: deadpool-runtime - main paths: - crates/deadpool-runtime/** + - .github/workflows/deadpool-runtime.yml push: branches: - main paths: - crates/deadpool-runtime/** + - .github/workflows/deadpool-runtime.yml tags: - deadpool-runtime-v* diff --git a/.github/workflows/deadpool-sqlite.yml b/.github/workflows/deadpool-sqlite.yml index 651ae06b..cedcde95 100644 --- a/.github/workflows/deadpool-sqlite.yml +++ b/.github/workflows/deadpool-sqlite.yml @@ -6,7 +6,7 @@ env: jobs: check-integration: name: Check integration - runs-on: ubuntu-latest + runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v3 - uses: actions-rs/toolchain@v1 @@ -22,6 +22,9 @@ jobs: - tracing - rt_tokio_1 - rt_async-std_1 + os: + - ubuntu-latest + - windows-2025 check-reexported-features: name: Check re-exported features runs-on: ubuntu-latest @@ -101,10 +104,12 @@ name: deadpool-sqlite - main paths: - crates/deadpool-sqlite/** + - .github/workflows/deadpool-sqlite.yml push: branches: - main paths: - crates/deadpool-sqlite/** + - .github/workflows/deadpool-sqlite.yml tags: - deadpool-sqlite-v* diff --git a/.github/workflows/deadpool-sync.yml b/.github/workflows/deadpool-sync.yml index 3d938602..d2b82196 100644 --- a/.github/workflows/deadpool-sync.yml +++ b/.github/workflows/deadpool-sync.yml @@ -71,10 +71,12 @@ name: deadpool-sync - main paths: - crates/deadpool-sync/** + - .github/workflows/deadpool-sync.yml push: branches: - main paths: - crates/deadpool-sync/** + - .github/workflows/deadpool-sync.yml tags: - deadpool-sync-v* diff --git a/.github/workflows/deadpool.yml b/.github/workflows/deadpool.yml index 236fe9e7..9621ac72 100644 --- a/.github/workflows/deadpool.yml +++ b/.github/workflows/deadpool.yml @@ -91,10 +91,12 @@ name: deadpool - main paths: - crates/deadpool/** + - .github/workflows/deadpool.yml push: branches: - main paths: - crates/deadpool/** + - .github/workflows/deadpool.yml tags: - deadpool-v* diff --git a/ci.jsonnet b/ci.jsonnet index f973af0f..019726a9 100644 --- a/ci.jsonnet +++ b/ci.jsonnet @@ -25,6 +25,7 @@ local features = else null; local check_features = getConfig("check.features", features); +local check_extra_steps = getConfig("check.extra_steps", []); local test_features = getConfig("test.features", features); local test_services = getConfig("test.services", {}); local test_env = getConfig("test.env", {}); @@ -45,11 +46,11 @@ local genFeaturesFlag(features) = push: { branches: [ "main" ], tags: [ std.format("%s-v*", crate) ], - paths: [ std.format("crates/%s/**", crate) ] + paths: [ std.format("crates/%s/**", crate), std.format(".github/workflows/%s.yml", crate) ] }, pull_request: { branches: [ "main" ], - paths: [ std.format("crates/%s/**", crate) ] + paths: [ std.format("crates/%s/**", crate), std.format(".github/workflows/%s.yml", crate) ] } }, env: { @@ -112,15 +113,16 @@ local genFeaturesFlag(features) = ########### # FIXME The check integration job should be enabled for all crates with a backend - [if std.member(["deadpool-diesel", "deadpool-lapin", "deadpool-postgres", "deadpool-redis", "deadpool-sqlite", "deadpool-libsql"], crate) then "check-integration"]: { + [if check_features != null then "check-integration"]: { name: "Check integration", strategy: { "fail-fast": false, matrix: { feature: check_features, + os: ["ubuntu-latest", "windows-2025"], } }, - "runs-on": "ubuntu-latest", + "runs-on": "${{ matrix.os }}", steps: [ { uses: "actions/checkout@v3" }, { @@ -130,6 +132,7 @@ local genFeaturesFlag(features) = toolchain: "stable", } }, + ] + check_extra_steps + [ # We don't use `--no-default-features` here as integration crates don't # work with it at all. { diff --git a/crates/deadpool-diesel/ci.config.yml b/crates/deadpool-diesel/ci.config.yml index 87b35da9..b9703e75 100644 --- a/crates/deadpool-diesel/ci.config.yml +++ b/crates/deadpool-diesel/ci.config.yml @@ -21,3 +21,15 @@ test: - tracing - rt_tokio_1 - sqlite + +check: + extra_steps: + - name: Install mysql (Windows) + if: runner.os == 'Windows' && matrix.feature == 'mysql' + shell: bash + run: | + echo "MYSQLCLIENT_LIB_DIR=C:\Program Files\MySQL\MySQL Server 8.0\lib" >> $GITHUB_ENV + echo "MYSQLCLIENT_VERSION=8.0.40" >> $GITHUB_ENV + echo "C:\Program Files\MySQL\MySQL Server 8.0\lib" >> $GITHUB_PATH + echo "C:\Program Files\MySQL\MySQL Server 8.0\bin" >> $GITHUB_PATH + dir "C:\Program Files\MySQL\MySQL Server 8.0\lib" \ No newline at end of file