From 3b2bca012849fe2ba0948c9ad3fde4f06f782684 Mon Sep 17 00:00:00 2001 From: Richard Beare Date: Thu, 26 Sep 2019 11:09:48 +1000 Subject: [PATCH 01/12] Minimal windows config, temporarily deleting others --- azure-pipelines.yml | 69 ++------------------------------------------- 1 file changed, 2 insertions(+), 67 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 9e135ff..291e744 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -2,11 +2,11 @@ trigger: - master jobs: - - job: Linux + - job: Windows timeoutInMinutes: 0 cancelTimeoutInMinutes: 300 pool: - vmImage: 'Ubuntu-16.04' + vmImage: 'windows-latest' steps: - checkout: self @@ -17,71 +17,6 @@ jobs: if [ -n "$(System.PullRequest.SourceCommitId)" ]; then git checkout $(System.PullRequest.SourceCommitId) fi - - bash: | - set -x - sudo apt-get update - sudo apt-get -y install software-properties-common libcurl4-openssl-dev libssh2-1-dev - sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9 - sudo add-apt-repository -y "deb https://cloud.r-project.org/bin/linux/ubuntu xenial/" - sudo apt-get update - sudo apt-get -y install r-base-dev - displayName: System Dependencies - workingDirectory: $(Agent.BuildDirectory) - - bash: | - set -x - mkdir $(Agent.WorkFolder)/Rlibs - R -e "install.packages('devtools', lib=c('${R_LIBS}'), repo='http://cloud.r-project.org/')" - displayName: 'Intall R packages' - workingDirectory: $(Agent.BuildDirectory) - env: - R_LIBS: $(Agent.WorkFolder)/Rlibs - - bash: | - set -x - c++ --version - cmake --version - which R - R --version - R -e "devtools::install(c('$(Build.SourcesDirectory)'), lib=c('${R_LIBS}'), args=c('--configure-vars="MAKEJ=2"'))" - displayName: Build and test - env: - R_LIBS: $(Agent.WorkFolder)/Rlibs - ITK_GLOBAL_DEFAULT_NUMBER_OF_THREADS: 2 - workingDirectory: $(Agent.BuildDirectory) - - job: macOS - timeoutInMinutes: 0 - cancelTimeoutInMinutes: 300 - pool: - vmImage: 'macOS-10.13' - - steps: - - checkout: self - clean: true - fetchDepth: 5 - - bash: | - set -x - if [ -n "$(System.PullRequest.SourceCommitId)" ]; then - git checkout $(System.PullRequest.SourceCommitId) - fi - - bash: | - set -x - curl -L https://cran.cnr.berkeley.edu/bin/macosx/R-3.5.2.pkg -o R.pkg - sudo installer -pkg R.pkg -target / - mkdir $(Agent.WorkFolder)/Rlibs - - R -e "install.packages('https://cran.r-project.org/bin/macosx/el-capitan/contrib/3.5/git2r_0.24.0.tgz', lib=c('${R_LIBS}'), repo=NULL)" - R -e "install.packages('devtools', lib=c('${R_LIBS}'), repo='http://cloud.r-project.org/')" - displayName: 'Intall R and packages' - workingDirectory: $(Agent.BuildDirectory) - env: - R_LIBS: $(Agent.WorkFolder)/Rlibs - - bash: | - set -x - c++ --version - cmake --version - which R - R --version - R -e "devtools::install(c('$(Build.SourcesDirectory)'), lib=c('${R_LIBS}'), args=c('--configure-vars="MAKEJ=2"'))" - df -h displayName: Build and test env: R_LIBS: $(Agent.WorkFolder)/Rlibs From fff371548565566879d776aab498af9201aa352d Mon Sep 17 00:00:00 2001 From: Richard Beare Date: Thu, 26 Sep 2019 11:20:50 +1000 Subject: [PATCH 02/12] Attempting to use wget --- azure-pipelines.yml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 291e744..c84e65b 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -17,8 +17,9 @@ jobs: if [ -n "$(System.PullRequest.SourceCommitId)" ]; then git checkout $(System.PullRequest.SourceCommitId) fi - displayName: Build and test - env: - R_LIBS: $(Agent.WorkFolder)/Rlibs - ITK_GLOBAL_DEFAULT_NUMBER_OF_THREADS: 2 - workingDirectory: $(Agent.BuildDirectory) + displayName: GitCheckout + - bash: | + set -x + wget https://cloud.r-project.org/bin/windows/base/R-3.6.1-win.exe + wget https://cloud.r-project.org/bin/windows/Rtools/Rtools35.exe + displayName: RStuff \ No newline at end of file From a8bef90971b1bd32849e5865f4035802f0980290 Mon Sep 17 00:00:00 2001 From: Richard Beare Date: Thu, 26 Sep 2019 11:23:17 +1000 Subject: [PATCH 03/12] tabs --- azure-pipelines.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index c84e65b..b274d93 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -17,9 +17,9 @@ jobs: if [ -n "$(System.PullRequest.SourceCommitId)" ]; then git checkout $(System.PullRequest.SourceCommitId) fi - displayName: GitCheckout + displayName: GitCheckout - bash: | set -x - wget https://cloud.r-project.org/bin/windows/base/R-3.6.1-win.exe - wget https://cloud.r-project.org/bin/windows/Rtools/Rtools35.exe - displayName: RStuff \ No newline at end of file + wget https://cloud.r-project.org/bin/windows/base/R-3.6.1-win.exe + wget https://cloud.r-project.org/bin/windows/Rtools/Rtools35.exe + displayName: RStuff From 0cb7958511853877987238b0835093af099a281a Mon Sep 17 00:00:00 2001 From: Richard Beare Date: Thu, 26 Sep 2019 12:13:12 +1000 Subject: [PATCH 04/12] package install mingw --- azure-pipelines.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index b274d93..d1178e2 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -18,8 +18,9 @@ jobs: git checkout $(System.PullRequest.SourceCommitId) fi displayName: GitCheckout - - bash: | + - shell: | set -x + mingw-get install wget wget https://cloud.r-project.org/bin/windows/base/R-3.6.1-win.exe wget https://cloud.r-project.org/bin/windows/Rtools/Rtools35.exe displayName: RStuff From f7e3d377180c74d1e3b8dd382366c9a7925d74b9 Mon Sep 17 00:00:00 2001 From: Richard Beare Date: Thu, 26 Sep 2019 12:18:03 +1000 Subject: [PATCH 05/12] package install mingw --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index d1178e2..6e1ce55 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -18,7 +18,7 @@ jobs: git checkout $(System.PullRequest.SourceCommitId) fi displayName: GitCheckout - - shell: | + - bash: | set -x mingw-get install wget wget https://cloud.r-project.org/bin/windows/base/R-3.6.1-win.exe From 80a3f4444b6a5552b18f83571e21c59a61d3e510 Mon Sep 17 00:00:00 2001 From: Richard Beare Date: Thu, 26 Sep 2019 12:24:59 +1000 Subject: [PATCH 06/12] curl download --- azure-pipelines.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 6e1ce55..ca4f293 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -20,7 +20,6 @@ jobs: displayName: GitCheckout - bash: | set -x - mingw-get install wget - wget https://cloud.r-project.org/bin/windows/base/R-3.6.1-win.exe - wget https://cloud.r-project.org/bin/windows/Rtools/Rtools35.exe + curl https://cloud.r-project.org/bin/windows/base/R-3.6.1-win.exe -o R-3.6.1-win.exe + curl https://cloud.r-project.org/bin/windows/Rtools/Rtools35.exe -o Rtools35.exe displayName: RStuff From eff87879d2f3530353f713df89560d636af70b9b Mon Sep 17 00:00:00 2001 From: Richard Beare Date: Thu, 26 Sep 2019 13:01:25 +1000 Subject: [PATCH 07/12] Running R installer --- azure-pipelines.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index ca4f293..9bbd007 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -22,4 +22,5 @@ jobs: set -x curl https://cloud.r-project.org/bin/windows/base/R-3.6.1-win.exe -o R-3.6.1-win.exe curl https://cloud.r-project.org/bin/windows/Rtools/Rtools35.exe -o Rtools35.exe + ./R-3.6.1-win.exe displayName: RStuff From 1751ad4133dfd12aab158bb8da4931aadb5b822f Mon Sep 17 00:00:00 2001 From: Richard Beare Date: Thu, 26 Sep 2019 13:32:04 +1000 Subject: [PATCH 08/12] Command line arguments for R installer --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 9bbd007..aed5912 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -22,5 +22,5 @@ jobs: set -x curl https://cloud.r-project.org/bin/windows/base/R-3.6.1-win.exe -o R-3.6.1-win.exe curl https://cloud.r-project.org/bin/windows/Rtools/Rtools35.exe -o Rtools35.exe - ./R-3.6.1-win.exe + ./R-3.6.1-win.exe /DIR="c:\Program Files\R" /GROUP="R" /COMPONENTS="main,x86_64,translations" displayName: RStuff From f417ddc7e6e296d05042d469bb6d295722982e09 Mon Sep 17 00:00:00 2001 From: Richard Beare Date: Thu, 26 Sep 2019 17:22:34 +1000 Subject: [PATCH 09/12] testing stuff from github rlib/r-azure-pipelines --- azure-pipelines.yml | 28 +++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index aed5912..d4a813b 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -1,14 +1,33 @@ trigger: - master +resources: + repositories: + - repository: r-azure-pipelines + type: github + name: r-lib/r-azure-pipelines + endpoint: r-lib + +parameters: + R_LIBS_USER: '$(Agent.BuildDirectory)/R/library' + CRAN: 'https://cloud.r-project.org' + coverage: true + env: {} + jobs: - job: Windows timeoutInMinutes: 0 - cancelTimeoutInMinutes: 300 + cancelTimeoutInMinutes: 10 + variables: + CRAN: ${{parameters.CRAN}} + R_LIBS_USER: ${{parameters.R_LIBS_USER}} + CI: true + ${{ insert }}: ${{ parameters.env }} pool: vmImage: 'windows-latest' steps: + - template: templates/r-setup-windows.yml - checkout: self clean: true fetchDepth: 5 @@ -18,9 +37,4 @@ jobs: git checkout $(System.PullRequest.SourceCommitId) fi displayName: GitCheckout - - bash: | - set -x - curl https://cloud.r-project.org/bin/windows/base/R-3.6.1-win.exe -o R-3.6.1-win.exe - curl https://cloud.r-project.org/bin/windows/Rtools/Rtools35.exe -o Rtools35.exe - ./R-3.6.1-win.exe /DIR="c:\Program Files\R" /GROUP="R" /COMPONENTS="main,x86_64,translations" - displayName: RStuff + From 17ba473cbc906904d8b7491433a7b8ab9cb8ab8e Mon Sep 17 00:00:00 2001 From: Richard Beare Date: Thu, 26 Sep 2019 17:40:58 +1000 Subject: [PATCH 10/12] copied sections from templates --- azure-pipelines.yml | 33 +++++++++++++-------------------- 1 file changed, 13 insertions(+), 20 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index d4a813b..a883c03 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -1,33 +1,26 @@ + + trigger: - master -resources: - repositories: - - repository: r-azure-pipelines - type: github - name: r-lib/r-azure-pipelines - endpoint: r-lib - -parameters: - R_LIBS_USER: '$(Agent.BuildDirectory)/R/library' - CRAN: 'https://cloud.r-project.org' - coverage: true - env: {} - jobs: - job: Windows timeoutInMinutes: 0 cancelTimeoutInMinutes: 10 - variables: - CRAN: ${{parameters.CRAN}} - R_LIBS_USER: ${{parameters.R_LIBS_USER}} - CI: true - ${{ insert }}: ${{ parameters.env }} pool: vmImage: 'windows-latest' - +# r installation from https://github.com/r-lib/r-azure-pipelines/ steps: - - template: templates/r-setup-windows.yml + - pwsh: | + choco install r.project -y --no-progress + Invoke-WebRequest "https://github.com/hannesmuehleisen/choco-rtools/raw/master/rtools.3.5.0.nupkg" -OutFile "..\rtools.3.5.0.nupkg" + choco install rtools -s ..\rtools.3.5.0.nupkg -f -y --no-progress + # Set the timezone + tzutil /s "GMT Standard Time" + displayName: 'Installing R' + - pwsh: | + Write-Host "##vso[task.setvariable variable=PATH]C:\Rtools\bin;C:\Rtools\mingw_64\bin;${env:PATH};C:\Progra~1\R\R-3.6.1\bin" + displayName: 'Setting PATH' - checkout: self clean: true fetchDepth: 5 From 7decd128e2e27c9bc5a2797d59b8fdde84b9e87a Mon Sep 17 00:00:00 2001 From: Richard Beare Date: Thu, 26 Sep 2019 18:05:02 +1000 Subject: [PATCH 11/12] Standard build attempt with windows. --- azure-pipelines.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index a883c03..a72689d 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -15,6 +15,7 @@ jobs: choco install r.project -y --no-progress Invoke-WebRequest "https://github.com/hannesmuehleisen/choco-rtools/raw/master/rtools.3.5.0.nupkg" -OutFile "..\rtools.3.5.0.nupkg" choco install rtools -s ..\rtools.3.5.0.nupkg -f -y --no-progress + choco install ninja # Set the timezone tzutil /s "GMT Standard Time" displayName: 'Installing R' @@ -30,4 +31,17 @@ jobs: git checkout $(System.PullRequest.SourceCommitId) fi displayName: GitCheckout + - bash: | + set -x + c++ --version + cmake --version + which R + R --version + R -e "devtools::install(c('$(Build.SourcesDirectory)'), lib=c('${R_LIBS}'), args=c('--configure-vars="MAKEJ=2"'))" + df -h + displayName: Build and test + env: + R_LIBS: $(Agent.WorkFolder)/Rlibs + ITK_GLOBAL_DEFAULT_NUMBER_OF_THREADS: 2 + workingDirectory: $(Agent.BuildDirectory) From 980e99fdaeb045789c7277c9d912ba956583f6d2 Mon Sep 17 00:00:00 2001 From: Richard Beare Date: Thu, 26 Sep 2019 18:11:14 +1000 Subject: [PATCH 12/12] install devtools --- azure-pipelines.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index a72689d..76ae8cf 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -31,6 +31,13 @@ jobs: git checkout $(System.PullRequest.SourceCommitId) fi displayName: GitCheckout + - bash: | + Rscript -e "install.packages(c('devtools'), lib=c('${R_LIBS}'), repo='http://cloud.r-project.org/')" + displayName: 'Intall R packages' + workingDirectory: $(Agent.BuildDirectory) + env: + R_LIBS: $(Agent.WorkFolder)/Rlibs + - bash: | set -x c++ --version