Skip to content

Commit 1ec7ade

Browse files
committed
chore: test installer build with older MySQL version
1 parent 2773ed8 commit 1ec7ade

File tree

1 file changed

+4
-169
lines changed

1 file changed

+4
-169
lines changed

.github/workflows/release.yml

+4-169
Original file line numberDiff line numberDiff line change
@@ -2,155 +2,12 @@ name: Release Draft
22
# This workflow is triggered on creating tags
33
on:
44
push:
5-
tags:
6-
- "*.*.*"
7-
5+
branches:
6+
- test-installer
87
env:
98
BUILD_TYPE: Release
109

1110
jobs:
12-
build-mac:
13-
name: macOS
14-
runs-on: macos-13
15-
env:
16-
CMAKE_GENERATOR: Unix Makefiles
17-
ODBC_DM_INCLUDES: /usr/local/include
18-
steps:
19-
- name: Checkout source code
20-
uses: actions/checkout@v4
21-
22-
# Configure build environment/dependencies
23-
# Removing some /usr/local/bin files to avoid symlink issues wih brew update
24-
- name: Install MySQL client libs & other dependencies
25-
run: |
26-
rm '/usr/local/bin/2to3'
27-
rm '/usr/local/bin/2to3-3.11'
28-
rm '/usr/local/bin/idle3'
29-
rm '/usr/local/bin/idle3.11'
30-
rm '/usr/local/bin/pydoc3'
31-
rm '/usr/local/bin/pydoc3.11'
32-
rm '/usr/local/bin/python3'
33-
rm '/usr/local/bin/python3-config'
34-
rm '/usr/local/bin/python3.11'
35-
rm '/usr/local/bin/python3.11-config'
36-
37-
brew update
38-
brew unlink unixodbc
39-
brew install libiodbc mysql-client
40-
brew link --overwrite --force libiodbc
41-
42-
brew install [email protected]
43-
rm -f /usr/local/lib/libssl.1.1.dylib
44-
rm -f /usr/local/lib/libcrypto.1.1.dylib
45-
ln -s /usr/local/opt/[email protected]/lib/libssl.1.1.dylib /usr/local/lib/
46-
ln -s /usr/local/opt/[email protected]/lib/libcrypto.1.1.dylib /usr/local/lib/
47-
48-
curl -L https://dev.mysql.com/get/Downloads/MySQL-8.0/mysql-${{ vars.MYSQL_VERSION }}-macos13-x86_64.tar.gz -o mysql.tar.gz
49-
tar -xzvf mysql.tar.gz
50-
51-
- name: Build and install AWS SDK C++
52-
working-directory: ./scripts
53-
run: |
54-
./build_aws_sdk_unix.sh $BUILD_TYPE
55-
56-
- name: Create build environment
57-
run: cmake -E make_directory ${{ github.workspace }}/build
58-
59-
- name: Configure CMake
60-
run: cmake -S . -B build
61-
-G "$CMAKE_GENERATOR"
62-
-DCMAKE_BUILD_TYPE=$BUILD_TYPE
63-
-DMYSQLCLIENT_STATIC_LINKING=true
64-
-DODBC_INCLUDES=$ODBC_DM_INCLUDES
65-
-DCONNECTOR_PLATFORM=macos
66-
-DBUNDLE_DEPENDENCIES=true
67-
-DMYSQL_DIR=./mysql-${{ vars.MYSQL_VERSION }}-macos13-x86_64
68-
69-
- name: Build driver
70-
working-directory: ${{ github.workspace }}/build
71-
run: |
72-
export LIBRARY_PATH=$LIBRARY_PATH:$(brew --prefix zstd)/lib/
73-
cmake --build .
74-
75-
- name: Build installer
76-
working-directory: ${{ github.workspace }}/build
77-
if: success()
78-
run: cpack .
79-
80-
- name: Upload macOS installer as artifact
81-
if: success()
82-
uses: actions/upload-artifact@v3
83-
with:
84-
name: installers
85-
path: ${{ github.workspace }}/build/aws-mysql-odbc-*.pkg
86-
if-no-files-found: error
87-
88-
build-linux:
89-
name: Linux
90-
runs-on: ubuntu-20.04
91-
env:
92-
CMAKE_GENERATOR: Unix Makefiles
93-
CXX: g++-7
94-
steps:
95-
- name: Checkout source code
96-
uses: actions/checkout@v4
97-
98-
- name: Install gcc7
99-
run: sudo apt install g++-7
100-
101-
# Configure build environment/dependencies
102-
- name: Install build dependencies
103-
run: sudo apt-get update && sudo apt-get install
104-
build-essential
105-
libgtk-3-dev
106-
unixodbc
107-
unixodbc-dev
108-
libcurl4-openssl-dev libssl-dev uuid-dev zlib1g-dev # AWS SDK dependencies
109-
110-
- name: Install MySQL client libs and include files
111-
run: |
112-
curl -L https://dev.mysql.com/get/Downloads/MySQL-8.0/mysql-${{ vars.MYSQL_VERSION }}-linux-glibc2.12-x86_64.tar.xz -o mysql.tar.gz
113-
tar xf mysql.tar.gz
114-
115-
- name: Build and install AWS SDK C++
116-
working-directory: ./scripts
117-
run: |
118-
./build_aws_sdk_unix.sh $BUILD_TYPE
119-
120-
- name: Create build environment
121-
shell: bash
122-
run: cmake -E make_directory ${{ github.workspace }}/build
123-
124-
- name: Configure CMake
125-
shell: bash
126-
run: cmake -S . -B build
127-
-G "$CMAKE_GENERATOR"
128-
-DCMAKE_BUILD_TYPE=$BUILD_TYPE
129-
-DMYSQLCLIENT_STATIC_LINKING=true
130-
-DWITH_UNIXODBC=1
131-
-DCONNECTOR_PLATFORM=linux
132-
-DMYSQL_DIR=./mysql-${{ vars.MYSQL_VERSION }}-linux-glibc2.12-x86_64/
133-
-DBUNDLE_DEPENDENCIES=true
134-
135-
# Build driver
136-
- name: Build driver
137-
working-directory: ${{ github.workspace }}/build
138-
shell: bash
139-
run: cmake --build . --config $BUILD_TYPE
140-
141-
- name: Build installer
142-
working-directory: ${{ github.workspace }}/build
143-
if: success()
144-
run: cpack .
145-
146-
- name: Upload Linux installer as artifact
147-
if: success()
148-
uses: actions/upload-artifact@v3
149-
with:
150-
name: installers
151-
path: ${{ github.workspace }}/build/aws-mysql-odbc-*.tar.gz
152-
if-no-files-found: error
153-
15411
build-windows:
15512
name: Windows
15613
runs-on: windows-2019
@@ -163,7 +20,7 @@ jobs:
16320
# Configure build environment/dependencies
16421
- name: Install MySQL client libs
16522
run: |
166-
curl -L https://dev.mysql.com/get/Downloads/MySQL-8.0/mysql-${{ vars.MYSQL_VERSION }}-winx64.zip -o mysql.zip
23+
curl -L https://dev.mysql.com/get/Downloads/MySQL-8.0/mysql-8.0.0-winx64.zip -o mysql.zip
16724
unzip -d C:/ mysql.zip
16825
16926
- name: Add msbuild to PATH
@@ -179,7 +36,7 @@ jobs:
17936

