forked from oneclick/rubyinstaller2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
107 lines (96 loc) · 4.62 KB
/
appveyor.yml
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
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
install:
- choco install -y InnoSetup
# Update pacman database.
- c:/msys64/usr/bin/bash -lc "pacman -Sy --noconfirm"
# Update ruby dependencies, because the pre-installed are outdated.
# Keep this in sync with the "depends" list in PKGBUILD files.
- c:/msys64/usr/bin/bash -lc "pacman -S --noconfirm --needed ${MINGW_PACKAGE_PREFIX}-toolchain ${MINGW_PACKAGE_PREFIX}-gcc-libs ${MINGW_PACKAGE_PREFIX}-gdbm ${MINGW_PACKAGE_PREFIX}-gmp ${MINGW_PACKAGE_PREFIX}-libffi ${MINGW_PACKAGE_PREFIX}-libyaml ${MINGW_PACKAGE_PREFIX}-openssl ${MINGW_PACKAGE_PREFIX}-zlib"
build_script:
- set PATH=C:/ruby%build_ruby%/bin;%PATH%
- ruby --version
- c:/msys64/%MSYSTEM%/bin/gcc.exe --version
- echo %PATH%
# Build the installer
- rake rubyinstaller:ruby-%target_ruby%-%arch%
# Reuse installed ruby
- c:/msys64/usr/bin/mkdir -p packages/rubybundle/recipes/
- c:/msys64/usr/bin/cp -a packages/rubyinstaller/recipes/unpack packages/rubybundle/recipes/
# Remove broken pkg files from cache
- c:/msys64/usr/bin/rm -f c:/msys64/var/cache/pacman/pkg/{autoconf,automake}*
# Build the installer
- rake rubybundle:ruby-%target_ruby%-%arch%
test_script:
# Run the built Ruby installer and install to c:/ri2-ruby
- ruby -e "Dir['packages/rubyinstaller/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
- gem install bundler
- 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
# Run the Ruby Spec Suite
- git clone https://github.com/ruby/mspec
- git clone https://github.com/ruby/spec
- ridk exec ruby -C spec ../mspec/bin/mspec -j --exclude "BasicObject#instance_eval evaluates string with given filename and negative linenumber"
# Run upload to github only on tag builds
- set DEPLOY_TAG=%APPVEYOR_REPO_TAG_NAME%
- IF DEFINED DEPLOY_TAG (
echo.%DEPLOY_TAG% | findstr /C:"%target_ruby%">nul && (
echo Upload %DEPLOY_TAG% &
ridk enable &&
c:/msys64/usr/bin/mkdir -p /home/appveyor/.gnupg &&
gpg --passphrase %GPGPASSWD% --decrypt appveyor-key.asc.asc | gpg --import &&
c:/msys64/usr/bin/mkdir artifacts &&
cp -v packages/rubyinstaller/recipes/installer-inno/%DEPLOY_TAG%-%arch%.exe packages/rubyinstaller/recipes/archive-7z/%DEPLOY_TAG%-%arch%.7z artifacts/ &&
ls artifacts/* | xargs -n1 gpg --verbose --detach-sign --armor &&
rake release:upload -- artifacts/* || ( exit 1 ) )
) || ( ruby -e "puts 'No release upload'" )
# Provide the rubyinstaller.exe files for download
artifacts:
- path: packages/rubyinstaller/recipes/installer-inno/ruby*-$(target_ruby)-*-$(arch).exe
name: Executable installer
- path: packages/rubyinstaller/recipes/archive-7z/ruby*-$(target_ruby)-*-$(arch).7z
name: Plain archive file
- path: packages/rubybundle/recipes/installer-inno/ruby*-$(target_ruby)-*-$(arch).exe
name: Executable installer with MYS2
- path: packages/rubybundle/recipes/archive-7z/ruby*-$(target_ruby)-*-$(arch).7z
name: Plain archive file 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.4.2"
arch: "x86"
build_ruby: "22"
MINGW_PACKAGE_PREFIX: "mingw-w64-i686"
MSYSTEM: "MINGW32"
- target_ruby: "2.4.2"
arch: "x64"
build_ruby: "23"
MINGW_PACKAGE_PREFIX: "mingw-w64-x86_64"
MSYSTEM: "MINGW64"
- target_ruby: "2.5.0"
arch: "x86"
build_ruby: "24"
MINGW_PACKAGE_PREFIX: "mingw-w64-i686"
MSYSTEM: "MINGW32"
- target_ruby: "2.5.0"
arch: "x64"
build_ruby: "24"
MINGW_PACKAGE_PREFIX: "mingw-w64-x86_64"
MSYSTEM: "MINGW64"