Skip to content

Commit 48c3e56

Browse files
committed
Build solution on Ubuntu VM image
1 parent 2ad2d40 commit 48c3e56

File tree

1 file changed

+40
-34
lines changed

1 file changed

+40
-34
lines changed

appveyor.yml

Lines changed: 40 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,27 @@
33
#---------------------------------#
44

55
# Build worker image (VM template)
6-
image: Visual Studio 2017
6+
image:
7+
- Visual Studio 2017
8+
- Ubuntu
9+
10+
# disable execution of PowerShell commands on Linux
11+
environment:
12+
APPVEYOR_YML_DISABLE_PS_LINUX: true
713

814
# scripts that run after cloning repository
915
install:
1016
# install SQL Server 2008 R2 SP2 Express (not included in VS 2017 image; see: https://www.appveyor.com/docs/build-environment/#databases)
11-
- curl -L -O -S -s https://download.microsoft.com/download/0/4/B/04BE03CD-EAF3-4797-9D8D-2E08E316C998/SQLEXPR_x64_ENU.exe
12-
- SQLEXPR_x64_ENU.exe /QUIET /IACCEPTSQLSERVERLICENSETERMS /ACTION=INSTALL /FEATURES=SQL /INSTANCENAME=SQL2008R2SP2 /TCPENABLED=1 /SECURITYMODE=SQL /SAPWD=Password12! /ADDCURRENTUSERASSQLADMIN /SQLSVCACCOUNT="NT AUTHORITY\Network Service" /AGTSVCACCOUNT="NT AUTHORITY\Network Service"
17+
- cmd: curl -L -O -S -s https://download.microsoft.com/download/0/4/B/04BE03CD-EAF3-4797-9D8D-2E08E316C998/SQLEXPR_x64_ENU.exe
18+
- cmd: SQLEXPR_x64_ENU.exe /QUIET /IACCEPTSQLSERVERLICENSETERMS /ACTION=INSTALL /FEATURES=SQL /INSTANCENAME=SQL2008R2SP2 /TCPENABLED=1 /SECURITYMODE=SQL /SAPWD=Password12! /ADDCURRENTUSERASSQLADMIN /SQLSVCACCOUNT="NT AUTHORITY\Network Service" /AGTSVCACCOUNT="NT AUTHORITY\Network Service"
1319

1420
# install SQL Server 2012 SP1 Express (not included in VS 2017 image; see: https://www.appveyor.com/docs/build-environment/#databases)
15-
- curl -L -O -S -s https://download.microsoft.com/download/5/2/9/529FEF7B-2EFB-439E-A2D1-A1533227CD69/SQLEXPR_x64_ENU.exe
16-
- SQLEXPR_x64_ENU.exe /QUIET /IACCEPTSQLSERVERLICENSETERMS /ACTION=INSTALL /FEATURES=SQL /INSTANCENAME=SQL2012SP1 /TCPENABLED=1 /SECURITYMODE=SQL /SAPWD=Password12! /ADDCURRENTUSERASSQLADMIN /SQLSVCACCOUNT="NT AUTHORITY\Network Service" /AGTSVCACCOUNT="NT AUTHORITY\Network Service"
21+
- cmd: curl -L -O -S -s https://download.microsoft.com/download/5/2/9/529FEF7B-2EFB-439E-A2D1-A1533227CD69/SQLEXPR_x64_ENU.exe
22+
- cmd: SQLEXPR_x64_ENU.exe /QUIET /IACCEPTSQLSERVERLICENSETERMS /ACTION=INSTALL /FEATURES=SQL /INSTANCENAME=SQL2012SP1 /TCPENABLED=1 /SECURITYMODE=SQL /SAPWD=Password12! /ADDCURRENTUSERASSQLADMIN /SQLSVCACCOUNT="NT AUTHORITY\Network Service" /AGTSVCACCOUNT="NT AUTHORITY\Network Service"
1723

1824
# install x86 CLR types for SQL Server 2012 SP1 (required when running dotnet test for MsSql tests)
19-
- curl -L -O -S -s https://download.microsoft.com/download/4/B/1/4B1E9B0E-A4F3-4715-B417-31C82302A70A/ENU/x86/SQLSysClrTypes.msi
20-
- SQLSysClrTypes.msi /passive
25+
- cmd: curl -L -O -S -s https://download.microsoft.com/download/4/B/1/4B1E9B0E-A4F3-4715-B417-31C82302A70A/ENU/x86/SQLSysClrTypes.msi
26+
- cmd: SQLSysClrTypes.msi /passive
2127