18037
- name: Run build installer script
18138
run: |
182-
.\build_installer.ps1 x64 ${{ env.BUILD_TYPE}} "${{env.CMAKE_GENERATOR}}" C:/mysql-${{ vars.MYSQL_VERSION }}-winx64
39+
.\build_installer.ps1 x64 ${{ env.BUILD_TYPE}} "${{env.CMAKE_GENERATOR}}" C:/mysql-8.0.0-winx64
18340
18441
- name: Configure AWS credentials
18542
uses: aws-actions/[email protected]
@@ -207,25 +64,3 @@ jobs:
20764
name: installers
20865
path: ${{ github.workspace }}/wix/*.msi
20966
if-no-files-found: error
210-
211-
draft-release:
212-
name: Create Draft Release
213-
runs-on: ubuntu-20.04
214-
needs: [build-mac, build-linux, build-windows]
215-
steps:
216-
- name: Download all installers
217-
uses: actions/download-artifact@v3
218-
with:
219-
name: installers
220-
221-
# Get tag version for release
222-
- name: Set Version Env Variable
223-
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
224-
225-
- name: Upload to Draft Release
226-
uses: ncipollo/release-action@v1
227-
with:
228-
draft: true
229-
name: "AWS ODBC Driver for MySQL - v${{ env.RELEASE_VERSION }}"
230-
artifacts: "./*.pkg, ./*.tar.gz, ./*.msi"
231-
token: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)