Revision 55ef78b5da2904eeed9088a0262a3f88750da489 authored by RJB Goudie on 08 October 2020, 08:43:51 UTC, committed by GitHub on 08 October 2020, 08:43:51 UTC
1 parent 5ab9dea
.azure-pipelines.yml
jobs:
- job: Windows_Build
displayName: win_build
timeoutInMinutes: 0
pool:
vmImage: 'windows-2019'
steps:
- script: |
echo on
curl -fsS -o c:\MSMpiSetup.exe https://download.microsoft.com/download/a/5/2/a5207ca5-1203-491a-8fb8-906fd68ae623/msmpisetup.exe
c:\MSMpiSetup.exe -unattend
set PATH=C:\Program Files\Microsoft MPI\Bin;%PATH%
displayName: Update MS-MPI to version 10.1.2
- script: |
echo on
curl -fsS -o c:\blackbox-1.7.2.zip https://www.multibugs.org/build/blackbox-1.7.2.zip
7z x c:\blackbox-1.7.2.zip -y -oc:\blackbox
curl -fsS -o c:\blackbox\bbscript.exe https://www.multibugs.org/build/bbscript.exe
displayName: Install BlackBox
- script: |
echo on
cd %BUILD_SOURCESDIRECTORY%
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars32.bat"
rc -fo Win/Rsrc/Bugslogo.res Win/Rsrc/Bugslogo.rc
cvtres -machine:ix86 -out:Bugslogo.obj Win/Rsrc/Bugslogo.res
cl /EHsc MultiBUGS.cpp /link shell32.lib Bugslogo.obj /subsystem:windows /entry:mainCRTStartup
c:\blackbox\bbscript.exe /USE %BUILD_SOURCESDIRECTORY% /PAR Developer/Make.odc
c:\blackbox\bbscript.exe /USE %BUILD_SOURCESDIRECTORY% /PAR Developer/LinkingWindows.odc
mkdir c:\MultiBUGS\Dynamic\Sym
mkdir c:\MultiBUGS\Dynamic\Code
displayName: Build MultiBUGS
- task: PublishPipelineArtifact@0
inputs:
artifactName: 'MultiBUGS-Windows'
targetPath: c:\MultiBUGS
- job: Windows_Tests
displayName: win
dependsOn: Windows_Build
strategy:
matrix:
1ch_1w_main:
CHAINS: '1'
WORKERS: '1'
SUITE: 'main'
2ch_1w_main:
CHAINS: '2'
WORKERS: '1'
SUITE: 'main'
1ch_2w_main:
CHAINS: '1'
WORKERS: '2'
SUITE: 'main'
1ch_1w_other:
CHAINS: '1'
WORKERS: '1'
SUITE: 'other'
2ch_1w_other:
CHAINS: '2'
WORKERS: '1'
SUITE: 'other'
1ch_2w_other:
CHAINS: '1'
WORKERS: '2'
SUITE: 'other'
pool:
vmImage: 'windows-2019'
steps:
- task: DownloadPipelineArtifact@0
inputs:
artifactName: 'MultiBUGS-Windows'
targetPath: c:\MultiBUGS
- script: |
echo on
curl -fsS -o c:\MSMpiSetup.exe https://download.microsoft.com/download/a/5/2/a5207ca5-1203-491a-8fb8-906fd68ae623/msmpisetup.exe
c:\MSMpiSetup.exe -unattend
set PATH=C:\Program Files\Microsoft MPI\Bin;%PATH%
displayName: Update MS-MPI to version 10.1.2
- script: |
echo on
set PATH=C:\Program Files\Microsoft MPI\Bin;%PATH%
Rscript.exe -e "Sys.setenv(TZ='GMT')" -e "install.packages(c(\"remotes\", \"xml2\"), repos=\"https://cloud.r-project.org\", type = \"binary\")" -e "remotes::install_github(c(\"MultiBUGS/R2MultiBUGS\", \"MultiBUGS/multibugstests\"))"
displayName: Install R and required packages
- script: |
echo on
set PATH=C:\Program Files\Microsoft MPI\Bin;C:\Program Files\R\R-3.5.1\bin\x64;%PATH%
IF "%SUITE%"=="main" Rscript.exe -e "multibugstests:::bugs_examples_all(n.workers = %WORKERS%, n.chains = %CHAINS%, report = \"junit\", exclude = c(\"StVeit\", \"Sixcomp\", \"Curves\", \"Hald\"))"
IF "%SUITE%"=="other" Rscript.exe -e "multibugstests:::bugs_examples_all(n.workers = %WORKERS%, n.chains = %CHAINS%, report = \"junit\", examples.dir = \"C:/MultiBUGS/Reliability/Examples/\")"
IF "%SUITE%"=="other" Rscript.exe -e "multibugstests:::bugs_examples_all(n.workers = %WORKERS%, n.chains = %CHAINS%, report = \"junit\", examples.dir = \"C:/MultiBUGS/GeoBUGS/Examples/\", exclude = c(\"MVCAR\"))"
displayName: Run tests
- task: PublishTestResults@2
inputs:
testResultsFiles: 'C:\MultiBUGS\TESTS-*$(WORKERS)workers-$(CHAINS)chains.xml'
mergeTestResults: true
testRunTitle: 'Windows: $(WORKERS) workers; $(CHAINS) chains; $(SUITE)'
condition: always()
displayName: 'Publish test results'
- job: Linux_Build
displayName: lin_build
timeoutInMinutes: 0
pool:
vmImage: 'ubuntu-16.04'
steps:
- script: |
sudo dpkg --add-architecture i386
sudo apt-get -qq -y update
sudo apt-get install libgtk2.0-0:i386 gtk2-engines:i386 gtk2-engines-murrine:i386 libcanberra-gtk-module:i386 gnome-icon-theme-full
# mpich installs libmpich12 which supplies libmpich.so.12
sudo apt-get install mpich:i386
# for building MultiBUGS.cpp
sudo apt-get install g++-multilib
displayName: Install 32-bit MPICH, and 32-bit GTK libraries
- script: |
git clone https://github.com/bbcb/bbcp.git ${AGENT_HOMEDIRECTORY}/bbcb
cd ${AGENT_HOMEDIRECTORY}/bbcb/BlackBox
./switch-target `uname -s` GUI
./build
displayName: Install BlackBox
- script: |
cd ${BUILD_SOURCESDIRECTORY}
# -s strips the binary of debug symbols to keep lintian happy
g++ -m32 -s -o MultiBUGS MultiBUGS.cpp
BBINSTALLDIR="${AGENT_HOMEDIRECTORY}/bbcb/BlackBox"
Developer/BuildLinux | ${BBINSTALLDIR}/run-dev0
cp -r ${BBINSTALLDIR}/Cons MultiBUGS-binary/
mkdir -p MultiBUGS-binary/Bugs/Code
mkdir -p MultiBUGS-binary/Compare/Code
mkdir -p MultiBUGS-binary/Correl/Code
mkdir -p MultiBUGS-binary/Dev/Code
mkdir -p MultiBUGS-binary/Deviance/Code
mkdir -p MultiBUGS-binary/Diff/Code
mkdir -p MultiBUGS-binary/Doodle/Code
mkdir -p MultiBUGS-binary/Dynamic/Code
mkdir -p MultiBUGS-binary/Graph/Code
mkdir -p MultiBUGS-binary/Html/Code
mkdir -p MultiBUGS-binary/Maps/Code
mkdir -p MultiBUGS-binary/Math/Code
mkdir -p MultiBUGS-binary/Models/Code
mkdir -p MultiBUGS-binary/Monitor/Code
mkdir -p MultiBUGS-binary/Parallel/Code
mkdir -p MultiBUGS-binary/Pharmaco/Code
mkdir -p MultiBUGS-binary/PKBugs/Code
mkdir -p MultiBUGS-binary/Plots/Code
mkdir -p MultiBUGS-binary/Ranks/Code
mkdir -p MultiBUGS-binary/Reliability/Code
mkdir -p MultiBUGS-binary/Samples/Code
mkdir -p MultiBUGS-binary/Spatial/Code
mkdir -p MultiBUGS-binary/Summary/Code
mkdir -p MultiBUGS-binary/Test/Code
mkdir -p MultiBUGS-binary/Updater/Code
mkdir -p MultiBUGS-binary/Form/Code
mkdir -p MultiBUGS-binary/Host/Code
mkdir -p MultiBUGS-binary/Lin/Code
mkdir -p MultiBUGS-binary/Ole/Code
mkdir -p MultiBUGS-binary/Std/Code
mkdir -p MultiBUGS-binary/System/Code
mkdir -p MultiBUGS-binary/Text/Code
mkdir -p MultiBUGS-binary/Win/Code
mkdir -p MultiBUGS-binary/Xhtml/Code
mkdir -p MultiBUGS-binary/Dev2/Code
mkdir -p MultiBUGS-binary/Gtk2/Code
mkdir -p MultiBUGS-binary/Code
mkdir -p MultiBUGS-binary/Cons
cp -r ${BBINSTALLDIR}/Form/Code/*.ocf MultiBUGS-binary/Form/Code
cp -r ${BBINSTALLDIR}/Host/Code/*.ocf MultiBUGS-binary/Host/Code
#cp -r ${BBINSTALLDIR}/Lin/Code/*.ocf MultiBUGS-binary/Lin/Code
#cp -r ${BBINSTALLDIR}/Ole/Code/*.ocf MultiBUGS-binary/Ole/Code
cp -r ${BBINSTALLDIR}/Std/Code/*.ocf MultiBUGS-binary/Std/Code
#cp -r ${BBINSTALLDIR}/System/Code/*.ocf MultiBUGS-binary/System/Code
cp -r ${BBINSTALLDIR}/Text/Code/*.ocf MultiBUGS-binary/Text/Code
#cp -r ${BBINSTALLDIR}/Win/Code/*.ocf MultiBUGS-binary/Win/Code
cp -r ${BBINSTALLDIR}/Xhtml/Code/*.ocf MultiBUGS-binary/Xhtml/Code
cp -r ${BBINSTALLDIR}/Dev2/Code/*.ocf MultiBUGS-binary/Dev2/Code
cp -r ${BBINSTALLDIR}/Gtk2/Code/*.ocf MultiBUGS-binary/Gtk2/Code
cp -r ${BBINSTALLDIR}/Code/*.ocf MultiBUGS-binary/Code
cp -r ${BBINSTALLDIR}/Cons/Code/*.ocf MultiBUGS-binary/Cons/Code
#cp -r Form/Code/*.ocf MultiBUGS-binary/Form/Code
cp -r Host/Code/*.ocf MultiBUGS-binary/Host/Code
#cp -r Lin/Code/*.ocf MultiBUGS-binary/Lin/Code
#cp -r Ole/Code/*.ocf MultiBUGS-binary/Ole/Code
cp -r Std/Code/*.ocf MultiBUGS-binary/Std/Code
#cp -r System/Code/*.ocf MultiBUGS-binary/System/Code
#cp -r Text/Code/*.ocf MultiBUGS-binary/Text/Code
#cp -r Win/Code/*.ocf MultiBUGS-binary/Win/Code
#cp -r Xhtml/Code/*.ocf MultiBUGS-binary/Xhtml/Code
#cp -r Dev2/Code/*.ocf MultiBUGS-binary/Dev2/Code
#cp -r Gtk2/Code/*.ocf MultiBUGS-binary/Gtk2/Code
cp -r Code/*.ocf MultiBUGS-binary/Code
#cp -r Cons/*.ocf MultiBUGS-binary/Cons
cp -r Bugs/Code/*.ocf MultiBUGS-binary/Bugs/Code
cp -r Compare/Code/*.ocf MultiBUGS-binary/Compare/Code
cp -r Correl/Code/*.ocf MultiBUGS-binary/Correl/Code
cp -r Dev/Code/*.ocf MultiBUGS-binary/Dev/Code
cp -r Deviance/Code/*.ocf MultiBUGS-binary/Deviance/Code
cp -r Diff/Code/*.ocf MultiBUGS-binary/Diff/Code
cp -r Doodle/Code/*.ocf MultiBUGS-binary/Doodle/Code
#cp -r Dynamic/Code/*.ocf MultiBUGS-binary/Dynamic/Code
cp -r Graph/Code/*.ocf MultiBUGS-binary/Graph/Code
#cp -r Html/Code/*.ocf MultiBUGS-binary/Html/Code
cp -r Maps/Code/*.ocf MultiBUGS-binary/Maps/Code
cp -r Math/Code/*.ocf MultiBUGS-binary/Math/Code
cp -r Models/Code/*.ocf MultiBUGS-binary/Models/Code
cp -r Monitor/Code/*.ocf MultiBUGS-binary/Monitor/Code
cp -r Parallel/Code/*.ocf MultiBUGS-binary/Parallel/Code
cp -r Pharmaco/Code/*.ocf MultiBUGS-binary/Pharmaco/Code
cp -r PKBugs/Code/*.ocf MultiBUGS-binary/PKBugs/Code
cp -r Plots/Code/*.ocf MultiBUGS-binary/Plots/Code
cp -r Ranks/Code/*.ocf MultiBUGS-binary/Ranks/Code
cp -r Reliability/Code/*.ocf MultiBUGS-binary/Reliability/Code
cp -r Samples/Code/*.ocf MultiBUGS-binary/Samples/Code
cp -r Spatial/Code/*.ocf MultiBUGS-binary/Spatial/Code
cp -r Summary/Code/*.ocf MultiBUGS-binary/Summary/Code
cp -r Test/Code/*.ocf MultiBUGS-binary/Test/Code
cp -r Updater/Code/*.ocf MultiBUGS-binary/Updater/Code
mkdir -p MultiBUGS-binary/Math/Sym
mkdir -p MultiBUGS-binary/Graph/Sym
mkdir -p MultiBUGS-binary/Dynamic/Sym
mkdir -p MultiBUGS-binary/Sym
cp Math/Sym/Func.osf MultiBUGS-binary/Math/Sym/Func.osf
cp Graph/Sym/Logical.osf MultiBUGS-binary/Graph/Sym/Logical.osf
cp Graph/Sym/Nodes.osf MultiBUGS-binary/Graph/Sym/Nodes.osf
cp Graph/Sym/Rules.osf MultiBUGS-binary/Graph/Sym/Rules.osf
cp Graph/Sym/Scalar.osf MultiBUGS-binary/Graph/Sym/Scalar.osf
cp Graph/Sym/Stochastic.osf MultiBUGS-binary/Graph/Sym/Stochastic.osf
#cp System/Sym/Math.osf MultiBUGS-binary/System/Sym/Math.osf
#cp System/Sym/Stores.osf MultiBUGS-binary/System/Sym/Stores.osf
#cp System/Sym/Stores64.osf MultiBUGS-binary/System/Sym/Stores64.osf
cp ${BBINSTALLDIR}/Sym/Math.osf MultiBUGS-binary/Sym/Math.osf
cp ${BBINSTALLDIR}/Sym/Stores.osf MultiBUGS-binary/Sym/Stores.osf
cp ${BBINSTALLDIR}/Sym/Stores64.osf MultiBUGS-binary/Sym/Stores64.osf
chmod +x MultiBUGS-binary/OpenBUGS
chmod +x MultiBUGS-binary/MultiBUGS
chmod +x MultiBUGS-binary/run-MultiBUGS
rm MultiBUGS-binary/MultiBUGS.exe
rm MultiBUGS-binary/libtaucs.dll
cp --recursive MultiBUGS-binary multibugs
tar --create --gzip --verbose --file=multibugs_2.0.tar.gz multibugs
displayName: Build MultiBUGS
- task: PublishPipelineArtifact@0
inputs:
artifactName: 'MultiBUGS-Linux'
targetPath: $(Build.SourcesDirectory)/MultiBUGS-binary
- task: PublishPipelineArtifact@0
inputs:
artifactName: 'multibugs_2.0.tar.gz'
targetPath: $(Build.SourcesDirectory)/multibugs_2.0.tar.gz
- script: |
cd ${BUILD_SOURCESDIRECTORY}
mv Developer/deb multibugs_2.0-1
mkdir -p multibugs_2.0-1/usr/lib/
mv MultiBUGS-binary multibugs_2.0-1/usr/lib/multibugs
find multibugs_2.0-1/usr/lib/multibugs -type d -print0 | xargs -0 chmod 0755
gzip --no-name --best multibugs_2.0-1/usr/share/doc/multibugs/changelog
gzip --no-name --best multibugs_2.0-1/usr/share/doc/multibugs/changelog.Debian
chmod +x multibugs_2.0-1/usr/bin/multibugs
chmod +x multibugs_2.0-1/usr/bin/multibugs-shortcut
chmod +x multibugs_2.0-1/usr/lib/multibugs/Developer/BuildLinux
fakeroot dpkg-deb --build multibugs_2.0-1
ls -la
sudo apt-get install lintian
lintian multibugs_2.0-1.deb
displayName: Create deb
- task: PublishPipelineArtifact@0
inputs:
artifactName: 'multibugs_2.0-1'
targetPath: $(Build.SourcesDirectory)/multibugs_2.0-1.deb
- job: Linux_Tests
displayName: lin
dependsOn: Linux_Build
strategy:
matrix:
1ch_1w_main:
CHAINS: '1'
WORKERS: '1'
MPI: 'apt'
SUITE: 'main'
2ch_1w_main:
CHAINS: '2'
WORKERS: '1'
MPI: 'source'
SUITE: 'main'
1ch_2w_main:
CHAINS: '1'
WORKERS: '2'
MPI: 'source'
SUITE: 'main'
1ch_1w_oth:
CHAINS: '1'
WORKERS: '1'
MPI: 'apt'
SUITE: 'other'
2ch_1w_oth:
CHAINS: '2'
WORKERS: '1'
MPI: 'source'
SUITE: 'other'
1ch_2w_oth:
CHAINS: '1'
WORKERS: '2'
MPI: 'source'
SUITE: 'other'
timeoutInMinutes: 0
pool:
vmImage: 'ubuntu-16.04'
steps:
- task: DownloadPipelineArtifact@0
inputs:
artifactName: 'MultiBUGS-Linux'
targetPath: $(Build.SourcesDirectory)/MultiBUGS-binary
- script: |
chmod +x $(Build.SourcesDirectory)/MultiBUGS-binary/MultiBUGS
chmod +x $(Build.SourcesDirectory)/MultiBUGS-binary/OpenBUGS
chmod +x $(Build.SourcesDirectory)/MultiBUGS-binary/run-MultiBUGS
displayName: Set permissions for MultiBUGS
- script: |
sudo dpkg --add-architecture i386
sudo add-apt-repository -y "deb https://cloud.r-project.org/bin/linux/ubuntu $(lsb_release -sc)-cran35/"
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9
sudo apt-get -qq -y update
sudo apt-get install r-base libgtk2.0-0:i386 gtk2-engines:i386 gtk2-engines-murrine:i386 libcanberra-gtk-module:i386 gnome-icon-theme-full
sudo apt-get install r-base-dev
sudo apt-get install g++-multilib
# By default, R_LIBS_USERS is not set, so need to allow package installation to site-library
sudo chmod o+w /usr/local/lib/R/site-library
if [ "$MPI" == "apt" ]; then
# mpich installs libmpich12 which supplies libmpich.so.12
sudo apt-get install mpich:i386
fi
if [ "$MPI" == "source" ]; then
sudo apt-get install -y software-properties-common curl
MPICH_VERSION=3.3.2
cd /tmp
curl --retry 3 https://www.mpich.org/static/downloads/${MPICH_VERSION}/mpich-${MPICH_VERSION}.tar.gz | tar xz
cd mpich-${MPICH_VERSION}
./configure --enable-fast=all,O3 CC=gcc MPICHLIB_CFLAGS=-m32 --prefix=/usr --with-device=ch3:sock --disable-fortran --disable-cxx
make -j 4
sudo make install
mpiexec --version
fi
displayName: Install R, 32-bit MPICH, and 32-bit GTK libraries
- script: |
Rscript -e "install.packages(c(\"remotes\", \"xml2\"), repos=\"https://packagemanager.rstudio.com/all/__linux__/xenial/latest\")" -e "remotes::install_github(c(\"MultiBUGS/R2MultiBUGS\", \"MultiBUGS/multibugstests\"))"
displayName: Install required R packages
- script: |
mkdir -p /tmp/.X11-unix
sudo chmod 1777 /tmp/.X11-unix
sudo chown root /tmp/.X11-unix/
Xvfb :99 -screen 0 1024x768x24 </dev/null &
sleep 5
export DISPLAY=":99"
cd ${BUILD_SOURCESDIRECTORY}/MultiBUGS-binary
if [ "$SUITE" == "main" ]; then
Rscript -e "multibugstests:::bugs_examples_all(dir = \"${BUILD_SOURCESDIRECTORY}/MultiBUGS-binary/\", n.workers = ${WORKERS}, n.chains = ${CHAINS}, report = \"junit\", exclude = c(\"StVeit\", \"Sixcomp\", \"Curves\", \"Hald\"))"
fi
if [ "$SUITE" == "other" ]; then
Rscript -e "multibugstests:::bugs_examples_all(dir = \"${BUILD_SOURCESDIRECTORY}/MultiBUGS-binary/\", n.workers = ${WORKERS}, n.chains = ${CHAINS}, report = \"junit\", examples.dir = \"${BUILD_SOURCESDIRECTORY}/MultiBUGS-binary/Reliability/Examples/\", exclude = c(\"InvGaussian\", \"WeibullShifted\"))"
Rscript -e "multibugstests:::bugs_examples_all(dir = \"${BUILD_SOURCESDIRECTORY}/MultiBUGS-binary/\", n.workers = ${WORKERS}, n.chains = ${CHAINS}, report = \"junit\", examples.dir = \"${BUILD_SOURCESDIRECTORY}/MultiBUGS-binary/GeoBUGS/Examples/\", exclude = c(\"MVCAR\"))"
fi
#timeoutInMinutes: 5
continueOnError: true
displayName: Run tests
- script: |
cd ${BUILD_SOURCESDIRECTORY}/MultiBUGS-binary
DISPLAY=:99 import -window root screenshot-${WORKERS}workers-${CHAINS}chains-${SUITE}.png
condition: always()
displayName: Take screenshot of final result
- task: PublishPipelineArtifact@0
inputs:
artifactName: 'Linux screenshot: $(WORKERS) workers; $(CHAINS) chains; $(SUITE)'
targetPath: '$(Build.SourcesDirectory)/MultiBUGS-binary/screenshot-$(WORKERS)workers-$(CHAINS)chains-$(SUITE).png'
condition: always()
displayName: Publish screenshot of final result
- task: PublishTestResults@2
inputs:
testResultsFiles: '$(Build.SourcesDirectory)/MultiBUGS-binary/TESTS-*$(WORKERS)workers-$(CHAINS)chains.xml'
mergeTestResults: true
testRunTitle: 'Linux: $(WORKERS)workers; $(CHAINS)chains; $(SUITE)'
condition: always()
displayName: 'Publish test results'
schedules:
- cron: "0 0 * * *"
displayName: Daily UTC midnight build
branches:
include:
- master
always: true
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...