2228
# enable dynamic TCP ports for 2008 and 2012 SQL Server instances (so they can be run simultaneously)
2329
- ps: set-itemproperty -path 'HKLM:\software\microsoft\microsoft sql server\mssql10_50.SQL2008R2SP2\mssqlserver\supersocketnetlib\tcp\ipall' -name TcpDynamicPorts -value '0'
@@ -26,32 +32,32 @@ install:
2632
- ps: set-itemproperty -path 'HKLM:\software\microsoft\microsoft sql server\mssql11.SQL2012SP1\mssqlserver\supersocketnetlib\tcp\ipall' -name TcpPort -value ''
2733

2834
# install MySQL 5.6
29-
# - curl -L -O -S -s https://dev.mysql.com/get/Downloads/MySQLInstaller/mysql-installer-web-community-5.6.36.0.msi
30-
# - msiexec /i mysql-installer-web-community-5.6.36.0.msi /quiet
31-
# - cmd /c ""C:\Program Files (x86)\MySQL\MySQL Installer for Windows\MySQLInstallerConsole.exe" community install server;5.6.36;x64:*:port=3306;passwd=Password12! -silent"
35+
# - cmd: curl -L -O -S -s https://dev.mysql.com/get/Downloads/MySQLInstaller/mysql-installer-web-community-5.6.36.0.msi
36+
# - cmd: msiexec /i mysql-installer-web-community-5.6.36.0.msi /quiet
37+
# - cmd: cmd /c ""C:\Program Files (x86)\MySQL\MySQL Installer for Windows\MySQLInstallerConsole.exe" community install server;5.6.36;x64:*:port=3306;passwd=Password12! -silent"
3238

3339
# change default port for MySQL 5.7 (so it can run simultaneously with MySQL 5.6)
3440
# - ps: $iniPath = 'C:\ProgramData\MySQL\MySQL Server 5.7\my.ini'
3541
# - ps: (Get-Content $iniPath).replace('port=3306', 'port=3307') | Set-Content $iniPath
3642

3743
# install PostgreSQL 8.4
38-
- curl -L -O -S -s https://get.enterprisedb.com/postgresql/postgresql-8.4.22-1-windows.exe
39-
- postgresql-8.4.22-1-windows.exe --mode unattended --superpassword Password12! --serverport 5431
44+
- cmd: curl -L -O -S -s https://get.enterprisedb.com/postgresql/postgresql-8.4.22-1-windows.exe
45+
- cmd: postgresql-8.4.22-1-windows.exe --mode unattended --superpassword Password12! --serverport 5431
4046

4147
# install PostGIS 1.5.5 for PostgreSQL 8.4
42-
- curl -L -O -S -s http://download.osgeo.org/postgis/windows/pg84/postgis-pg84-binaries-1.5.5.zip
43-
- 7z x postgis-pg84-binaries-1.5.5.zip > nul
44-
- xcopy /s /y /q postgis-pg84-binaries-1.5.5 "C:\Program Files (x86)\PostgreSQL\8.4"
45-
- SET PGPASSWORD=Password12!
46-
- SET PGDIR=C:\Program Files (x86)\PostgreSQL\8.4
47-
- cmd /c ""%PGDIR%\bin\createdb" -p 5431 -U postgres template_postgis"
48-
- cmd /c ""%PGDIR%\bin\psql" -q -p 5431 -U postgres -d template_postgis -f "%PGDIR%\share\contrib\postgis-1.5\postgis.sql""
49-
- cmd /c ""%PGDIR%\bin\psql" -q -p 5431 -U postgres -d template_postgis -f "%PGDIR%\share\contrib\postgis-1.5\spatial_ref_sys.sql""
48+
- cmd: curl -L -O -S -s http://download.osgeo.org/postgis/windows/pg84/postgis-pg84-binaries-1.5.5.zip
49+
- cmd: 7z x postgis-pg84-binaries-1.5.5.zip > nul
50+
- cmd: xcopy /s /y /q postgis-pg84-binaries-1.5.5 "C:\Program Files (x86)\PostgreSQL\8.4"
51+
- cmd: SET PGPASSWORD=Password12!
52+
- cmd: SET PGDIR=C:\Program Files (x86)\PostgreSQL\8.4
53+
- cmd: cmd /c ""%PGDIR%\bin\createdb" -p 5431 -U postgres template_postgis"
54+
- cmd: cmd /c ""%PGDIR%\bin\psql" -q -p 5431 -U postgres -d template_postgis -f "%PGDIR%\share\contrib\postgis-1.5\postgis.sql""
55+
- cmd: cmd /c ""%PGDIR%\bin\psql" -q -p 5431 -U postgres -d template_postgis -f "%PGDIR%\share\contrib\postgis-1.5\spatial_ref_sys.sql""
5056

