Skip to content

Commit

Permalink
Merge branch 'master' into SNOW-715551
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-ext-simba-jy authored Oct 15, 2024
2 parents d7d9967 + 1db33a2 commit 5b84cd2
Show file tree
Hide file tree
Showing 20 changed files with 66 additions and 24 deletions.
14 changes: 8 additions & 6 deletions ci/_init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ export DRIVER_NAME=libsnowflakeclient

# Build images
BUILD_IMAGE_VERSION_X64=2
BUILD_IMAGE_VERSION_AARCH64=3

BUILD_IMAGE_VERSION_AARCH64=1
BUILD_IMAGE_VERSION_UBUNTU_AARCH64=3
# Test Images
TEST_IMAGE_VERSION_X64=1
TEST_IMAGE_VERSION_AARCH64=3
TEST_IMAGE_VERSION_AARCH64=1

PLATFORM_ARCH=$(uname -p)
if [[ -z "$TARGET_PLATFORM" ]]; then
Expand All @@ -31,13 +31,15 @@ if [[ -z "$TARGET_PLATFORM" ]]; then
fi
fi
if [[ "$TARGET_PLATFORM" == "arm64" ]]; then
export DOCKER_MARK="ubuntu20-aarch64"
export DOCKER_MARK="rhel8-aarch64"
export UBUNTU_IMAGE="ubuntu20-aarch64"
declare -A BUILD_IMAGE_NAMES=(
[$DRIVER_NAME-$DOCKER_MARK]=$DOCKER_REGISTRY_NAME/client-$DRIVER_NAME-ubuntu20-aarch64:$BUILD_IMAGE_VERSION_AARCH64
[$DRIVER_NAME-$DOCKER_MARK]=$DOCKER_REGISTRY_NAME/client-$DRIVER_NAME-$DOCKER_MARK:$BUILD_IMAGE_VERSION_AARCH64
)

declare -A TEST_IMAGE_NAMES=(
[$DRIVER_NAME-$DOCKER_MARK]=$DOCKER_REGISTRY_NAME/client-$DRIVER_NAME-ubuntu20-aarch64:$TEST_IMAGE_VERSION_AARCH64
[$DRIVER_NAME-$DOCKER_MARK]=$DOCKER_REGISTRY_NAME/client-$DRIVER_NAME-$DOCKER_MARK:$TEST_IMAGE_VERSION_AARCH64
[$DRIVER_NAME-$UBUNTU_IMAGE]=$DOCKER_REGISTRY_NAME/client-$DRIVER_NAME-$UBUNTU_IMAGE:$BUILD_IMAGE_VERSION_UBUNTU_AARCH64
)
else
export DOCKER_MARK="centos7-default"
Expand Down
39 changes: 39 additions & 0 deletions ci/image/Dockerfile.libsnowflakeclient-rhel8-aarch64-build
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
FROM redhat/ubi8

RUN dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
RUN dnf upgrade -y
RUN yum -y update
RUN yum install -y yum-utils

# dependencies & tools
RUN yum install -y wget gettext zip bzip2 cmake python39 git gcc-c++ libstdc++-static unixODBC unixODBC-devel vim jq re2 re2-devel automake autoconf libtool perl-IPC-Cmd perl-Digest-SHA
RUN ln -s /usr/bin/python3.9 /usr/bin/python
RUN python -m pip install --upgrade pip
RUN pip install awscli

# valgrind
RUN cd /tmp && wget https://sourceware.org/pub/valgrind/valgrind-3.23.0.tar.bz2 && tar xvf valgrind-3.23.0.tar.bz2 && cd valgrind-3.23.0 && ./configure && make && make install

#cppunit
RUN cd /tmp && git clone git://anongit.freedesktop.org/git/libreoffice/cppunit &&\
cd cppunit &&\
git checkout tags/cppunit-1.15.1 -b v1.15.1 &&\
./autogen.sh &&\
./configure CXXFLAGS="-std=c++11" &&\
make && make install &&\
cp /usr/local/lib/libcppunit* /usr/lib64

