Added MSDOS build and made improvements to pipeline configuration.

This commit is contained in:
Bart House
2020-12-16 00:43:59 -08:00
parent 5a6cf6a20f
commit 3a91d65bb6
+104 -73
View File
@@ -2,50 +2,46 @@ strategy:
matrix: matrix:
linux_focal_gcc8_minimal: linux_focal_gcc8_minimal:
imageName: 'ubuntu-20.04' imageName: 'ubuntu-20.04'
ccName: gcc-8 toolchainName: gcc8
cxxName: g++-8 buildTargetName: minimal
buildMinimalSetting: true
linux_focal_clang_all: linux_focal_clang_all:
imageName: 'ubuntu-20.04' imageName: 'ubuntu-20.04'
ccName: clang toolchainName: clang
cxxName: clang++ buildTargetName: all
buildMinimalSetting: false
linux_focal_gcc8_all: linux_focal_gcc8_all:
imageName: 'ubuntu-20.04' imageName: 'ubuntu-20.04'
ccName: gcc-8 toolchainName: gcc8
cxxName: g++-8 buildTargetName: all
buildMinimalSetting: false
linux_focal_gcc9_all: linux_focal_gcc9_all:
imageName: 'ubuntu-20.04' imageName: 'ubuntu-20.04'
ccName: gcc-9 toolchainName: gcc9
cxxName: g++-9 buildTargetName: all
buildMinimalSetting: false
linux_bionic_gcc7_all: linux_bionic_gcc7_all:
imageName: 'ubuntu-18.04' imageName: 'ubuntu-18.04'
ccName: gcc-7 toolchainName: gcc7
cxxName: g++-7 buildTargetName: all
buildMinimalSetting: false
# build is currently broken # build is currently broken
# mac_catalina_gcc8_all: # mac_catalina_gcc8_all:
# imageName: 'macOS-10.15' # imageName: 'macOS-10.15'
# ccName: gcc-8 # ccName: gcc-8
# cxxName: g++-8 # cxxName: g++-8
# buildMinimalSetting: false # buildSetting: 'all'
mac_catalina_clang_all: mac_catalina_clang_all:
imageName: 'macOS-10.15' imageName: 'macOS-10.15'
ccName: clang toolchainName: clang
cxxName: clang++ buildTargetName: all
buildMinimalSetting: false
windows-visualstudio: windows-visualstudio:
imageName: 'windows-2019' imageName: 'windows-2019'
buildMinimalSetting: false toolchainName: vs
vsBuildSetting: true buildTargetName: all
mingwBuildSetting: false
windows-mingw: windows-mingw:
imageName: 'windows-2019' imageName: 'windows-2019'
buildMinimalSetting: false toolchainName: mingw
vsBuildSetting: false buildTargetName: all
mingwBuildSetting: true linux_focal_cross_msdos:
imageName: 'ubuntu-20.04'
toolchainName: cross
buildTargetName: msdos
pool: pool:
vmImage: $(imageName) vmImage: $(imageName)
@@ -59,55 +55,78 @@ pool:
# endpoint: github.com_barthouse # endpoint: github.com_barthouse
variables: variables:
buildMinimal: $(buildMinimalSetting) toolchain: $(toolchainName)
mingwBuild: $(mingwBuildSetting) buildTarget: $(buildTargetName)
vsBuild: $(vsBuildSetting) netHackPath: s/NetHack
${{ if eq( variables['Agent.OS'], 'Windows_NT') }}:
NetHackPath: s\NetHack
${{ if ne( variables['Agent.OS'], 'Windows_NT') }}:
NetHackPath: s/NetHack
CC: $(ccName)
CXX: $(cxxName)
steps: steps:
# - bash: | - bash: |
# echo 'mingwBuildSetting' '$(mingwBuildSetting)' if [ "$(toolchain)" == "gcc7" ]
# echo 'mingwBuild' '$(mingwBuild)' then
# echo 'vsBuild' '$(vsBuild)' echo "##vso[task.setvariable variable=CC]gcc-7"
# echo 'NetHackPath' '$(NetHackPath)' echo "##vso[task.setvariable variable=CXX]g++-7"
# echo 'CC' '$(CC)' fi
# echo 'CXX' '$(CXX)' if [ "$(toolchain)" == "gcc8" ]
then
echo "##vso[task.setvariable variable=CC]gcc-8"
echo "##vso[task.setvariable variable=CXX]g++-8"
fi
if [ "$(toolchain)" == "gcc9" ]
then
echo "##vso[task.setvariable variable=CC]gcc-9"
echo "##vso[task.setvariable variable=CXX]g++-9"
fi
if [ "$(toolchain)" == "gcc10" ]
then
echo "##vso[task.setvariable variable=CC]gcc-10"
echo "##vso[task.setvariable variable=CXX]g++-10"
fi
if [ "$(toolchain)" == "clang" ]
then
echo "##vso[task.setvariable variable=CC]clang"
echo "##vso[task.setvariable variable=CXX]clang++"
fi
if [ "$(toolchain)" == "cross" ]
then
echo "##vso[task.setvariable variable=CC]gcc-8"
echo "##vso[task.setvariable variable=CXX]g++-8"
fi
displayName: 'Setting variables'
- checkout: git://NetHack/NetHack@NetHack-3.7 # $(Agent.BuildDirectory)\s\NetHack - bash: |
echo "toolchain: $(toolchain)"
echo "buildTarget: $(buildTarget)"
echo "netHackPath: $NETHACKPATH"
echo "CC: $CC"
echo "CXX: $CXX"
displayName: 'Echoing variables'
- checkout: git://NetHack/NetHackTest@pipeline-test
submodules: true submodules: true
path: $(NetHackPath) path: $(netHackPath) # $(Agent.BuildDirectory)/$(netHackPath)
# - checkout: pdcursesrepo
# path: s\NetHack\lib\pdcurses
# condition: and( eq( variables['Agent.OS'], 'Windows_NT' ), eq( variables.mingwBuild, true))
- task: DownloadSecureFile@1 - task: DownloadSecureFile@1
name: storeKey name: storeKey
displayName: 'Store Key Download'
inputs: inputs:
secureFile: 'NetHackPackage_StoreKey.pfx' secureFile: 'NetHackPackage_StoreKey.pfx'
condition: eq( variables['Agent.OS'], 'Windows_NT' ) condition: eq( variables.toolchain, 'vs' )
displayName: 'Store Key Download'
- task: CopyFiles@2 - task: CopyFiles@2
inputs: inputs:
contents: NetHackPackage_StoreKey.pfx contents: NetHackPackage_StoreKey.pfx
SourceFolder: $(Agent.TempDirectory) SourceFolder: $(Agent.TempDirectory)
TargetFolder: $(Agent.BuildDirectory)\s\NetHack\win\win32\vs TargetFolder: $(Agent.BuildDirectory)/$(netHackPath)/win/win32/vs
condition: eq( variables['Agent.OS'], 'Windows_NT' ) condition: eq( variables.toolchain, 'vs' )
displayName: 'Copying store key' displayName: 'Copying store key'
- task: MSBuild@1 - task: MSBuild@1
inputs: inputs:
solution: $(Agent.BuildDirectory)\s\NetHack\win\win32\vs\NetHack.sln solution: $(Agent.BuildDirectory)/$(netHackPath)/win/win32/vs/NetHack.sln
platform: Win32 platform: Win32
configuration: Debug configuration: Debug
condition: and( eq( variables['Agent.OS'], 'Windows_NT' ), eq( variables.vsBuild, true)) condition: eq( variables.toolchain, 'vs' )
displayName: 'Windows MSBuild' displayName: 'Visual Studio Build'
- bash: | - bash: |
export ADD_LUA=Y export ADD_LUA=Y
@@ -120,17 +139,27 @@ steps:
export TRAVIS_COMPILER=1 export TRAVIS_COMPILER=1
cp ../sys/winnt/Makefile.gcc ./Makefile cp ../sys/winnt/Makefile.gcc ./Makefile
mingw32-make LUA_VERSION=$LUA_VERSION install mingw32-make LUA_VERSION=$LUA_VERSION install
condition: and( eq( variables['Agent.OS'], 'Windows_NT' ), eq( variables.mingwBuild, true)) condition: eq( variables.toolchain, 'mingw' )
displayName: 'Windows MinGW Build' workingDirectory: $(Agent.BuildDirectory)/$(netHackPath)/src
workingDirectory: $(Agent.BuildDirectory)/s/NetHack/src displayName: 'MinGW Build'
- bash: | - bash: |
sudo apt-get -qq -y update sudo apt-get -qq -y update
sudo apt-get -qq -y install libncurses5-dev sudo apt-get -qq -y install libncurses5-dev
sudo apt-get -qq -y install libx11-dev libxaw7-dev xfonts-utils qtbase5-dev qtmultimedia5-dev qtbase5-dev-tools sudo apt-get -qq -y install libx11-dev libxaw7-dev xfonts-utils qtbase5-dev qtmultimedia5-dev qtbase5-dev-tools
condition: eq( variables['Agent.OS'], 'Linux' ) condition: eq( variables['Agent.OS'], 'Linux' )
workingDirectory: $(Agent.BuildDirectory)/$(netHackPath)
displayName: 'Getting linux build dependencies' displayName: 'Getting linux build dependencies'
workingDirectory: $(Agent.BuildDirectory)/s/NetHack
- bash: |
cd sys/unix
sh setup.sh hints/linux.2020
cd ../..
make fetch-lua
make WANT_WIN_ALL=1 QT_SELECT=5 MOC=moc all
condition: and(eq( variables['Agent.OS'], 'Linux' ), eq( variables.buildTarget, 'all'))
workingDirectory: $(Agent.BuildDirectory)/$(netHackPath)
displayName: 'Building linux full build'
- bash: | - bash: |
cd sys/unix cd sys/unix
@@ -155,22 +184,11 @@ steps:
sed -i '/^#define SHELL/d' include/unixconf.h sed -i '/^#define SHELL/d' include/unixconf.h
sed -i '/^#define SUSPEND/d' include/unixconf.h sed -i '/^#define SUSPEND/d' include/unixconf.h
sed -i 's/^#define TEXTCOLOR//' include/unixconf.h sed -i 's/^#define TEXTCOLOR//' include/unixconf.h
cat include/config.h
make fetch-lua make fetch-lua
make WANT_WIN_ALL=1 all make WANT_WIN_ALL=1 all
condition: and(eq( variables['Agent.OS'], 'Linux' ), eq( variables.buildMinimal, true)) condition: and(eq( variables['Agent.OS'], 'Linux' ), eq( variables.buildTarget, 'minimal'))
displayName: 'Building linux minimal build' displayName: 'Building linux minimal build'
workingDirectory: $(Agent.BuildDirectory)/s/NetHack workingDirectory: $(Agent.BuildDirectory)/$(netHackPath)
- bash: |
cd sys/unix
sh setup.sh hints/linux.2020
cd ../..
make fetch-lua
make WANT_WIN_ALL=1 QT_SELECT=5 MOC=moc all
condition: and(eq( variables['Agent.OS'], 'Linux' ), eq( variables.buildMinimal, false))
displayName: 'Building linux full build'
workingDirectory: $(Agent.BuildDirectory)/s/NetHack
- bash: | - bash: |
cd sys/unix cd sys/unix
@@ -179,5 +197,18 @@ steps:
make fetch-lua make fetch-lua
make all make all
condition: eq( variables['Agent.OS'], 'Darwin' ) condition: eq( variables['Agent.OS'], 'Darwin' )
displayName: 'Mac Build' workingDirectory: $(Agent.BuildDirectory)/$(netHackPath)
workingDirectory: $(Agent.BuildDirectory)/s/NetHack displayName: 'Building mac full build'
- bash: |
export GCCVER=gcc1010
cd sys/unix
sh setup.sh hints/linux.2020
cd ../..
make fetch-lua
sh sys/msdos/fetch-cross-compiler.sh
make LUA_VERSION=5.4.2 WANT_WIN_TTY=1 WANT_WIN_CURSES=1 CROSS_TO_MSDOS=1 all
make LUA_VERSION=5.4.2 WANT_WIN_TTY=1 WANT_WIN_CURSES=1 CROSS_TO_MSDOS=1 package
condition: and(eq( variables['Agent.OS'], 'Linux' ), eq( variables.toolchain, 'cross'))
workingDirectory: $(Agent.BuildDirectory)/$(netHackPath)
displayName: 'Building MSDOS build'