Skip to content

chore: set gcc version #101

chore: set gcc version

chore: set gcc version #101

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
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: 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: 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
env:
CXX: g++-11
CC: gcc-11
# Build driver
- name: Build driver
working-directory: ${{ github.workspace }}/build
shell: bash
run: cmake --build . --config $BUILD_TYPE
env:
CXX: g++-11
CC: gcc-11
- 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