# Java
RUN yum install -y java-1.8.0-openjdk

# gosu
RUN curl -o /usr/local/bin/gosu -SL "https://github.com/tianon/gosu/releases/download/1.11/gosu-arm64"
RUN chmod +x /usr/local/bin/gosu
COPY scripts/entrypoint.sh /usr/local/bin/entrypoint.sh
RUN chmod +x /usr/local/bin/entrypoint.sh

# workspace
RUN mkdir -p /home/user
RUN chmod 777 /home/user
WORKDIR /home/user

1 change: 1 addition & 0 deletions ci/image/Dockerfile.libsnowflakeclient-rhel8-aarch64-test
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
FROM nexus.int.snowflakecomputing.com:8086/docker/client-libsnowflakeclient-rhel8-aarch64:1
2 changes: 1 addition & 1 deletion scripts/build_arrow.bat
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
::
@echo off
set arrow_src_version=15.0.0
set arrow_build_version=4
set arrow_build_version=5
:: The full version number for dependency packaging/uploading/downloading
if "%ARROW_FROM_SOURCE%"=="1" (
set arrow_version=%arrow_src_version%.%arrow_build_version%
Expand Down
2 changes: 1 addition & 1 deletion scripts/build_arrow.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ function usage() {
set -o pipefail

export ARROW_SRC_VERSION=15.0.0
export ARROW_BUILD_VERSION=4
export ARROW_BUILD_VERSION=5
#The full version number for dependency packaging/uploading/downloading
export ARROW_VERSION=${ARROW_SRC_VERSION}.${ARROW_BUILD_VERSION}

Expand Down
2 changes: 1 addition & 1 deletion scripts/build_awssdk.bat
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
::
@echo off
set aws_src_version=1.11.283
set aws_build_version=7
set aws_build_version=8
set aws_version=%aws_src_version%.%aws_build_version%
call %*
goto :EOF
Expand Down
2 changes: 1 addition & 1 deletion scripts/build_awssdk.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ function usage() {
set -o pipefail

AWS_SRC_VERSION=1.11.283
AWS_BUILD_VERSION=7
AWS_BUILD_VERSION=8
AWS_DIR=aws-sdk-cpp-$AWS_SRC_VERSION
AWS_VERSION=$AWS_SRC_VERSION.$AWS_BUILD_VERSION

Expand Down
2 changes: 1 addition & 1 deletion scripts/build_azuresdk.bat
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
::
@echo off
set azure_src_version=0.1.20
set azure_build_version=11
set azure_build_version=12
set azure_version=%azure_src_version%.%azure_build_version%
call %*
goto :EOF
Expand Down
2 changes: 1 addition & 1 deletion scripts/build_azuresdk.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ function usage() {
set -o pipefail

AZURE_SRC_VERSION=0.1.20
AZURE_BUILD_VERSION=11
AZURE_BUILD_VERSION=12
AZURE_DIR=azure-storage-cpplite-$AZURE_SRC_VERSION
AZURE_VERSION=$AZURE_SRC_VERSION.$AZURE_BUILD_VERSION

Expand Down
2 changes: 1 addition & 1 deletion scripts/build_cmocka.bat
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
::
@echo off
set cmocka_src_version=1.1.1
set cmocka_build_version=4
set cmocka_build_version=5
set cmocka_version=%cmocka_src_version%.%cmocka_build_version%
call %*
goto :EOF
Expand Down
2 changes: 1 addition & 1 deletion scripts/build_cmocka.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ function usage() {
set -o pipefail

CMOCKA_SRC_VERSION=1.1.1
CMOCKA_BUILD_VERSION=4
CMOCKA_BUILD_VERSION=5
CMOCKA_VERSION=$CMOCKA_SRC_VERSION.$CMOCKA_BUILD_VERSION

DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
Expand Down
2 changes: 1 addition & 1 deletion scripts/build_curl.bat
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

@echo off
set CURL_SRC_VERSION=8.7.1
set CURL_BUILD_VERSION=6
set CURL_BUILD_VERSION=7
set CURL_VERSION=%CURL_SRC_VERSION%.%CURL_BUILD_VERSION%
call %*
goto :EOF
Expand Down
4 changes: 2 additions & 2 deletions scripts/build_curl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ function usage() {
set -o pipefail

CURL_SRC_VERSION=8.7.1
CURL_BUILD_VERSION=6
CURL_BUILD_VERSION=7
CURL_VERSION=${CURL_SRC_VERSION}.${CURL_BUILD_VERSION}

DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
Expand Down Expand Up @@ -70,7 +70,7 @@ cd $LIBCURL_SOURCE_DIR
echo "Building Curl with OpenSSL"
if [[ "$PLATFORM" == "linux" ]]; then
# Linux 64 bit
export CFLAGS=-pthread # required to build with gcc52 or OpenSSL check will fail
export CFLAGS="-pthread -fPIC" # required to build with gcc52 or OpenSSL check will fail
export CPPFLAGS="-I$OOB_DEPENDENCY_DIR/include -I$UUID_DEPENDENCY_DIR/include"
export LDFLAGS="-L$OOB_DEPENDENCY_DIR/lib -L$UUID_DEPENDENCY_DIR/lib"
PKG_CONFIG="pkg-config -static" LIBS="-ltelemetry -luuid -ldl" /bin/sh ./configure ${curl_configure_opts[@]}
Expand Down
2 changes: 1 addition & 1 deletion scripts/build_oob.bat
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
::
@echo off
set OOB_SRC_VERSION=1.0.4
set OOB_BUILD_VERSION=12
set OOB_BUILD_VERSION=13
set OOB_VERSION=%OOB_SRC_VERSION%.%OOB_BUILD_VERSION%
call %*
goto :EOF
Expand Down
2 changes: 1 addition & 1 deletion scripts/build_oob.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ function usage() {
set -o pipefail

OOB_SRC_VERSION=1.0.4
OOB_BUILD_VERSION=12
OOB_BUILD_VERSION=13
OOB_VERSION=$OOB_SRC_VERSION.$OOB_BUILD_VERSION

DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
Expand Down
2 changes: 1 addition & 1 deletion scripts/build_openssl.bat
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

@echo off
set OPENSSL_SRC_VERSION=3.0.13
set OPENSSL_BUILD_VERSION=4
set OPENSSL_BUILD_VERSION=5
set OPENSSL_VERSION=%OPENSSL_SRC_VERSION%.%OPENSSL_BUILD_VERSION%
call %*
goto :EOF
Expand Down
2 changes: 1 addition & 1 deletion scripts/build_openssl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ function usage() {
set -o pipefail

OPENSSL_SRC_VERSION=3.0.13
OPENSSL_BUILD_VERSION=4
OPENSSL_BUILD_VERSION=5
OPENSSL_VERSION=$OPENSSL_SRC_VERSION.$OPENSSL_BUILD_VERSION

DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
Expand Down
2 changes: 1 addition & 1 deletion scripts/build_uuid.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ function usage() {

set -o pipefail
UUID_SRC_VERSION=2.39.0
UUID_BUILD_VERSION=4
UUID_BUILD_VERSION=5
UUID_VERSION=$UUID_SRC_VERSION.$UUID_BUILD_VERSION

DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
Expand Down
2 changes: 1 addition & 1 deletion scripts/build_zlib.bat
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
::
@echo off
set ZLIB_SRC_VERSION=1.3.1
set ZLIB_BUILD_VERSION=5
set ZLIB_BUILD_VERSION=6
set ZLIB_VERSION=%ZLIB_SRC_VERSION%.%ZLIB_BUILD_VERSION%
call %*
goto :EOF
Expand Down
2 changes: 1 addition & 1 deletion scripts/build_zlib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ function usage() {
set -o pipefail

ZLIB_SRC_VERSION=1.3.1
ZLIB_BUILD_VERSION=5
ZLIB_BUILD_VERSION=6
ZLIB_VERSION=$ZLIB_SRC_VERSION.$ZLIB_BUILD_VERSION

DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
Expand Down

0 comments on commit 5b84cd2

Please sign in to comment.