Skip to content

Commit

Permalink
wip3 rtabby docker workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Clem-Fern committed Mar 10, 2024
1 parent 6cd87fe commit 01f6618
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ edition = "2021"
default = ["mysql", "all-login"]
dotenv = ["dep:dotenvy"]
mysql = ["diesel/mysql"]
mysqlclient-bundle = ["mysql"]
mysql-bundle = ["mysql"]
sqlite = ["diesel/sqlite"]
sqlite-bundle = ["sqlite", "libsqlite3-sys/bundled"]
third-party-login = ["dep:actix-session", "dep:tera", "dep:reqwest", "dep:actix-files"]
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# syntax=docker/dockerfile:1
FROM rust:1.76-alpine AS builder
ARG FEATURE_FLAGS="-F|mysqlclient-bundle|-F|all-login"
ARG FEATURE_FLAGS="-F|mysql-bundle|-F|all-login"
WORKDIR /build
COPY . .

RUN apk add --no-cache build-base

RUN if [[ "$FEATURE_FLAGS" == *"mysqlclient-bundle"* ]]; then \
RUN if [[ "$FEATURE_FLAGS" == *"mysql-bundle"* ]]; then \
apk add --no-cache binutils mariadb-dev musl-dev bash cmake curl && \
bash scripts/mariadb-static-build.sh && \
bash scripts/zlib-static-build.sh && \
Expand Down
4 changes: 2 additions & 2 deletions build.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
fn main() {
#[cfg(feature = "mysqlclient-bundle")]
#[cfg(feature = "mysql-bundle")]
mysqlclient_static();
}

#[cfg(feature = "mysqlclient-bundle")]
#[cfg(feature = "mysql-bundle")]
fn mysqlclient_static() {
println!("cargo:rustc-link-search=native=lib");
println!("cargo:rustc-link-lib=static=mysqlclient");
Expand Down

0 comments on commit 01f6618

Please sign in to comment.