Skip to content

Commit

Permalink
fix: rebase failures caused by internal code changes
Browse files Browse the repository at this point in the history
  • Loading branch information
karenc-bq committed Jun 12, 2024
1 parent 7aac933 commit 019c2ab
Show file tree
Hide file tree
Showing 48 changed files with 729 additions and 819 deletions.
23 changes: 1 addition & 22 deletions .github/workflows/dockerized.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,7 @@
name: Community Integration Tests

on:
push:
branches:
- main
pull_request:
branches:
- '*'
paths-ignore:
- '**/*.md'
- '**/*.jpg'
- '**/README.txt'
- '**/LICENSE.txt'
- 'docs/**'
- 'ISSUE_TEMPLATE/**'
- '**/remove-old-artifacts.yml'
workflow_dispatch:

env:
BUILD_TYPE: Release
Expand All @@ -33,14 +20,6 @@ jobs:
- name: Install build dependencies
run: sudo apt-get update && sudo apt-get install libcurl4 && sudo apt-get install libcurl4-openssl-dev

- name: Cache AWS SDK libraries
id: cache-dynamic-aws-sdk
uses: actions/cache@v4
with:
path: |
aws_sdk
key: ${{ runner.os }}-aws-sdk-dynamic-lib

- name: Build and install AWS SDK C++
working-directory: ./scripts
if: steps.cache-dynamic-aws-sdk.outputs.cache-hit != 'true'
Expand Down
119 changes: 15 additions & 104 deletions .github/workflows/failover.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ env:
jobs:
build-windows:
name: Windows
runs-on: windows-2019
runs-on: windows-latest
env:
CMAKE_GENERATOR: Visual Studio 16 2019
CMAKE_GENERATOR: Visual Studio 17 2022
MYSQL_DIR: C:/mysql-${{ vars.MYSQL_VERSION }}-winx64
steps:
- name: Checkout source code
Expand All @@ -35,8 +35,8 @@ jobs:
# Configure build environment/dependencies
- name: Install MySQL client libs and include files
run: |
curl -L https://dev.mysql.com/get/Downloads/MySQL-8.0/mysql-${{ vars.MYSQL_VERSION }}-winx64.zip -o mysql.zip
curl -L https://dev.mysql.com/get/Downloads/MySQL-8.0/mysql-${{ vars.MYSQL_VERSION }}-winx64-debug-test.zip -o mysql-debug.zip
curl -L https://dev.mysql.com/get/Downloads/MySQL-8.3/mysql-${{ vars.MYSQL_VERSION }}-winx64.zip -o mysql.zip
curl -L https://dev.mysql.com/get/Downloads/MySQL-8.3/mysql-${{ vars.MYSQL_VERSION }}-winx64-debug-test.zip -o mysql-debug.zip
unzip -d C:/ mysql.zip
mkdir C:/mysql-${{ vars.MYSQL_VERSION }}-winx64-debug
unzip -d C:/mysql-${{ vars.MYSQL_VERSION }}-winx64-debug mysql-debug.zip
Expand Down Expand Up @@ -120,95 +120,6 @@ jobs:
name: windows-failover-results
path: ${{ github.workspace }}/build/unit_testing/Testing/Temporary/LastTest.log

build-linux:
name: Linux
runs-on: ubuntu-20.04
env:
CMAKE_GENERATOR: Unix Makefiles
CXX: g++-7
steps:
- name: Checkout source code
uses: actions/checkout@v4

- name: Install gcc7
run: sudo apt install g++-7

# Configure build environment/dependencies
- name: Install MySQL client libs & other dependencies
run: sudo apt-get update && sudo apt-get install
build-essential
libgtk-3-dev
libmysqlclient-dev
unixodbc
unixodbc-dev
libcurl4-openssl-dev libssl-dev uuid-dev zlib1g-dev # AWS SDK dependencies

- name: Cache AWS SDK libraries
id: cache-dynamic-aws-sdk
uses: actions/cache@v4
with:
path: |
aws_sdk
key: ${{ runner.os }}-aws-sdk-dynamic-lib

- name: Build and install AWS SDK C++
working-directory: ./scripts
if: steps.cache-dynamic-aws-sdk.outputs.cache-hit != 'true'
run: |
./build_aws_sdk_unix.sh $LINUX_BUILD_TYPE
- name: Create build environment
shell: bash
run: cmake -E make_directory ${{ github.workspace }}/build

- name: Configure CMake
shell: bash
run: cmake -S . -B build
-G "$CMAKE_GENERATOR"
-DCMAKE_BUILD_TYPE=$LINUX_BUILD_TYPE
-DMYSQLCLIENT_STATIC_LINKING=true
-DWITH_UNIXODBC=1
-DENABLE_UNIT_TESTS=TRUE
-DENABLE_INTEGRATION_TESTS=FALSE

