summaryrefslogtreecommitdiff
path: root/appveyor.yml
blob: 3f2ac882e043abdd2cbc0cec21d73d34a5897b99 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
---
version: '{build}'
shallow_clone: true
platform:
  - x64
environment:
  ruby_version: "24-%Platform%"
  zlib_version: "1.2.11"
  matrix:
    - vs: "120"
    - MSYS2_ARCH: x86_64
      MSYSTEM: MINGW64
matrix:
  fast_finish: true
notifications:
  - provider: Webhook
    url:
      secure: iMINHMS0nZabaDsxN9omRDsekxzVvAAzEq5ev7lN6vZ6r9zNhl3/F/7POIVyahAwVFpRDeQT/iUugpAGWmOt3eGL/lZIdqiJFZ9DjPSkP68= # #alerts
    method: POST
    # "icon_url" is the url used by `provider: Slack`
    body: >-
      {{^isPullRequest}}
        {
          "attachments": [
            {
              "title": "Build {{projectName}} {{buildVersion}} {{status}}",
              "fallback": "AppVeyor Build {{projectName}} {{buildVersion}} {{status}}",
              "title_link": "{{buildUrl}}",
              "text": "Commit <{{commitUrl}}|{{commitId}}> by {{commitAuthor}} on {{commitDate}}: _{{commitMessage}}_",
              {{#passed}}
                "color": "#44ee44"
              {{/passed}}
              {{#failed}}
                "color": "#ee4444"
              {{/failed}}
            }
          ],
          "icon_url": "https://slack-files2.s3-us-west-2.amazonaws.com/bot_icons/2018-02-10/314363543719_48.png",
          "username": "AppVeyor CI"
        }
      {{/isPullRequest}}
    on_build_success: false
    on_build_failure: true
    on_build_status_changed: true
for:
-
  matrix:
    only:
      - vs: "120"
  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'
    - SET
    - 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
    - nmake %mflags% up incs UNICODE_FILES=.
    - del Makefile
    - mkdir \usr\local\bin
    - mkdir \usr\local\include
    - mkdir \usr\local\lib
    - appveyor DownloadFile https://zlib.net/zlib%zlib_version:.=%.zip
    - 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
    - mkdir %Platform%-mswin_%vs%
    - ps: Get-ChildItem "win32" -Recurse | foreach {$_.Attributes = 'Readonly'}
    - ps: Get-Item $env:Platform"-mswin_"$env:vs | foreach {$_.Attributes = 'Normal'}
  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')"
  test_script:
    - set /a JOBS=%NUMBER_OF_PROCESSORS%
    - nmake -l "TESTOPTS=-v -q" btest
    - nmake -l "TESTOPTS=-v -q" test-basic
    - nmake -l "TESTOPTS=-q -j%JOBS%" test-all RUBY_FORCE_TEST_JIT=1
    - nmake -l test-spec
-
  matrix:
    only:
      - MSYS2_ARCH: x86_64
        MSYSTEM: MINGW64
  install:
    - ver
    - chcp
    - set /a JOBS=%NUMBER_OF_PROCESSORS%
    - set MSYS_NO_PATHCONV=1
    - SET BITS=%Platform:x86=32%
    - SET BITS=%BITS:x=%
    - SET ruby_path=C:\Ruby%ruby_version:-x86=%
    - SET PATH=\usr\local\bin;%ruby_path%\bin;%PATH%;C:\msys64\%MSYSTEM%\bin;C:\msys64\usr\bin
    - ruby --version
    - mkdir \usr\bin
    - mkdir \usr\share
    - mkdir \usr\local\bin
    - mkdir \usr\local\include
    - mkdir \usr\local\lib
  build_script:
    - cd %APPVEYOR_BUILD_FOLDER%
    - pacman --noconfirm --sync --refresh --refresh pacman
    - pacman --noconfirm --sync --refresh --refresh --sysupgrade --sysupgrade
    - pacman --noconfirm -S --needed base-devel mingw-w64-x86_64-gdbm
    - sh -c "ln -s $(which autom4te) /usr/bin/autom4te"
    # mklink \usr\bin\autom4te c:\msys64\usr\bin\autom4te
    - sh -c "ln -s $(which m4) /usr/bin/m4"
    # mklink \usr\bin\m4.exe c:\msys64\usr\bin\m4.exe
    - sh -c "ln -s /c/msys64/usr/share/autoconf /usr/share/autoconf"
    # mklink /d \usr\share\autoconf c:\msys64\usr\share\autoconf
    - sh -c autoconf
    - sh configure --disable-install-doc --prefix=/usr/local
    - sh -c "ln -sf $(which mingw32-make) /c/msys64/usr/bin/make.exe"
    # del c:\msys64\usr\bin\make.exe
    # mklink c:\msys64\usr\bin\make.exe mingw32-make.exe
    - dir c:\usr\bin
    - dir c:\usr\share
    - dir c:\msys64\usr\bin\make.exe
    - mingw32-make -j%JOBS%
    - mingw32-make -j%JOBS% install"
  test_script:
    - mingw32-make test
    - mingw32-make -j%JOBS% test-all RUBY_FORCE_TEST_JIT=1 V=1
    - mingw32-make -j%JOBS% test-spec MSPECOPT=-j