Skip to content

Commit

Permalink
chore: update github actions to use 8.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
karenc-bq committed Jun 18, 2024
1 parent 258358d commit 9a2f665
Show file tree
Hide file tree
Showing 8 changed files with 108 additions and 109 deletions.
188 changes: 94 additions & 94 deletions .github/workflows/failover.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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.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
curl -L https://dev.mysql.com/get/Downloads/MySQL-8.4/mysql-${{ vars.MYSQL_VERSION }}-winx64.zip -o mysql.zip
curl -L https://dev.mysql.com/get/Downloads/MySQL-8.4/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,97 +120,97 @@ jobs:
name: windows-failover-results
path: ${{ github.workspace }}/build/unit_testing/Testing/Temporary/LastTest.log

# build-linux:
# name: Linux
# runs-on: ubuntu-latest
# env:
# CMAKE_GENERATOR: Unix Makefiles
# CXX: g++-11
# steps:
# - name: Checkout source code
# uses: actions/checkout@v4
#
# # Configure build environment/dependencies
# - name: Install build dependencies
# run: sudo apt-get update && sudo apt-get install
# g++-11
# build-essential
# libgtk-3-dev
# unixodbc
# unixodbc-dev
# libcurl4-openssl-dev libssl-dev uuid-dev zlib1g-dev # AWS SDK dependencies
#
# - name: Install MySQL client libs and include files
# run: |
# curl -L https://dev.mysql.com/get/Downloads/MySQL-8.3/mysql-${{ vars.MYSQL_VERSION }}-linux-glibc2.28-x86_64.tar.xz -o mysql.tar.gz
# tar xf mysql.tar.gz
#
# - 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
# -DCONNECTOR_PLATFORM=linux
# -DMYSQL_DIR=./mysql-${{ vars.MYSQL_VERSION }}-linux-glibc2.28-x86_64/
# -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@v2
# with:
# name: linux-failover-libraries
# path: ${{ github.workspace }}/build/lib/
# - name: Upload test artifacts
# if: always()
# uses: actions/upload-artifact@v2
# with:
# name: linux-failover-results
# path: ${{ github.workspace }}/build/unit_testing/Testing/Temporary/LastTest.log
build-linux:
name: Linux
runs-on: ubuntu-latest
env:
CMAKE_GENERATOR: Unix Makefiles
CXX: g++-11
steps:
- name: Checkout source code
uses: actions/checkout@v4

# Configure build environment/dependencies
- name: Install build dependencies
run: sudo apt-get update && sudo apt-get install
g++-11
build-essential
libgtk-3-dev
unixodbc
unixodbc-dev
libcurl4-openssl-dev libssl-dev uuid-dev zlib1g-dev # AWS SDK dependencies

- name: Install MySQL client libs and include files
run: |
curl -L https://dev.mysql.com/get/Downloads/MySQL-8.4/mysql-${{ vars.MYSQL_VERSION }}-linux-glibc2.28-x86_64.tar.xz -o mysql.tar.gz
tar xf mysql.tar.gz
- 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
-DCONNECTOR_PLATFORM=linux
-DMYSQL_DIR=./mysql-${{ vars.MYSQL_VERSION }}-linux-glibc2.28-x86_64/
-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@v2
with:
name: linux-failover-libraries
path: ${{ github.workspace }}/build/lib/
- name: Upload test artifacts
if: always()
uses: actions/upload-artifact@v2
with:
name: linux-failover-results
path: ${{ github.workspace }}/build/unit_testing/Testing/Temporary/LastTest.log