- name: copy AWS SDK libraries to driver library
run: |
cp ./aws_sdk/install/lib/*.so ./build/lib/
# Build driver
- name: Build driver
working-directory: ${{ github.workspace }}/build
shell: bash
run: make -j4


# Test driver
- name: Run failover tests on Linux
if: success()
working-directory: ${{ github.workspace }}/build/unit_testing
shell: bash
run: ctest --output-on-failure

# Upload artifacts
- name: Upload build artifacts - Binaries
if: always()
uses: actions/upload-artifact@v4
with:
name: linux-failover-binaries
path: ${{ github.workspace }}/build/bin/
- name: Upload build artifacts - Libraries
if: always()
uses: actions/upload-artifact@v4
with:
name: linux-failover-libraries
path: ${{ github.workspace }}/build/lib/
- name: Upload test artifacts
if: always()
uses: actions/upload-artifact@v4
with:
name: linux-failover-results
path: ${{ github.workspace }}/build/unit_testing/Testing/Temporary/LastTest.log

build-mac:
name: MacOS
runs-on: macos-13
Expand Down Expand Up @@ -239,15 +150,15 @@ jobs:
brew install libiodbc mysql-client
brew link --overwrite --force libiodbc
brew install openssl@1.1
rm -f /usr/local/lib/libssl.1.1.dylib
rm -f /usr/local/lib/libcrypto.1.1.dylib
ln -s /usr/local/opt/openssl@1.1/lib/libssl.1.1.dylib /usr/local/lib/
ln -s /usr/local/opt/openssl@1.1/lib/libcrypto.1.1.dylib /usr/local/lib/
brew install openssl@3
rm -f /usr/local/lib/libssl.3.dylib
rm -f /usr/local/lib/libcrypto.3.dylib
ln -s /usr/local/opt/openssl@3/lib/libssl.3.dylib /usr/local/lib/
ln -s /usr/local/opt/openssl@3/lib/libcrypto.3.dylib /usr/local/lib/
source /Users/runner/.bash_profile
curl -L https://dev.mysql.com/get/Downloads/MySQL-8.0/mysql-${{ vars.MYSQL_VERSION }}-macos13-x86_64.tar.gz -o mysql.tar.gz
curl -L https://dev.mysql.com/get/Downloads/MySQL-8.3/mysql-${{ vars.MYSQL_VERSION }}-macos14-x86_64.tar.gz -o mysql.tar.gz
tar -xzvf mysql.tar.gz
- name: Cache AWS SDK libraries
Expand Down Expand Up @@ -277,7 +188,7 @@ jobs:
-DODBC_INCLUDES=$ODBC_DM_INCLUDES
-DENABLE_UNIT_TESTS=TRUE
-DENABLE_INTEGRATION_TESTS=FALSE
-DMYSQL_DIR=./mysql-${{ vars.MYSQL_VERSION }}-macos13-x86_64
-DMYSQL_DIR=./mysql-${{ vars.MYSQL_VERSION }}-macos14-x86_64

# Build driver
- name: Build driver
Expand All @@ -286,10 +197,10 @@ jobs:
run: |
export LIBRARY_PATH=$LIBRARY_PATH:$(brew --prefix zstd)/lib/
cmake --build .
ln -s /usr/local/opt/openssl@1.1/lib/libssl.1.1.dylib /Users/runner/work/aws-mysql-odbc/aws-mysql-odbc/build/unit_testing/
ln -s /usr/local/opt/openssl@1.1/lib/libssl.1.1.dylib /Users/runner/work/aws-mysql-odbc/aws-mysql-odbc/build/unit_testing/bin/
ln -s /usr/local/opt/openssl@1.1/lib/libcrypto.1.1.dylib /Users/runner/work/aws-mysql-odbc/aws-mysql-odbc/build/unit_testing/
ln -s /usr/local/opt/openssl@1.1/lib/libcrypto.1.1.dylib /Users/runner/work/aws-mysql-odbc/aws-mysql-odbc/build/unit_testing/bin/
ln -s /usr/local/opt/openssl@3/lib/libssl.3.dylib /Users/runner/work/aws-mysql-odbc/aws-mysql-odbc/build/unit_testing/
ln -s /usr/local/opt/openssl@3/lib/libssl.3.dylib /Users/runner/work/aws-mysql-odbc/aws-mysql-odbc/build/unit_testing/bin/
ln -s /usr/local/opt/openssl@3/lib/libcrypto.3.dylib /Users/runner/work/aws-mysql-odbc/aws-mysql-odbc/build/unit_testing/
ln -s /usr/local/opt/openssl@3/lib/libcrypto.3.dylib /Users/runner/work/aws-mysql-odbc/aws-mysql-odbc/build/unit_testing/bin/
# Test driver
- name: Run driver tests
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@ on:
push:
branches:
- main
pull_request:
branches:
- '*'

env:
BUILD_TYPE: Release
Expand Down
Loading

0 comments on commit 019c2ab

Please sign in to comment.