chore: debug #104
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build installer | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- build/older-glibc-version | |
env: | |
BUILD_TYPE: Release | |
DRIVER_VERSION: 1.1.0 | |
jobs: | |
build-linux: | |
name: Linux | |
runs-on: ubuntu-20.04 | |
env: | |
CMAKE_GENERATOR: Unix Makefiles | |
CXX: g++-11 | |
CC: gcc-11 | |
steps: | |
- name: Checkout source code | |
uses: actions/checkout@v4 | |
# Configure build environment/dependencies | |
- name: Install build dependencies | |
run: | | |
sudo apt-get update | |
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test | |
sudo apt-get install gcc-11 g++-11 | |
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-11 11 --slave /usr/bin/g++ g++ /usr/bin/g++-11 | |
sudo apt-get install build-essential libgtk-3-dev unixodbc unixodbc-dev libcurl4-openssl-dev libssl-dev uuid-dev zlib1g-dev | |
- 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: Build and install AWS SDK C++ | |
working-directory: ./scripts | |
run: | | |
./build_aws_sdk_unix.sh $BUILD_TYPE | |
- name: Create build environment | |
shell: bash | |
run: cmake -E make_directory ${{ github.workspace }}/build | |
- name: Setup tmate session | |
uses: mxschmitt/action-tmate@v3 | |
- name: Configure CMake | |
shell: bash | |
run: cmake -S . -B build | |
-G "$CMAKE_GENERATOR" | |
-DCMAKE_BUILD_TYPE=$BUILD_TYPE | |
-DMYSQLCLIENT_STATIC_LINKING=true | |
-DWITH_UNIXODBC=1 | |
-DCONNECTOR_PLATFORM=linux | |
-DMYSQL_DIR=./mysql-${{ vars.MYSQL_VERSION }}-linux-glibc2.28-x86_64/ | |
-DBUNDLE_DEPENDENCIES=true | |
# Build driver | |
- name: Build driver | |
working-directory: ${{ github.workspace }}/build | |
shell: bash | |
run: cmake --build . --config $BUILD_TYPE | |
- name: Build installer | |
working-directory: ${{ github.workspace }}/build | |
if: success() | |
run: cpack . | |
- name: Upload Linux installer as artifact | |
if: success() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: installers-linux | |
path: ${{ github.workspace }}/build/aws-mysql-odbc-*.tar.gz | |
if-no-files-found: error |