Skip to content

Commit c24178e

Browse files
committed
Authorization header, split download and install
1 parent 1c75cf0 commit c24178e

1 file changed

Lines changed: 23 additions & 5 deletions

File tree

.github/workflows/main.yml

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55
pull_request:
66
branches: [ develop, master ]
77
push:
8-
branches: [ develop ]
8+
branches: [ develop, rate-limits ]
99
paths-ignore:
1010
- 'doygen/**'
1111
- 'hooks/**'
@@ -41,12 +41,21 @@ jobs:
4141
with:
4242
python-version: '3.x'
4343

44-
- name: Download and install Rtools45
44+
- name: Download Rtools45
4545
if: runner.os == 'Windows'
4646
run: |
4747
$ARCH = if ('${{ matrix.os }}' -eq 'windows-11-arm') { 'aarch64' } else { 'x86_64' }
4848
$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"
49+
echo $ARCH | Out-File -Append -FilePath $env:GITHUB_ENV -Encoding utf8
50+
echo $RTOOLS | Out-File -Append -FilePath $env:GITHUB_ENV -Encoding utf8
51+
Invoke-WebRequest `
52+
-Uri https://github.com/r-hub/rtools45/releases/download/latest/$RTOOLS.exe `
53+
-Headers @{ 'Authorization' = "Bearer ${{ secrets.GITHUB_TOKEN }}" } `
54+
-OutFile "$RTOOLS.exe"
55+
56+
- name: Install Rtools45
57+
if: runner.os == 'Windows'
58+
run: |
5059
Start-Process -FilePath "$RTOOLS.exe" -ArgumentList "/install /norestart /verysilent /SUPPRESSMSGBOXES" -NoNewWindow -Wait
5160
echo "C:/$RTOOLS/usr/bin;C:/$RTOOLS/$ARCH-w64-mingw32.static.posix/bin" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
5261
echo "$(pwd)/lib/tbb" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
@@ -85,12 +94,21 @@ jobs:
8594
with:
8695
python-version: '3.x'
8796

88-
- name: Download and install Rtools45
97+
- name: Download Rtools45
8998
if: runner.os == 'Windows'
9099
run: |
91100
$ARCH = if ('${{ matrix.os }}' -eq 'windows-11-arm') { 'aarch64' } else { 'x86_64' }
92101
$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"
102+
echo $ARCH | Out-File -Append -FilePath $env:GITHUB_ENV -Encoding utf8
103+
echo $RTOOLS | Out-File -Append -FilePath $env:GITHUB_ENV -Encoding utf8
104+
Invoke-WebRequest `
105+
-Uri https://github.com/r-hub/rtools45/releases/download/latest/$RTOOLS.exe `
106+
-Headers @{ 'Authorization' = "Bearer ${{ secrets.GITHUB_TOKEN }}" } `
107+
-OutFile "$RTOOLS.exe"
108+
109+
- name: Install Rtools45
110+
if: runner.os == 'Windows'
111+
run: |
94112
Start-Process -FilePath "$RTOOLS.exe" -ArgumentList "/install /norestart /verysilent /SUPPRESSMSGBOXES" -NoNewWindow -Wait
95113
echo "C:/$RTOOLS/usr/bin;C:/$RTOOLS/$ARCH-w64-mingw32.static.posix/bin" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
96114
echo "$(pwd)/lib/tbb" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8

0 commit comments

Comments
 (0)