build-mac:
name: MacOS
Expand Down Expand Up @@ -250,7 +250,7 @@ jobs:
source /Users/runner/.bash_profile
curl -L https://dev.mysql.com/get/Downloads/MySQL-8.3/mysql-${{ vars.MYSQL_VERSION }}-macos14-x86_64.tar.gz -o mysql.tar.gz
curl -L https://dev.mysql.com/get/Downloads/MySQL-8.4/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
12 changes: 6 additions & 6 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
# Configure build environment/dependencies
- name: Install MySQL client libs
run: |
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.4/mysql-${{ vars.MYSQL_VERSION }}-winx64.zip -o mysql.zip
unzip -d C:/ mysql.zip
- name: Add msbuild to PATH
Expand Down Expand Up @@ -162,11 +162,11 @@ jobs:
brew update
brew unlink unixodbc
brew install libiodbc mysql@8.3 mysql-client@8.3
brew install libiodbc mysql@8.4 mysql-client@8.4
brew link --overwrite --force libiodbc
brew link --overwrite --force mysql@8.3
echo 'export PATH="/usr/local/opt/mysql@8.3/bin:$PATH"' >> /Users/runner/.bash_profile
echo 'export PATH="/usr/local/opt/mysql-client@8.3/bin:$PATH"' >> /Users/runner/.bash_profile
brew link --overwrite --force mysql@8.4
echo 'export PATH="/usr/local/opt/mysql@8.4/bin:$PATH"' >> /Users/runner/.bash_profile
echo 'export PATH="/usr/local/opt/mysql-client@8.4/bin:$PATH"' >> /Users/runner/.bash_profile
brew install openssl@3
rm -f /usr/local/lib/libssl.3.dylib
Expand All @@ -176,7 +176,7 @@ jobs:
source /Users/runner/.bash_profile
curl -L https://dev.mysql.com/get/Downloads/MySQL-8.3/mysql-${{ vars.MYSQL_VERSION }}-macos14-x86_64.tar.gz -o mysql.tar.gz
curl -L https://dev.mysql.com/get/Downloads/MySQL-8.4/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
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
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/
curl -L https://dev.mysql.com/get/Downloads/MySQL-8.3/mysql-${{ vars.MYSQL_VERSION }}-macos13-x86_64.tar.gz -o mysql.tar.gz
curl -L https://dev.mysql.com/get/Downloads/MySQL-8.4/mysql-${{ vars.MYSQL_VERSION }}-macos13-x86_64.tar.gz -o mysql.tar.gz
tar -xzvf mysql.tar.gz
- name: Build and install AWS SDK C++
Expand Down Expand Up @@ -107,7 +107,7 @@ jobs:
#
# - name: Install MySQL client libs and include files
# run: |
# curl -L https://dev.mysql.com/get/Downloads/MySQL-8.3/mysql-${{ vars.MYSQL_VERSION }}-linux-glibc2.28-x86_64.tar.xz -o mysql.tar.gz
# curl -L https://dev.mysql.com/get/Downloads/MySQL-8.4/mysql-${{ vars.MYSQL_VERSION }}-linux-glibc2.28-x86_64.tar.xz -o mysql.tar.gz
# tar xf mysql.tar.gz
#
# - name: Build and install AWS SDK C++
Expand Down Expand Up @@ -161,7 +161,7 @@ jobs:
# Configure build environment/dependencies
- name: Install MySQL client libs
run: |
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.4/mysql-${{ vars.MYSQL_VERSION }}-winx64.zip -o mysql.zip
unzip -d C:/ mysql.zip
- name: Add msbuild to PATH
Expand Down
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -539,6 +539,7 @@ INCLUDE(${CMAKE_SOURCE_DIR}/cmake/ssl_setup.cmake)
setup_ssl_libs()

INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR})
INCLUDE_DIRECTORIES(${ctpl_SOURCE_DIR})

add_subdirectory(extra/otel)
ADD_SUBDIRECTORY(util)
Expand Down
2 changes: 0 additions & 2 deletions driver/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,6 @@ WHILE(${DRIVER_INDEX} LESS ${DRIVERS_COUNT})
ADD_LIBRARY(${DRIVER_NAME_STATIC} STATIC ${DRIVER_SRCS} ${AWSSDK_LIB_DIR})
ADD_LIBRARY(${DRIVER_NAME} SHARED ${DRIVER_SRCS} ${AWSSDK_LIB_DIR})

ADD_LIBRARY(${DRIVER_NAME} MODULE ${DRIVER_SRCS})

add_version_info(${DRIVER_NAME}
"AWS ODBC ${DRIVER_TYPE} Driver For MySQL."
"Provides core driver functionality."
Expand Down
2 changes: 1 addition & 1 deletion setupgui/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ add_version_info(awsmysqlodbcS
"Provides driver configuration GUI."
)

target_link_libraries(myodbc8S ${ODBCLIB} ${ODBCINSTLIB} otel_api)
target_link_libraries(awsmysqlodbcS ${ODBCLIB} ${ODBCINSTLIB} otel_api)

# Note: When using GTK+, these libraries will be linked to -gtk modules.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,9 +181,9 @@ private void buildDriver(boolean enableIntegrationTests, boolean enablePerforman
"unixodbc", "unixodbc-dev", "curl", "libcurl4-openssl-dev", "libssl-dev", "uuid-dev", "zlib1g-dev", "-y");
System.out.println(result.getStdout());

System.out.println("curl -L https://dev.mysql.com/get/Downloads/MySQL-8.3/mysql-8.3.0-linux-glibc2.28-x86_64.tar.xz -o mysql.tar.gz");
System.out.println("curl -L https://dev.mysql.com/get/Downloads/MySQL-8.4/mysql-8.4.0-linux-glibc2.28-x86_64.tar.xz -o mysql.tar.gz");
result = testContainer.execInContainer(
"curl", "-L", "https://dev.mysql.com/get/Downloads/MySQL-8.3/mysql-8.3.0-linux-glibc2.28-x86_64.tar.xz", "-o", "mysql.tar.gz");
"curl", "-L", "https://dev.mysql.com/get/Downloads/MySQL-8.4/mysql-8.4.0-linux-glibc2.28-x86_64.tar.xz", "-o", "mysql.tar.gz");
System.out.println(result.getStdout());

System.out.println("tar xf mysql.tar.gz");
Expand Down
2 changes: 1 addition & 1 deletion testframework/src/test/java/utility/ContainerHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ protected boolean isRunning(InspectContainerResponse containerInfo) {
}

public static GenericContainer<?> createMysqlContainer(Network network) {
return new GenericContainer<>("mysql:8.3.0")
return new GenericContainer<>("mysql:8.4.0")
.withNetwork(network)
.withNetworkAliases("mysql-instance")
.withEnv("MYSQL_ROOT_PASSWORD", "root")
Expand Down

0 comments on commit 9a2f665

Please sign in to comment.