]> granicus.if.org Git - fortune-mod/blob - .github/workflows/windows-x64.yml
7931c4c2c04950d87e65e4cf3b33d691e6ad643f
[fortune-mod] / .github / workflows / windows-x64.yml
1 # This file is GENERATED BY
2 # CI-testing/translate-travis.yml-to-github-actions.py
3 jobs:
4     perl:
5         runs-on: windows-latest
6         steps:
7         -   name: Setup perl
8             uses: shogo82148/actions-setup-perl@v1
9             with:
10                 distribution: strawberry
11                 perl-version: ${{ matrix.perl-version }}
12         -   name: Set git to use LF
13             run: 'git config --global core.autocrlf false
14
15                 git config --global core.eol lf
16
17                 '
18         -   uses: actions/checkout@v2
19             with:
20                 submodules: 'true'
21         -   name: perl -V
22             run: perl -V
23         -   uses: cygwin/cygwin-install-action@master
24             with:
25                 packages: docbook-xml docbook-xsl libxml2 libxslt
26         -   name: install cpanm and mult modules
27             uses: perl-actions/install-with-cpanm@v1
28             with:
29                 install: 'App::Docmake
30
31                     Code::TidyAll::Plugin::ClangFormat
32
33                     Code::TidyAll::Plugin::Flake8
34
35                     Code::TidyAll::Plugin::TestCount
36
37                     Env::Path
38
39                     File::Find::Object
40
41                     List::Util
42
43                     Path::Tiny
44
45                     Perl::Critic
46
47                     Perl::Tidy
48
49                     String::ShellQuote
50
51                     Test::Code::TidyAll
52
53                     Test::Differences
54
55                     Test::RunValgrind
56
57                     Test::TrailingSpace
58
59                     Test::Trap'
60         -   name: install and test_script code
61             run: '@echo on
62
63                 SET MSYSTEM=MINGW64
64
65                 SET VERBOSE=1
66
67                 c:\msys64\usr\bin\bash -lc "pacman --noconfirm -Syuu" || ( echo Failed
68                 & exit /B 1 )
69
70                 perl -v || ( echo Failed & exit /B 1 )
71
72                 IF NOT EXIST C:\Perl5 mkdir C:\Perl5 || ( echo Failed & exit /B 1
73                 )
74
75                 SET PERL5LIB=%PERL5LIB%;C:/Perl5/lib/perl5
76
77                 SET PERL_LOCAL_LIB_ROOT=C:/Perl5
78
79                 SET PERL_MB_OPT=--install_base C:/Perl5
80
81                 SET PERL_MM_OPT=INSTALL_BASE=C:/Perl5
82
83                 if not exist C:\libtap mkdir C:\libtap || ( echo Failed & exit /B
84                 1 )
85
86                 copy C:\msys64\mingw64\bin\mingw32-make.exe C:\msys64\mingw64\bin\make.exe
87                 || ( echo Failed & exit /B 1 )
88
89                 perl -v || ( echo Failed & exit /B 1 )
90
91                 curl -o C:\libtap\gperf-3.0.4.tar.gz http://ftp.gnu.org/pub/gnu/gperf/gperf-3.0.4.tar.gz
92                 || ( echo Failed & exit /B 1 )
93
94                 copy C:\libtap\gperf-3.0.4.tar.gz . || ( echo Failed & exit /B 1 )
95
96                 tar -xvf gperf-3.0.4.tar.gz || ( echo Failed & exit /B 1 )
97
98                 cd gperf-3.0.4 && perl -e "if (-e qq#C:\\libtap\\bin\\gperf.exe#)
99                 { exit(0); } $ENV{PATH} = qq#C:\\msys64\\mingw64\\bin;$ENV{PATH}#;
100                 system(''sh configure --prefix=C:/libtap'') or system(''gmake'') or
101                 system(''gmake install'');" && cd .. || ( echo Failed & exit /B 1
102                 )
103
104                 git clone https://github.com/clibs/cmocka libtap || ( echo Failed
105                 & exit /B 1 )
106
107                 mkdir libtap\b || ( echo Failed & exit /B 1 )
108
109                 cd libtap\b || ( echo Failed & exit /B 1 )
110
111                 cmake -G "MinGW Makefiles"  -DCMAKE_INSTALL_PREFIX=C:\libtap .. ||
112                 ( echo Failed & exit /B 1 )
113
114                 echo %PATH% || ( echo Failed & exit /B 1 )
115
116                 gmake || ( echo Failed & exit /B 1 )
117
118                 gmake install || ( echo Failed & exit /B 1 )
119
120                 cd ..\..\ || ( echo Failed & exit /B 1 )
121
122                 git clone https://github.com/shlomif/rinutils rinutils || ( echo Failed
123                 & exit /B 1 )
124
125                 mkdir rinutils\b || ( echo Failed & exit /B 1 )
126
127                 cd rinutils\b || ( echo Failed & exit /B 1 )
128
129                 cmake -G "MinGW Makefiles" -DWITH_TEST_SUITE=OFF  -DCMAKE_INSTALL_PREFIX=C:\libtap
130                 .. || ( echo Failed & exit /B 1 )
131
132                 echo %PATH% || ( echo Failed & exit /B 1 )
133
134                 gmake || ( echo Failed & exit /B 1 )
135
136                 gmake install || ( echo Failed & exit /B 1 )
137
138                 SET MYOLDPATH_=%PATH%
139
140                 mkdir ..\b32 || ( echo Failed & exit /B 1 )
141
142                 cd ..\b32 || ( echo Failed & exit /B 1 )
143
144                 cmake -G "MinGW Makefiles" -DWITH_TEST_SUITE=OFF  -DCMAKE_INSTALL_PREFIX=C:\libtap32
145                 .. || ( echo Failed & exit /B 1 )
146
147                 echo %PATH% || ( echo Failed & exit /B 1 )
148
149                 gmake || ( echo Failed & exit /B 1 )
150
151                 gmake install || ( echo Failed & exit /B 1 )
152
153                 SET PATH=%MYOLDPATH_%
154
155                 cd ..\..\ || ( echo Failed & exit /B 1 )
156
157                 set CPATH=c:\mingw64\include;c:\msys64\mingw64\include
158
159                 set LIBRARY_PATH=c:\mingw64\lib;c:\msys64\mingw64\lib
160
161                 set PATH=%PATH%;c:\mingw64\lib;c:\mingw64\bin;c:\msys64\mingw64\lib;c:\msys64\mingw64\bin
162
163                 SET PATH=%PATH%;C:\Python35-x64
164
165                 SET FORTUNE_TEST_DEBUG=1
166
167                 SET DOCMAKE_PATH_PREFIX="C:\cygwin\bin;"
168
169                 SET SKIP_RINUTILS_INSTALL=1
170
171                 perl CI-testing/continuous-integration-testing.pl --gen="MinGW Makefiles"
172                 || ( echo Failed & exit /B 1 )
173
174                 '
175             shell: cmd
176         strategy:
177             fail-fast: true
178             matrix:
179                 perl-version:
180                 - '5.30'
181 name: windows-x64
182 'on':
183 - push