@@ -2,155 +2,12 @@ name: Release Draft
2
2
# This workflow is triggered on creating tags
3
3
on :
4
4
push :
5
- tags :
6
- - " *.*.*"
7
-
5
+ branches :
6
+ - test-installer
8
7
env :
9
8
BUILD_TYPE : Release
10
9
11
10
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
-
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
-
154
11
build-windows :
155
12
name : Windows
156
13
runs-on : windows-2019
163
20
# Configure build environment/dependencies
164
21
- name : Install MySQL client libs
165
22
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
167
24
unzip -d C:/ mysql.zip
168
25
169
26
- name : Add msbuild to PATH
179
36
180
37
- name : Run build installer script
181
38
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
183
40
184
41
- name : Configure AWS credentials
185
42
uses :
aws-actions/[email protected]
@@ -207,25 +64,3 @@ jobs:
207
64
name : installers
208
65
path : ${{ github.workspace }}/wix/*.msi
209
66
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