Skip to content

Upgrade MySql client and remove allowed failures on CI builds #2501

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Oct 22, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 8 additions & 11 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
dist: trusty
os: linux
dist: xenial
language: csharp
mono: none
dotnet: 2.1.300
sudo: required
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This option is obsolete

services:
- mysql
- postgresql
Expand All @@ -13,25 +13,22 @@ env:
- DB=Firebird
- DB=MySQL CONNECTION_STRING="Server=127.0.0.1;Uid=root;Database=nhibernate;Old Guids=True;"
- DB=SQLite
matrix:
allow_failures:
- env: DB=MySQL CONNECTION_STRING="Server=127.0.0.1;Uid=root;Database=nhibernate;Old Guids=True;"
before_install:
- curl https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -
- curl https://packages.microsoft.com/config/ubuntu/14.04/prod.list | sudo tee /etc/apt/sources.list.d/microsoft.list
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not needed

- sudo apt-get update -qq
- sudo apt-get install -y powershell
- |-
if [[ "$DB" == "MySQL" ]]
then
echo -e '[server]\nlower_case_table_names=1' | sudo tee -a /etc/mysql/my.cnf
echo -e '[server]\nlower_case_table_names=1\n[mysqld]\ncharacter-set-server=utf8\ncollation-server=utf8_general_ci' | sudo tee -a /etc/mysql/my.cnf
sudo service mysql restart
fi
- |-
if [[ "$DB" == "Firebird" ]]
then
sudo apt-get install -y libicu-dev libtommath-dev curl
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

libicu-dev and curl are already installed so no point to install them again.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did you change it back to libtommath-dev? I suspect with libtommath0 hacky stuff below with ln wouldn't be required for bionic and above. Or am I wrong?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The libtommath-dev references either libtommath0 or libtommath1 depending on the distributive. 16.04 is the last version which will include libtommath0. The 18.04 and above uses libtommath1.

Firebird 3.x is built against libtommath0 and they refuse to rebuild it to libtommath1, so the ln will be required in 18.04 or above when using the official distribution.

However, it seems that 18.04 and above have Firebird 3.0 in the apt.

curl -L -O https://github.com/FirebirdSQL/firebird/releases/download/R3_0_5/Firebird-3.0.5.33220-0.amd64.tar.gz
sudo apt-get install -y libtommath-dev
# This would be required on bionic and above
# sudo ln -s /usr/lib/x86_64-linux-gnu/libtommath.so.1 /usr/lib/x86_64-linux-gnu/libtommath.so.0
wget -q https://github.com/FirebirdSQL/firebird/releases/download/R3_0_5/Firebird-3.0.5.33220-0.amd64.tar.gz
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

curl -L -O URL and wget URL do exactly same. I decided to leave wget as it is a standard GNU utility.

tar xzvf Firebird-3.0.5.33220-0.amd64.tar.gz
pushd Firebird-3.0.5.33220-0.amd64
sudo ./install.sh -silent
Expand All @@ -41,7 +38,7 @@ before_install:
echo -e "nhibernate = /tmp/firebird/nhibernate.fdb" | sudo tee -a /opt/firebird/databases.conf
echo -e "AuthServer = Srp\nAuthClient = Srp\nUserManager = Srp\nWireCrypt = Enabled" | sudo tee -a /opt/firebird/firebird.conf
sudo /opt/firebird/bin/gsec -modify SYSDBA -pw masterkey -admin yes
sudo service firebird restart
sudo systemctl restart firebird-superserver
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The reason it was failing is because the service name on 3.0.x has changed. Probably 14.04 has some residue service definitions for firebird service and so it was working as intended.

fi
before_script:
- if [[ "$DB" == "SqlServer2008" ]]; then docker run -e "ACCEPT_EULA=Y" -e "SA_PASSWORD=P@ssw0rd" -e "MSSQL_PID=Express" -p 1433:1433 -d --name sqlexpress microsoft/mssql-server-linux:latest; fi
Expand Down
3 changes: 0 additions & 3 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@ environment:
init:
# Required for having windows endlines in sources zip
- git config --global core.autocrlf true
matrix:
allow_failures:
- DB: MySQL
build: off
before_test:
- ps: |-
Expand Down
3 changes: 1 addition & 2 deletions src/NHibernate.Test/NHibernate.Test.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.1.1" />
<PackageReference Include="FirebirdSql.Data.FirebirdClient" Version="6.3.0" />
<PackageReference Include="Npgsql" Version="4.0.3" />
<PackageReference Include="MySql.Data" Version="8.0.22" />
</ItemGroup>
<ItemGroup Condition="$(NhNetFx)">
<Reference Include="System.Configuration" />
Expand All @@ -74,7 +75,6 @@
<Reference Include="System.Data.OracleClient" />
<PackageReference Include="Microsoft.SqlServer.Compact" Version="4.0.8876.1" />
<PackageReference Include="Oracle.ManagedDataAccess" Version="12.1.2400" />
<PackageReference Include="MySql.Data" Version="6.9.11" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)'=='netcoreapp2.0'">
<PackageReference Include="System.CodeDom" Version="4.4.0" />
Expand All @@ -83,7 +83,6 @@
<PackageReference Include="System.Data.Odbc" Version="4.5.0" />
<PackageReference Include="System.Net.NameResolution" Version="4.3.0" />
<PackageReference Include="NUnitLite" Version="3.12.0" />
<PackageReference Include="MySql.Data" Version="6.10.6" />
</ItemGroup>
<ItemGroup Condition=" '$(NuGetPackageRoot)' != '' ">
<NativeBinaries Include="$(NuGetPackageRoot)microsoft.sqlserver.compact\4.0.8876.1\NativeBinaries\**\*.*" />
Expand Down
4 changes: 4 additions & 0 deletions src/NHibernate/Dialect/MySQLDialect.cs
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ public MySQLDialect()
"float8",
"force",
"fulltext",
"goto",
"high_priority",
"hour_microsecond",
"hour_minute",
Expand All @@ -170,6 +171,7 @@ public MySQLDialect()
"key",
"keys",
"kill",
"label",
"limit",
"linear",
"lines",
Expand All @@ -179,6 +181,7 @@ public MySQLDialect()
"longblob",
"longtext",
"low_priority",
"master_ssl_verify_server_cert",
"mediumblob",
"mediumint",
"mediumtext",
Expand Down Expand Up @@ -207,6 +210,7 @@ public MySQLDialect()
"second_microsecond",
"separator",
"show",
"shutdown",
"spatial",
"sql_big_result",
"sql_calc_found_rows",
Expand Down