Skip to content

Commit a7ff6d6

Browse files
committed
Update ODBC dependency configuration and CI workflow to use all features
1 parent 5fb17c6 commit a7ff6d6

File tree

3 files changed

+7
-14
lines changed

3 files changed

+7
-14
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,6 @@ jobs:
2727
- uses: actions/checkout@v4
2828
- run: npm ci
2929
- run: npm test
30-
- name: Install ODBC dependencies
31-
run: |
32-
sudo apt-get update
33-
sudo apt-get install -y unixodbc-dev freetds-dev
3430
- name: Set up cargo cache
3531
uses: Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6
3632
- run: cargo fmt --all -- --check
@@ -74,7 +70,7 @@ jobs:
7470
run: docker compose logs ${{ matrix.container }}
7571
- name: Run tests against ${{ matrix.database }}
7672
timeout-minutes: 5
77-
run: cargo test
73+
run: cargo test --all-features
7874
env:
7975
DATABASE_URL: ${{ matrix.db_url }}
8076
RUST_BACKTRACE: 1

.github/workflows/release.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -83,18 +83,14 @@ jobs:
8383
container: quay.io/pypa/manylinux_2_28_x86_64
8484
steps:
8585
- uses: actions/checkout@v4
86-
- name: Install ODBC dependencies
87-
run: |
88-
yum update -y
89-
yum install -y unixODBC-devel freetds-devel
9086
- name: Install Rust toolchain
9187
uses: dtolnay/rust-toolchain@stable
9288
with:
9389
targets: x86_64-unknown-linux-gnu
9490
- name: Set up cargo cache
9591
uses: Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6
9692
- name: Build
97-
run: cargo build --profile superoptimized --locked --target x86_64-unknown-linux-gnu
93+
run: cargo build --profile superoptimized --locked --target x86_64-unknown-linux-gnu --all-features
9894
- uses: actions/upload-artifact@v4
9995
with:
10096
name: sqlpage ubuntu-latest

Cargo.toml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,12 +75,13 @@ clap = { version = "4.5.17", features = ["derive"] }
7575
tokio-util = "0.7.12"
7676
openidconnect = { version = "4.0.0", default-features = false }
7777
encoding_rs = "0.8.35"
78+
odbc-sys = { version = "0.27", features = [], optional = false }
7879

79-
[target.'cfg(any(target_os = "linux", target_os = "macos"))'.dependencies]
80-
odbc-sys = { version = "0.27", features = ["static"] }
8180

82-
[target.'cfg(any(target_os = "windows"))'.dependencies]
83-
odbc-sys = { version = "0.27", features = [] }
81+
[features]
82+
default = []
83+
odbc-static = ["odbc-sys/static"]
84+
8485

8586
[patch.crates-io]
8687
odbc-sys = { git = "https://github.com/sqlpage/odbc-sys", branch = "main" } # see https://github.com/pacman82/odbc-sys/pull/60

0 commit comments

Comments
 (0)