@@ -41,13 +41,20 @@ jobs:
41
41
with :
42
42
python-version : ' 3.x'
43
43
44
- - name : Download and install Rtools45
44
+ - name : Download and Install Rtools45
45
45
if : runner.os == 'Windows'
46
46
run : |
47
47
$ARCH = if ('${{ matrix.os }}' -eq 'windows-11-arm') { 'aarch64' } else { 'x86_64' }
48
48
$RTOOLS = if ('${{ matrix.os }}' -eq 'windows-11-arm') { "rtools45-$ARCH" } else { 'rtools45' }
49
- Invoke-WebRequest -Uri https://github.com/r-hub/rtools45/releases/download/latest/$RTOOLS.exe -OutFile "$RTOOLS.exe"
50
- Start-Process -FilePath "$RTOOLS.exe" -ArgumentList "/install /norestart /verysilent /SUPPRESSMSGBOXES" -NoNewWindow -Wait
49
+
50
+ # Installation will hang if the toolchain is already installed
51
+ if (-Not $(Test-Path -Path "C:/$RTOOLS")) {
52
+ Invoke-WebRequest `
53
+ -Uri https://github.com/r-hub/rtools45/releases/download/latest/$RTOOLS.exe `
54
+ -OutFile "$RTOOLS.exe"
55
+ Start-Process -FilePath "$RTOOLS.exe" -ArgumentList "/INSTALL /VERYSILENT /SUPPRESSMSGBOXES" -Wait
56
+ }
57
+
51
58
echo "C:/$RTOOLS/usr/bin;C:/$RTOOLS/$ARCH-w64-mingw32.static.posix/bin" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
52
59
echo "$(pwd)/lib/tbb" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
53
60
@@ -85,13 +92,20 @@ jobs:
85
92
with :
86
93
python-version : ' 3.x'
87
94
88
- - name : Download and install Rtools45
95
+ - name : Download and Install Rtools45
89
96
if : runner.os == 'Windows'
90
97
run : |
91
98
$ARCH = if ('${{ matrix.os }}' -eq 'windows-11-arm') { 'aarch64' } else { 'x86_64' }
92
99
$RTOOLS = if ('${{ matrix.os }}' -eq 'windows-11-arm') { "rtools45-$ARCH" } else { 'rtools45' }
93
- Invoke-WebRequest -Uri https://github.com/r-hub/rtools45/releases/download/latest/$RTOOLS.exe -OutFile "$RTOOLS.exe"
94
- Start-Process -FilePath "$RTOOLS.exe" -ArgumentList "/install /norestart /verysilent /SUPPRESSMSGBOXES" -NoNewWindow -Wait
100
+
101
+ # Installation will hang if the toolchain is already installed
102
+ if (-Not $(Test-Path -Path "C:/$RTOOLS")) {
103
+ Invoke-WebRequest `
104
+ -Uri https://github.com/r-hub/rtools45/releases/download/latest/$RTOOLS.exe `
105
+ -OutFile "$RTOOLS.exe"
106
+ Start-Process -FilePath "$RTOOLS.exe" -ArgumentList "/INSTALL /VERYSILENT /SUPPRESSMSGBOXES" -Wait
107
+ }
108
+
95
109
echo "C:/$RTOOLS/usr/bin;C:/$RTOOLS/$ARCH-w64-mingw32.static.posix/bin" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
96
110
echo "$(pwd)/lib/tbb" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
97
111
0 commit comments