2018-02-14 09:09:32 -05:00
|
|
|
---
|
2018-08-13 09:46:06 -04:00
|
|
|
version: '{build}'
|
2018-02-14 09:09:32 -05:00
|
|
|
shallow_clone: true
|
|
|
|
platform:
|
|
|
|
- x64
|
2019-05-27 21:02:30 -04:00
|
|
|
branches:
|
|
|
|
except:
|
|
|
|
# Because default branch is still "trunk", we build only "trunk" to avoid
|
|
|
|
# doubly building on master and trigger CI on Pull Request.
|
|
|
|
- master # mirrored from trunk
|
2018-02-14 09:09:32 -05:00
|
|
|
environment:
|
|
|
|
ruby_version: "24-%Platform%"
|
|
|
|
zlib_version: "1.2.11"
|
|
|
|
matrix:
|
2018-10-23 10:10:12 -04:00
|
|
|
# to reduce time for finishing all jobs, run the slowest msys2 build first.
|
2018-10-12 21:47:55 -04:00
|
|
|
- build: msys2
|
|
|
|
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
|
2018-09-03 22:18:51 -04:00
|
|
|
- build: vs
|
|
|
|
vs: 120
|
2018-10-11 20:45:07 -04:00
|
|
|
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2013
|
2018-09-10 09:05:34 -04:00
|
|
|
- build: vs
|
|
|
|
vs: 140
|
2018-10-11 20:45:07 -04:00
|
|
|
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
|
2019-05-27 22:08:53 -04:00
|
|
|
RELINE_TEST_ENCODING: "Windows-31J"
|
2018-11-28 09:08:34 -05:00
|
|
|
GEMS_FOR_TEST: "timezone tzinfo"
|
2019-05-19 03:24:33 -04:00
|
|
|
UPDATE_UNICODE: "UNICODE_FILES=. UNICODE_PROPERTY_FILES=. UNICODE_AUXILIARY_FILES=. UNICODE_EMOJI_FILES=."
|
2018-02-14 09:09:32 -05:00
|
|
|
for:
|
2018-02-14 07:34:49 -05:00
|
|
|
-
|
2018-08-13 09:46:06 -04:00
|
|
|
matrix:
|
2018-02-14 07:34:49 -05:00
|
|
|
only:
|
2018-09-03 22:18:51 -04:00
|
|
|
- build: vs
|
2018-08-13 09:46:06 -04:00
|
|
|
install:
|
|
|
|
- ver
|
|
|
|
- chcp
|
|
|
|
- SET BITS=%Platform:x86=32%
|
|
|
|
- SET BITS=%BITS:x=%
|
|
|
|
- SET OPENSSL_DIR=c:\OpenSSL-Win%BITS%
|
|
|
|
- CALL SET vcvars=%%^VS%VS%COMNTOOLS^%%..\..\VC\vcvarsall.bat
|
|
|
|
- SET vcvars
|
|
|
|
- '"%vcvars%" %Platform:x64=amd64%'
|
|
|
|
- SET ruby_path=C:\Ruby%ruby_version:-x86=%
|
|
|
|
- SET PATH=\usr\local\bin;%ruby_path%\bin;%PATH%;C:\msys64\mingw64\bin;C:\msys64\usr\bin
|
|
|
|
- ruby --version
|
|
|
|
- 'cl'
|
|
|
|
- echo> Makefile srcdir=.
|
|
|
|
- echo>> Makefile MSC_VER=0
|
|
|
|
- echo>> Makefile RT=none
|
|
|
|
- echo>> Makefile RT_VER=0
|
|
|
|
- echo>> Makefile BUILTIN_ENCOBJS=nul
|
|
|
|
- type win32\Makefile.sub >> Makefile
|
|
|
|
- nmake %mflags% touch-unicode-files
|
2019-05-19 03:24:33 -04:00
|
|
|
- nmake %mflags% %UPDATE_UNICODE% up incs
|
2018-08-13 09:46:06 -04:00
|
|
|
- del Makefile
|
|
|
|
- mkdir \usr\local\bin
|
|
|
|
- mkdir \usr\local\include
|
|
|
|
- mkdir \usr\local\lib
|
2019-03-15 09:25:06 -04:00
|
|
|
- curl -fsSL -o zlib%zlib_version:.=%.zip --retry 10 https://zlib.net/zlib%zlib_version:.=%.zip
|
2018-08-13 09:46:06 -04:00
|
|
|
- 7z x -o%APPVEYOR_BUILD_FOLDER%\ext\zlib zlib%zlib_version:.=%.zip
|
|
|
|
- for %%I in (%OPENSSL_DIR%\*.dll) do mklink /h \usr\local\bin\%%~nxI %%I
|
2019-05-27 22:08:22 -04:00
|
|
|
- attrib +r /s /d
|
2018-08-13 09:46:06 -04:00
|
|
|
- mkdir %Platform%-mswin_%vs%
|
|
|
|
build_script:
|
|
|
|
- cd %APPVEYOR_BUILD_FOLDER%
|
|
|
|
- cd %Platform%-mswin_%vs%
|
|
|
|
- ..\win32\configure.bat --without-ext=+,dbm,gdbm,readline --with-opt-dir=/usr/local --with-openssl-dir=%OPENSSL_DIR:\=/%
|
|
|
|
- nmake -l
|
|
|
|
- nmake install-nodoc
|
|
|
|
- \usr\bin\ruby -v -e "p :locale => Encoding.find('locale'), :filesystem => Encoding.find('filesystem')"
|
2018-11-28 09:08:34 -05:00
|
|
|
- if not "%GEMS_FOR_TEST%" == "" \usr\bin\gem install --no-document %GEMS_FOR_TEST%
|
2018-08-13 09:46:06 -04:00
|
|
|
test_script:
|
|
|
|
- set /a JOBS=%NUMBER_OF_PROCESSORS%
|
|
|
|
- nmake -l "TESTOPTS=-v -q" btest
|
|
|
|
- nmake -l "TESTOPTS=-v -q" test-basic
|
2019-04-27 01:53:09 -04:00
|
|
|
- nmake -l "TESTOPTS=-q --subprocess-timeout-scale=3.0 --excludes=../test/excludes/_appveyor -j%JOBS% --exclude readline --exclude win32ole --exclude test_bignum --exclude test_syntax --exclude test_open-uri --exclude test_bundled_ca --exclude test_gc_compact" test-all
|
2018-11-16 01:47:37 -05:00
|
|
|
# separately execute tests without -j which may crash worker with -j.
|
2019-04-27 13:17:49 -04:00
|
|
|
- nmake -l "TESTOPTS=-v --subprocess-timeout-scale=3.0 --excludes=../test/excludes/_appveyor" test-all TESTS="../test/win32ole ../test/ruby/test_bignum.rb ../test/ruby/test_syntax.rb ../test/open-uri/test_open-uri.rb ../test/rubygems/test_bundled_ca.rb ../test/ruby/test_gc_compact.rb"
|
2018-10-23 10:43:19 -04:00
|
|
|
- nmake -l test-spec MSPECOPT=-fs # not using `-j` because sometimes `mspec -j` silently dies on Windows
|
2018-08-13 11:29:40 -04:00
|
|
|
-
|
|
|
|
matrix:
|
|
|
|
only:
|
2018-09-03 22:18:51 -04:00
|
|
|
- build: msys2
|
2018-08-13 11:29:40 -04:00
|
|
|
install:
|
|
|
|
- ver
|
|
|
|
- chcp
|
2018-08-14 22:15:13 -04:00
|
|
|
- set /a JOBS=%NUMBER_OF_PROCESSORS%
|
2018-08-15 00:10:19 -04:00
|
|
|
- set MSYS_NO_PATHCONV=1
|
2018-09-03 22:18:51 -04:00
|
|
|
- SET MSYSTEM=%Platform:x86=32%
|
|
|
|
- SET MSYSTEM=%MSYSTEM:x=MINGW%
|
|
|
|
- SET MSYS2_ARCH=%Platform:x86=i686%
|
|
|
|
- SET MSYS2_ARCH=%MSYS2_ARCH:x64=x86_64%
|
2018-09-03 22:19:39 -04:00
|
|
|
- set MSYSTEM_PREFIX=/mingw64
|
|
|
|
- set MINGW_CHOST=%MSYS2_ARCH%-w64-mingw32
|
2018-08-13 11:29:40 -04:00
|
|
|
- SET ruby_path=C:\Ruby%ruby_version:-x86=%
|
2018-09-03 22:19:39 -04:00
|
|
|
- cd ..
|
|
|
|
- mkdir build
|
|
|
|
- mkdir install
|
|
|
|
- SET PATH=%ruby_path%\bin;C:\msys64\%MSYSTEM%\bin;C:\msys64\usr\bin;%PATH%
|
2018-08-13 11:29:40 -04:00
|
|
|
- ruby --version
|
|
|
|
build_script:
|
2018-09-03 22:19:39 -04:00
|
|
|
# always update database
|
|
|
|
- pacman -Sy
|
2019-05-31 12:21:52 -04:00
|
|
|
# 2019-May-31 delete below after next Appveyor msys2 update, also next line's "--nodeps"
|
2019-05-28 17:03:30 -04:00
|
|
|
- pacman -S --noconfirm --needed --noprogressbar mingw-w64-x86_64-python3 mingw-w64-x86_64-readline mingw-w64-x86_64-sqlite3
|
2019-05-31 12:21:52 -04:00
|
|
|
- pacman -S --noconfirm --needed --noprogressbar --nodeps mingw-w64-x86_64-toolchain
|
2019-05-28 17:03:30 -04:00
|
|
|
- pacman -S --noconfirm --needed --noprogressbar mingw-w64-x86_64-gdbm mingw-w64-x86_64-gmp mingw-w64-x86_64-libffi mingw-w64-x86_64-openssl mingw-w64-x86_64-pdcurses mingw-w64-x86_64-readline mingw-w64-x86_64-zlib
|
2018-08-13 11:29:40 -04:00
|
|
|
- cd %APPVEYOR_BUILD_FOLDER%
|
2018-09-03 22:19:39 -04:00
|
|
|
- set CFLAGS=-march=%MSYS2_ARCH:_=-% -mtune=generic -O3 -pipe
|
|
|
|
- set CXXFLAGS=%CFLAGS%
|
|
|
|
- set CPPFLAGS=-D_FORTIFY_SOURCE=2 -D__USE_MINGW_ANSI_STDIO=1 -DFD_SETSIZE=2048
|
|
|
|
- set LDFLAGS=-pipe
|
|
|
|
- sh -c "autoreconf -fi"
|
|
|
|
- cd ..\build
|
|
|
|
- sh ../ruby/configure --disable-install-doc --prefix=/. --build=%MINGW_CHOST% --host=%MINGW_CHOST% --target=%MINGW_CHOST%
|
2019-05-17 12:17:47 -04:00
|
|
|
- mingw32-make %mflags% touch-unicode-files
|
2019-05-19 03:24:33 -04:00
|
|
|
- mingw32-make -j%JOBS% %UPDATE_UNICODE% up incs
|
2018-08-14 22:15:13 -04:00
|
|
|
- mingw32-make -j%JOBS%
|
2018-09-03 22:19:39 -04:00
|
|
|
- mingw32-make DESTDIR=../install install-nodoc
|
2018-11-28 09:08:34 -05:00
|
|
|
- if not "%GEMS_FOR_TEST%" == "" ..\install\bin\gem install --no-document %GEMS_FOR_TEST%
|
2018-08-13 11:29:40 -04:00
|
|
|
test_script:
|
2018-08-14 22:15:13 -04:00
|
|
|
- mingw32-make test
|
2019-04-27 07:15:07 -04:00
|
|
|
- mingw32-make test-all TESTOPTS="--retry --job-status=normal --show-skip --subprocess-timeout-scale=1.5 --excludes=../ruby/test/excludes/_appveyor -j %JOBS% --exclude win32ole --exclude test_open-uri --exclude test_gc_compact"
|
2018-11-16 01:47:37 -05:00
|
|
|
# separately execute tests without -j which may crash worker with -j.
|
2019-04-27 07:15:07 -04:00
|
|
|
- mingw32-make test-all TESTOPTS="--retry --job-status=normal --show-skip --subprocess-timeout-scale=1.5 --excludes=../ruby/test/excludes/_appveyor" TESTS="../ruby/test/win32ole ../ruby/test/open-uri/test_open-uri.rb ../ruby/test/ruby/test_gc_compact.rb"
|
2018-10-23 10:43:19 -04:00
|
|
|
- mingw32-make test-spec MSPECOPT=-fs # not using `-j` because sometimes `mspec -j` silently dies on Windows
|
2019-03-16 00:11:54 -04:00
|
|
|
notifications:
|
|
|
|
# Using "Webhook" with templated body to skip notification on Pull Request
|
|
|
|
- provider: Webhook
|
|
|
|
method: POST
|
|
|
|
url:
|
|
|
|
secure: iMINHMS0nZabaDsxN9omRDsekxzVvAAzEq5ev7lN6vb+gUETT+rbDKLGxBxBpEpxlnPlLdzroIJ+DTKlwfJA8VkGawTn9EXNsucH0OkSf2M= # AppVeyor CI
|
|
|
|
body: >-
|
|
|
|
{{^isPullRequest}}
|
|
|
|
{
|
|
|
|
"attachments": [
|
|
|
|
{
|
|
|
|
"title": "Build {{projectName}} {{buildVersion}} {{status}}",
|
|
|
|
"title_link": "{{buildUrl}}",
|
|
|
|
"fallback": "AppVeyor Build {{projectName}} {{buildVersion}} {{status}}",
|
|
|
|
"text": "Commit <{{commitUrl}}|{{commitId}}> by {{commitAuthor}} on {{commitDate}}: _{{commitMessage}}_",
|
2019-03-17 00:13:13 -04:00
|
|
|
"color": "{{#passed}}#44ee44{{/passed}}{{#failed}}#ee4444{{/failed}}"
|
2019-03-16 00:11:54 -04:00
|
|
|
}
|
|
|
|
],
|
|
|
|
"channel": "#alerts"
|
|
|
|
}
|
|
|
|
{{/isPullRequest}}
|
|
|
|
on_build_success: false
|
|
|
|
on_build_failure: true
|
|
|
|
on_build_status_changed: true
|
|
|
|
- provider: Webhook
|
|
|
|
method: POST
|
|
|
|
url:
|
|
|
|
secure: iMINHMS0nZabaDsxN9omRDsekxzVvAAzEq5ev7lN6vb+gUETT+rbDKLGxBxBpEpxlnPlLdzroIJ+DTKlwfJA8VkGawTn9EXNsucH0OkSf2M= # AppVeyor CI
|
|
|
|
body: >-
|
|
|
|
{{^isPullRequest}}
|
|
|
|
{
|
|
|
|
"attachments": [
|
|
|
|
{
|
|
|
|
"title": "Build {{projectName}} {{buildVersion}} {{status}}",
|
|
|
|
"title_link": "{{buildUrl}}",
|
|
|
|
"fallback": "AppVeyor Build {{projectName}} {{buildVersion}} {{status}}",
|
|
|
|
"text": "Commit <{{commitUrl}}|{{commitId}}> by {{commitAuthor}} on {{commitDate}}: _{{commitMessage}}_",
|
2019-03-17 00:13:13 -04:00
|
|
|
"color": "{{#passed}}#44ee44{{/passed}}{{#failed}}#ee4444{{/failed}}"
|
2019-03-16 00:11:54 -04:00
|
|
|
}
|
|
|
|
],
|
|
|
|
"channel": "#commits"
|
|
|
|
}
|
|
|
|
{{/isPullRequest}}
|
|
|
|
on_build_success: false
|
|
|
|
on_build_failure: true
|
|
|
|
on_build_status_changed: true
|