5157
# install PostGIS 2.3.2 for PostgreSQL 9.6
52-
- curl -L -O -S -s http://download.osgeo.org/postgis/windows/pg96/archive/postgis-bundle-pg96-2.3.2x64.zip
53-
- 7z x postgis-bundle-pg96-2.3.2x64.zip > nul
54-
- xcopy /s /y /q postgis-bundle-pg96-2.3.2x64 "C:\Program Files\PostgreSQL\9.6"
58+
- cmd: curl -L -O -S -s http://download.osgeo.org/postgis/windows/pg96/archive/postgis-bundle-pg96-2.3.2x64.zip
59+
- cmd: 7z x postgis-bundle-pg96-2.3.2x64.zip > nul
60+
- cmd: xcopy /s /y /q postgis-bundle-pg96-2.3.2x64 "C:\Program Files\PostgreSQL\9.6"
5561

5662
# start services required for build/tests
5763
services:
@@ -84,27 +90,27 @@ before_build:
8490
# scripts to run before tests
8591
before_test:
8692
# setup SQL Server 2008
87-
- sqlcmd -S (local)\SQL2008R2SP2 -i Tests.NHibernate.Spatial.MsSql2008\nhsp_test.sql
93+
- cmd: sqlcmd -S (local)\SQL2008R2SP2 -i Tests.NHibernate.Spatial.MsSql2008\nhsp_test.sql
8894

8995
# setup SQL Server 2012
90-
- sqlcmd -S (local)\SQL2012SP1 -i Tests.NHibernate.Spatial.MsSql2012\nhsp_test.sql
96+
- cmd: sqlcmd -S (local)\SQL2012SP1 -i Tests.NHibernate.Spatial.MsSql2012\nhsp_test.sql
9197

9298
# setup MySQL 5.6
93-
# - SET MYSQL_PWD=Password12!
94-
# - SET mysql="C:\Program Files\MySQL\MySQL Server 5.6\bin\mysql.exe"
95-
# - cmd /c "%mysql% -P 3306 -u root < Tests.NHibernate.Spatial.MySQL\nhsp_test.sql"
99+
# - cmd: SET MYSQL_PWD=Password12!
100+
# - cmd: SET mysql="C:\Program Files\MySQL\MySQL Server 5.6\bin\mysql.exe"
101+
# - cmd: cmd /c "%mysql% -P 3306 -u root < Tests.NHibernate.Spatial.MySQL\nhsp_test.sql"
96102

97103
# setup MySQL 5.7
98-
# - SET mysql="C:\Program Files\MySQL\MySQL Server 5.7\bin\mysql.exe"
99-
# - cmd /c "%mysql% -P 3307 -u root < Tests.NHibernate.Spatial.MySQL57\nhsp_test.sql"
104+
# - cmd: SET mysql="C:\Program Files\MySQL\MySQL Server 5.7\bin\mysql.exe"
105+
# - cmd: cmd /c "%mysql% -P 3307 -u root < Tests.NHibernate.Spatial.MySQL57\nhsp_test.sql"
100106

101107
# setup PostgreSQL 8.4
102-
- SET psql="C:\Program Files (x86)\PostgreSQL\8.4\bin\psql.exe"
103-
- cmd /c "%psql% -q -p 5431 -U postgres -f Tests.NHibernate.Spatial.PostGis\nhsp_test.sql"
108+
- cmd: SET psql="C:\Program Files (x86)\PostgreSQL\8.4\bin\psql.exe"
109+
- cmd: cmd /c "%psql% -q -p 5431 -U postgres -f Tests.NHibernate.Spatial.PostGis\nhsp_test.sql"
104110

105111
# setup PostgreSQL 9.6
106-
- SET psql="C:\Program Files\PostgreSQL\9.6\bin\psql.exe"
107-
- cmd /c "%psql% -q -p 5432 -U postgres -f Tests.NHibernate.Spatial.PostGis20\nhsp_test.sql"
112+
- cmd: SET psql="C:\Program Files\PostgreSQL\9.6\bin\psql.exe"
113+
- cmd: cmd /c "%psql% -q -p 5432 -U postgres -f Tests.NHibernate.Spatial.PostGis20\nhsp_test.sql"
108114

109115
test_script:
110116
- cmd: dotnet test -c Release --no-build --logger "trx;LogFileName=MsSql2008.trx" --results-directory %APPVEYOR_BUILD_FOLDER% Tests.NHibernate.Spatial.MsSql2008

0 commit comments

Comments
 (0)