mirror of
https://github.com/dolthub/dolt.git
synced 2025-12-21 11:59:41 -06:00
docker process
This commit is contained in:
4
.github/actions/mysql-client-tests/.dockerignore
vendored
Normal file
4
.github/actions/mysql-client-tests/.dockerignore
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
**/.git
|
||||
**/.github
|
||||
**/docker/
|
||||
**/images/
|
||||
60
.github/actions/mysql-client-tests/Dockerfile
vendored
Normal file
60
.github/actions/mysql-client-tests/Dockerfile
vendored
Normal file
@@ -0,0 +1,60 @@
|
||||
# syntax=docker/dockerfile:1
|
||||
FROM golang:1.25-alpine AS golang_cgo125
|
||||
ENV CGO_ENABLED=1
|
||||
ENV GO_LDFLAGS="-linkmode external -extldflags '-static'"
|
||||
RUN apk add --no-cache build-base
|
||||
|
||||
|
||||
FROM golang_cgo125 AS dolt_build
|
||||
COPY dolt/go/go.mod /build/dolt/go/
|
||||
COPY go-mysql-server*/ /build/go-mysql-server/
|
||||
COPY vitess*/ /build/vitess/
|
||||
WORKDIR /build/dolt/go/
|
||||
RUN go mod download
|
||||
RUN apk add --no-cache icu-dev icu-static
|
||||
COPY dolt/go/ /build/dolt/go/
|
||||
RUN go build -tags icu_static -o /build/bin/dolt ./cmd/dolt
|
||||
|
||||
|
||||
FROM golang_cgo125 AS go_clients_build
|
||||
COPY dolt/integration-tests/mysql-client-tests/go /build/go/
|
||||
WORKDIR /build/go/
|
||||
RUN go build -o /build/bin/go-mysql-client-test
|
||||
|
||||
COPY dolt/integration-tests/mysql-client-tests/go-mysql/ /build/go-mysql/
|
||||
WORKDIR /build/go-mysql/
|
||||
RUN go build -o /build/bin/go-sql-driver-test
|
||||
|
||||
|
||||
FROM rust:1.90-alpine3.22 AS rust_clients_build
|
||||
COPY dolt/integration-tests/mysql-client-tests/rust/ /build/rust/
|
||||
WORKDIR /build/rust/
|
||||
RUN apk add --no-cache musl-dev
|
||||
RUN cargo build --release --target-dir /build/bin/ # exe is in release/
|
||||
|
||||
|
||||
FROM mcr.microsoft.com/dotnet/sdk:9.0-bookworm-slim AS dotnet_clients_build
|
||||
COPY dolt/integration-tests/mysql-client-tests/dotnet/MySqlClient/ /build/dotnet/MySqlClient/
|
||||
WORKDIR /build/dotnet/MySqlClient/
|
||||
RUN dotnet publish -c Release -o /build/bin
|
||||
|
||||
COPY dolt/integration-tests/mysql-client-tests/dotnet/MySqlConnector/ /build/dotnet/MySqlConnector/
|
||||
WORKDIR /build/dotnet/MySqlConnector/
|
||||
RUN dotnet publish -c Release -o /build/bin
|
||||
|
||||
|
||||
FROM mcr.microsoft.com/devcontainers/cpp:1-bookworm AS c_clients_build
|
||||
COPY dolt/integration-tests/mysql-client-tests/c/vcpkg.json /build/c/vcpkg.json
|
||||
WORKDIR /build/c/
|
||||
RUN vcpkg install --triplet=x64-linux-release
|
||||
COPY dolt/integration-tests/mysql-client-tests/c/ /build/c/
|
||||
ENV CMAKE_TOOLCHAIN_FILE=/usr/local/vcpkg/scripts/buildsystems/vcpkg.cmake
|
||||
RUN cmake -B build -S .
|
||||
RUN cmake --build build
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
5
integration-tests/mysql-client-tests/c/CMakeLists.txt
Normal file
5
integration-tests/mysql-client-tests/c/CMakeLists.txt
Normal file
@@ -0,0 +1,5 @@
|
||||
cmake_minimum_required(VERSION 3.24)
|
||||
project(c_mysql_client_test C)
|
||||
find_package(unofficial-libmysql REQUIRED)
|
||||
add_executable("c-mysql-client-test" "mysql-connector-c-test.c")
|
||||
target_link_libraries("c-mysql-client-test" PRIVATE unofficial::libmysql::libmysql stdc++)
|
||||
@@ -1,7 +1,7 @@
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <memory.h>
|
||||
#include <mysql.h>
|
||||
#include <mysql/mysql.h>
|
||||
|
||||
#define QUERIES_SIZE 14
|
||||
|
||||
|
||||
4
integration-tests/mysql-client-tests/c/vcpkg.json
Normal file
4
integration-tests/mysql-client-tests/c/vcpkg.json
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"name": "mysql-client-test-c",
|
||||
"dependencies": [ "libmysql" ]
|
||||
}
|
||||
@@ -3,6 +3,9 @@
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<AssemblyName>dotnet-mysql-client-test</AssemblyName>
|
||||
<PublishSingleFile>true</PublishSingleFile>
|
||||
<SelfContained>true</SelfContained>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -3,6 +3,9 @@
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<AssemblyName>dotnet-mysql-connector-test</AssemblyName>
|
||||
<PublishSingleFile>true</PublishSingleFile>
|
||||
<SelfContained>true</SelfContained>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -8,5 +8,5 @@ edition = "2018"
|
||||
mysql = "*"
|
||||
|
||||
[[bin]]
|
||||
name = "mysql_connector_test"
|
||||
name = "rust-mysql-client-test"
|
||||
path = "src/mysql_connector_test.rs"
|
||||
|
||||
Reference in New Issue
Block a user