forked from lapakiosstore/rubyinstaller2
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathappveyor.yml
More file actions
139 lines (123 loc) · 5.56 KB
/
appveyor.yml
File metadata and controls
139 lines (123 loc) · 5.56 KB
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
init:
- echo %PATH%
# We use a clean PATH to avoid interferences with the hundreds of installed programs.
- set PATH=c:/Program Files/Git/cmd;c:/ProgramData/chocolatey/bin;c:/Program Files (x86)/Inno Setup 5;c:/Windows/system32;C:/Windows/System32/WindowsPowerShell/v1.0
- set PATH=C:/ruby%build_ruby%/bin;%PATH%
- echo %PATH%
- ruby --version
- IF DEFINED DEPLOY_TAG (
echo.%DEPLOY_TAG% | findstr /C:"%target_ruby%">nul || (echo stop build not required for release & (exit 1))
)
install:
- choco install -y InnoSetup
build_script:
# Remove broken pkg files from cache
- c:/msys64/usr/bin/rm -f c:/msys64/var/cache/pacman/pkg/{pacman-mirrors}*
# Build the installer
- rake ri:ruby-%target_ruby%-%arch% & c:/msys64/usr/bin/gpgconf --homedir /etc/pacman.d/gnupg --kill all
# Reuse installed ruby for RubyInstaller-Devkit
- c:/msys64/usr/bin/mkdir -p packages/ri-msys/recipes/
- c:/msys64/usr/bin/cp -a packages/ri/recipes/unpack packages/ri-msys/recipes/
# Remove broken pkg files from cache
- c:/msys64/usr/bin/rm -f c:/msys64/var/cache/pacman/pkg/{autoconf,automake,bash-completion,ca-certificates}*
# Build the RubyInstaller-Devkit installer
- rake ri-msys:ruby-%target_ruby%-%arch%:installer-inno
test_script:
# Run the built Ruby installer and install to c:/ri2-ruby
- ruby -e "Dir['packages/ri/recipes/installer-inno/rubyinstaller-%target_ruby%*-%arch%.exe'].each{|f| system(f, '/verysilent', '/dir=c:/ri2-ruby', '/tasks=assocfiles,modpath,defaultutf8')}"
# Activate the environment variables set by the installer, but exclude
# git's /usr/bin, because it conflicts with one RubyInstaller test.
- ps: $env:PATH = [Environment]::GetEnvironmentVariable("PATH","Machine") -replace ";C:\\Program Files\\Git\\usr\\bin" -replace ";C:\\Ruby193\\bin"
- ps: $env:RUBYOPT = [Environment]::GetEnvironmentVariable("RUBYOPT","Machine")
- echo %PATH%
- echo %RUBYOPT%
- ridk version
# Install dependent gems
- IF "%target_ruby%" LSS "2.6" ( gem update --system && gem install bundler --force )
# Remove lock file because bundler version can vary between build and runtime
- del Gemfile.lock
- bundle install
# Run all tests against the new installed Ruby
- rake test
# Verify that the used CA list is still the latest.
- rake ssl:update_check
# Enable MSYS2 commands in cmd
- ridk enable
# Run the Ruby Spec Suite
- IF DEFINED run_ruby_spec ( IF NOT DEFINED APPVEYOR_REPO_TAG_NAME (
git clone --depth 1 https://github.com/ruby/mspec &&
git clone --depth 1 https://github.com/ruby/spec &&
env --unset=RUBYOPT ruby -C spec ../mspec/bin/mspec -j --exclude "Socket.getnameinfo using IPv4 using a 3 element Array as the first argument without custom flags returns an Array containing the hostname and service name" --exclude "Socket.getifaddrs each returned Socket::Ifaddr has an interface index"
))
# Run the MRI copy of Ruby Spec Suite
- IF DEFINED run_mri_spec ( IF NOT DEFINED APPVEYOR_REPO_TAG_NAME (
git clone --depth 1 https://github.com/ruby/ruby -b %run_mri_spec% &&
env --unset=RUBYOPT ruby -C ruby/spec/ruby ../mspec/bin/mspec -j --exclude "Socket.getnameinfo using IPv4 using a 3 element Array as the first argument without custom flags returns an Array containing the hostname and service name"
))
# Run upload to github (only on tag builds)
- set DEPLOY_TAG=%APPVEYOR_REPO_TAG_NAME%
- IF "%target_ruby%" EQU "head" (SET DEPLOY_TAG=rubyinstaller-head)
- rake release:appveyor_upload -- packages/ri/recipes/installer-inno/%DEPLOY_TAG%*-%arch%.exe packages/ri/recipes/archive-7z/%DEPLOY_TAG%*-%arch%.7z packages/ri-msys/recipes/installer-inno/ruby*-%target_ruby%*-%arch%.exe
# Provide the rubyinstaller.exe files for download
artifacts:
- path: packages/ri/recipes/installer-inno/ruby*-$(target_ruby)*-$(arch).exe
name: Executable installer
- path: packages/ri/recipes/archive-7z/ruby*-$(target_ruby)*-$(arch).7z
name: Plain archive file
- path: packages/ri-msys/recipes/installer-inno/ruby*-$(target_ruby)*-$(arch).exe
name: Executable installer with MYS2
environment:
GPGPASSWD:
secure: /DELcKSZC+R4HdXgsqR1RtC+IrDZ3Xut/vzV/KgepE3M8OsjJtmWutN0+Jvc2Iv2
DEPLOY_REPO_NAME: oneclick/rubyinstaller2
DEPLOY_TOKEN:
secure: HIQ7Ovn+zMKskPWhnlYGvQMvdLPlZB5lhn62wzw0AUSno8UfntuTgFmPvS1pUwOW
matrix:
- target_ruby: "2.6.3"
arch: "x64"
build_ruby: "25"
MINGW_PACKAGE_PREFIX: "mingw-w64-x86_64"
MSYSTEM: "MINGW64"
run_ruby_spec: true
- target_ruby: "2.6.3"
arch: "x86"
build_ruby: "25"
MINGW_PACKAGE_PREFIX: "mingw-w64-i686"
MSYSTEM: "MINGW32"
run_ruby_spec: true
- target_ruby: "2.5.5"
arch: "x64"
build_ruby: "24"
MINGW_PACKAGE_PREFIX: "mingw-w64-x86_64"
MSYSTEM: "MINGW64"
run_ruby_spec: true
- target_ruby: "2.5.5"
arch: "x86"
build_ruby: "24"
MINGW_PACKAGE_PREFIX: "mingw-w64-i686"
MSYSTEM: "MINGW32"
run_ruby_spec: true
- target_ruby: "head"
arch: "x64"
build_ruby: "24"
MINGW_PACKAGE_PREFIX: "mingw-w64-x86_64"
MSYSTEM: "MINGW64"
run_mri_spec: trunk
- target_ruby: "2.4.6"
arch: "x64"
build_ruby: "23"
MINGW_PACKAGE_PREFIX: "mingw-w64-x86_64"
MSYSTEM: "MINGW64"
run_ruby_spec: true
- target_ruby: "head"
arch: "x86"
build_ruby: "24"
MINGW_PACKAGE_PREFIX: "mingw-w64-i686"
MSYSTEM: "MINGW32"
run_mri_spec: trunk
- target_ruby: "2.4.6"
arch: "x86"
build_ruby: "22"
MINGW_PACKAGE_PREFIX: "mingw-w64-i686"
MSYSTEM: "MINGW32"
run_ruby_spec: true