3 linux_latest_gcc9_minimal:
4 imageName: 'ubuntu-latest'
6 buildTargetName: minimal
8 imageName: 'ubuntu-22.04'
12 imageName: 'ubuntu-22.04'
15 linux_jammy_gcc12_all:
16 imageName: 'ubuntu-22.04'
19 macOS_latest_clang_all:
20 imageName: 'macOS-latest'
23 macOS_Ventura_clang13_all:
28 imageName: 'windows-latest'
32 imageName: 'windows-2019'
35 linux_focal_cross_msdos:
36 imageName: 'ubuntu-20.04'
38 buildTargetName: msdos
40 imageName: 'ubuntu-22.04'
50 # - repository: pdcursesrepo
52 # name: wmcbrine/PDCurses
53 # ref: refs/heads/master
54 # endpoint: github.com_barthouse
57 toolchain: $(toolchainName)
58 buildTarget: $(buildTargetName)
59 netHackPath: s/NetHack
63 if [ "$(toolchain)" == "gcc7" ]
65 echo "##vso[task.setvariable variable=CC]gcc-7"
66 echo "##vso[task.setvariable variable=CXX]g++-7"
68 if [ "$(toolchain)" == "gcc9" ]
70 echo "##vso[task.setvariable variable=CC]gcc-9"
71 echo "##vso[task.setvariable variable=CXX]g++-9"
73 if [ "$(toolchain)" == "gcc10" ]
75 echo "##vso[task.setvariable variable=CC]gcc-10"
76 echo "##vso[task.setvariable variable=CXX]g++-10"
78 if [ "$(toolchain)" == "gcc11" ]
80 echo "##vso[task.setvariable variable=CC]gcc-11"
81 echo "##vso[task.setvariable variable=CXX]g++-11"
83 if [ "$(toolchain)" == "gcc12" ]
85 echo "##vso[task.setvariable variable=CC]gcc-12"
86 echo "##vso[task.setvariable variable=CXX]g++-12"
88 if [ "$(toolchain)" == "clang" ]
90 echo "##vso[task.setvariable variable=CC]clang"
91 echo "##vso[task.setvariable variable=CXX]clang++"
93 if [ "$(toolchain)" == "cross" ]
95 echo "##vso[task.setvariable variable=CC]gcc-9"
96 echo "##vso[task.setvariable variable=CXX]g++-9"
98 displayName: 'Setting variables'
101 echo "toolchain: $(toolchain)"
102 echo "buildTarget: $(buildTarget)"
103 echo "netHackPath: $NETHACKPATH"
106 displayName: 'Echoing variables'
108 - checkout: git://NetHack/NetHack@NetHack-3.7
110 path: $(netHackPath) # $(Agent.BuildDirectory)/$(netHackPath)
112 - task: DownloadSecureFile@1
115 secureFile: 'NetHackPackage_StoreKey.pfx'
116 condition: eq( variables.toolchain, 'vs' )
117 displayName: 'Store Key Download'
121 contents: NetHackPackage_StoreKey.pfx
122 SourceFolder: $(Agent.TempDirectory)
123 TargetFolder: $(Agent.BuildDirectory)/$(netHackPath)/sys/windows/vs
124 condition: eq( variables.toolchain, 'vs' )
125 displayName: 'Copying store key'
129 solution: $(Agent.BuildDirectory)/$(netHackPath)/sys/windows/vs/NetHack.sln
132 condition: eq( variables.toolchain, 'vs' )
133 displayName: 'Visual Studio Build'
138 export LUATOP=../submodules/lua
139 export LUASRC=../submodules/lua
141 export PDCURSES_TOP=../submodules/pdcursesmod
142 export LUA_VERSION=5.4.6
145 #export CURLSRC=https://github.com/brechtsanders/winlibs_mingw/releases/download/11.2.0-9.0.0-ucrt-r5/winlibs-x86_64-posix-seh-gcc-11.2.0-mingw-w64ucrt-9.0.0-r5.zip
146 #export CURLDST=mingw-x64.zip
147 #export MINGWBIN=mingw64
148 #export MSYSTEM=MINGW64
151 export CURLSRC=https://github.com/brechtsanders/winlibs_mingw/releases/download/11.2.0-9.0.0-ucrt-r5/winlibs-i686-posix-dwarf-gcc-11.2.0-mingw-w64ucrt-9.0.0-r5.zip
152 export CURLDST=mingw-x86.zip
153 export MINGWBIN=mingw32
154 export MSYSTEM=MINGW32
159 curl -L $CURLSRC -o $CURLDST
160 #tar -C mingw -xvf $CURLDST
161 #/c/Windows/System32/tar -C mingw -xvf $CURLDST
162 powershell -command "Expand-Archive -Force $CURLDST mingw"
163 export PATH=../lib/mingw/$MINGWBIN/bin:$PATH
167 cp ../sys/windows/Makefile.mingw32* .
168 mingw32-make -f Makefile.mingw32 CI_COMPILER=1 GIT=1 MSYSTEM=$MSYSTEM LUA_VERSION=$LUA_VERSION clean
169 mingw32-make -f Makefile.mingw32 CI_COMPILER=1 GIT=1 MSYSTEM=$MSYSTEM LUA_VERSION=$LUA_VERSION depend
170 mingw32-make -f Makefile.mingw32 CI_COMPILER=1 GIT=1 MSYSTEM=$MSYSTEM LUA_VERSION=$LUA_VERSION
171 condition: eq( variables.toolchain, 'mingw' )
172 workingDirectory: $(Agent.BuildDirectory)/$(netHackPath)/src
173 displayName: 'MinGW Build'
176 sudo apt-get -qq -y update
177 sudo apt-get -qq -y install libncurses5-dev
178 sudo apt-get -qq -y install libx11-dev libxaw7-dev xfonts-utils qtbase5-dev qtmultimedia5-dev qtbase5-dev-tools
179 condition: eq( variables['Agent.OS'], 'Linux' )
180 workingDirectory: $(Agent.BuildDirectory)/$(netHackPath)
181 displayName: 'Getting linux build dependencies'
185 sh setup.sh hints/linux.370
188 make WANT_WIN_ALL=1 QT_SELECT=5 MOC=moc all
189 condition: and(eq( variables['Agent.OS'], 'Linux' ), eq( variables.buildTarget, 'all'))
190 workingDirectory: $(Agent.BuildDirectory)/$(netHackPath)
191 displayName: 'Building linux full build'
195 sh setup.sh hints/linux-minimal
197 sed -i '/^#define CLIPPING/d' include/config.h
198 sed -i '/^#define COMPRESS/d' include/config.h
199 #sed -i '/^#define DOAGAIN/d' include/config.h
200 sed -i '/^#define DUMPLOG/d' include/config.h
201 #sed -i '/^#define GDBPATH/d' include/config.h
202 #sed -i '/^#define GREPPATH/d' include/config.h
203 sed -i '/^#define INSURANCE/d' include/config.h
204 sed -i '/^#define ENHANCED_SYMBOLS/d' include/config.h
205 sed -i '/^#define LOGFILE/d' include/config.h
206 sed -i '/^#define NEWS/d' include/config.h
207 sed -i '/^#define PANICLOG/d' include/config.h
208 #sed -i '/^#define STATUS_HILITES/d' include/config.h
209 sed -i '/^#define SYSCF/d' include/config.h
210 sed -i '/^#define USER_SOUNDS/d' include/config.h
211 sed -i '/^#define XLOGFILE/d' include/config.h
212 sed -i '/^#define HANGUPHANDLING/d' include/global.h
213 sed -i '/^#define MAIL/d' include/unixconf.h
214 sed -i '/^#define SHELL/d' include/unixconf.h
215 sed -i '/^#define SUSPEND/d' include/unixconf.h
216 sed -i 's/^#define TEXTCOLOR//' include/unixconf.h
218 make WANT_WIN_ALL=1 all
219 condition: and(eq( variables['Agent.OS'], 'Linux' ), eq( variables.buildTarget, 'minimal'))
220 displayName: 'Building linux minimal build'
221 workingDirectory: $(Agent.BuildDirectory)/$(netHackPath)
225 sh setup.sh hints/macos.370
228 make WANT_MACSOUND=1 all
229 condition: eq( variables['Agent.OS'], 'Darwin' )
230 workingDirectory: $(Agent.BuildDirectory)/$(netHackPath)
231 displayName: 'Building mac full build'
234 export GCCVER=gcc1220
236 sh setup.sh hints/linux.370
239 sh sys/msdos/fetch-cross-compiler.sh
241 if [ $retVal -eq 0 ]; then
242 make LUA_VERSION=5.4.6 WANT_WIN_TTY=1 WANT_WIN_CURSES=1 CROSS_TO_MSDOS=1 package
244 condition: and(eq( variables['Agent.OS'], 'Linux' ), eq( variables.toolchain, 'cross'))
245 workingDirectory: $(Agent.BuildDirectory)/$(netHackPath)
246 displayName: 'Building MSDOS build'
248 sudo apt-get install texlive
252 condition: and(eq( variables['Agent.OS'], 'Linux' ), eq( variables.toolchain, 'docs'))
253 workingDirectory: $(Agent.BuildDirectory)/$(netHackPath)
254 displayName: 'Building NetHack documentation'