Skip to content

Commit d9df26a

Browse files
committed
Add Travis CI build configuration
1 parent 3c6cd76 commit d9df26a

File tree

1 file changed

+49
-0
lines changed

1 file changed

+49
-0
lines changed

.travis.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
language: csharp
2+
mono: none
3+
dotnet: 2.1.2
4+
sudo: required
5+
services:
6+
- mysql
7+
- postgresql
8+
- docker
9+
env:
10+
- DB=SqlServer2008 CONNECTION_STRING="Server=localhost;initial catalog=nhibernate;User Id=sa;Password=P@ssw0rd;"
11+
- DB=PostgreSQL CONNECTION_STRING="Host=localhost;Port=5432;Username=postgres;Database=nhibernate;Enlist=true;"
12+
- DB=Firebird
13+
- DB=MySQL CONNECTION_STRING="Server=127.0.0.1;Uid=root;Database=nhibernate;Old Guids=True;"
14+
matrix:
15+
allow_failures:
16+
- env: DB=MySQL CONNECTION_STRING="Server=127.0.0.1;Uid=root;Database=nhibernate;Old Guids=True;"
17+
before_install:
18+
- curl https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -
19+
- curl https://packages.microsoft.com/config/ubuntu/14.04/prod.list | sudo tee /etc/apt/sources.list.d/microsoft.list
20+
- sudo apt-get update -qq
21+
- sudo apt-get install -y powershell
22+
- |-
23+
if [[ "$DB" == "MySQL" ]]
24+
then
25+
echo -e '[server]\nlower_case_table_names=1' | sudo tee -a /etc/mysql/my.cnf
26+
sudo service mysql restart
27+
fi
28+
- |-
29+
if [[ "$DB" == "Firebird" ]]
30+
then
31+
sudo apt-get install -y libicu-dev libtommath-dev curl
32+
curl -L -O https://github.com/FirebirdSQL/firebird/releases/download/R3_0_3/Firebird-3.0.3.32900-0.amd64.tar.gz
33+
tar xzvf Firebird-3.0.3.32900-0.amd64.tar.gz
34+
pushd Firebird-3.0.3.32900-0.amd64
35+
sudo ./install.sh -silent
36+
popd
37+
export $(sudo cat /opt/firebird/SYSDBA.password | grep -v ^# | xargs)
38+
sudo chmod 775 /tmp/firebird
39+
echo -e "nhibernate = /tmp/firebird/nhibernate.fdb" | sudo tee -a /opt/firebird/databases.conf
40+
echo -e "AuthServer = Srp\nAuthClient = Srp\nUserManager = Srp\nWireCrypt = Enabled" | sudo tee -a /opt/firebird/firebird.conf
41+
sudo /opt/firebird/bin/gsec -modify SYSDBA -pw masterkey -admin yes
42+
sudo service firebird restart
43+
fi
44+
before_script:
45+
- 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
46+
- if [[ "$DB" == "PostgreSQL" ]]; then psql -c "CREATE DATABASE nhibernate;" -U postgres; fi
47+
- if [[ "$DB" == "MySQL" ]]; then mysql -e "CREATE DATABASE IF NOT EXISTS nhibernate;"; fi
48+
script:
49+
- pwsh -noprofile -command "& ./build.ps1 -TaskList Set-Configuration,Test -properties @{\"Database\" = \"$DB\";\"ConnectionString\"=\"$CONNECTION_STRING\"}"

0 commit comments

Comments
 (0)