Skip to content

Commit

Permalink
Address the release of R 4.2 (extendr#104)
Browse files Browse the repository at this point in the history
  • Loading branch information
yutannihilation authored and CGMossa committed Jan 21, 2024
1 parent f354ed7 commit 1031849
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 24,730 deletions.
24 changes: 14 additions & 10 deletions .github/workflows/test.yml
Expand Up @@ -29,11 +29,12 @@ jobs:
# options:
# - targets: Targets to build and run tests against. If not specified, 'default' will be used.
# - no-test-targets: Targets to skip tests.
# - emit-bindings: If 'true', emit binding no matter which Rust version is used (by default, the bindings are emitted only with stable Rust).
- {os: windows-latest, r: 'release', rust-version: 'stable-msvc', targets: ['x86_64-pc-windows-gnu', 'i686-pc-windows-gnu']}
- {os: windows-latest, r: 'release', rust-version: 'nightly-msvc', targets: ['x86_64-pc-windows-gnu', 'i686-pc-windows-gnu']}
- {os: windows-latest, r: 'devel', rust-version: 'stable-gnu', targets: ['x86_64-pc-windows-gnu'], rtools-version: '42'}
- {os: windows-latest, r: 'oldrel', rust-version: 'stable-msvc', targets: ['x86_64-pc-windows-gnu', 'i686-pc-windows-gnu']}
- {os: windows-latest, r: 'release', rust-version: 'stable-gnu', targets: ['x86_64-pc-windows-gnu'], rtools-version: '42'}
- {os: windows-latest, r: 'release', rust-version: 'nightly-gnu', targets: ['x86_64-pc-windows-gnu'], rtools-version: '42'}
- {os: windows-latest, r: 'devel', rust-version: 'stable-gnu', targets: ['x86_64-pc-windows-gnu'], rtools-version: '42'}
# For R < 4.2, the MSVC toolchain is used to support cross-compilation for the 32-bit.
# Change this to the GNU toolchain as well when 'oldrel' points to R 4.2 or above.
- {os: windows-latest, r: 'oldrel', rust-version: 'stable-msvc', targets: ['x86_64-pc-windows-gnu', 'i686-pc-windows-gnu']}

#- {os: macOS-latest, r: 'release', rust-version: 'stable'}
- {os: macOS-latest, r: 'release', rust-version: 'nightly'}
Expand Down Expand Up @@ -227,8 +228,12 @@ jobs:
fail-fast: false
matrix:
config:
- {os: windows-latest, r: 'release', rust-version: 'stable-msvc', targets: ['x86_64-pc-windows-gnu', 'i686-pc-windows-gnu']}
- {os: windows-latest, r: 'release', rust-version: 'stable-gnu', targets: ['x86_64-pc-windows-gnu'], rtools-version: '42'}
- {os: windows-latest, r: 'devel', rust-version: 'stable-gnu', targets: ['x86_64-pc-windows-gnu'], rtools-version: '42'}
# For R < 4.2, the MSVC toolchain is used to support cross-compilation for the 32-bit.
# TODO: Remove this runner when we drop the support for R < 4.2
- {os: windows-latest, r: '4.1', rust-version: 'stable-msvc', targets: ['x86_64-pc-windows-gnu', 'i686-pc-windows-gnu']}

env:
RSPM: ${{ matrix.config.rspm }}

Expand Down Expand Up @@ -270,7 +275,7 @@ jobs:
RUST_TARGETS: ${{ join(matrix.config.targets, ',')}}

- name: Configure Windows for Rtools 42
if: runner.os == 'Windows' && matrix.config.rtools-version == '42'
if: runner.os == 'Windows' && matrix.config.r != '4.1'
run: |
echo "C:\rtools42\x86_64-w64-mingw32.static.posix\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append ;
echo "C:\rtools42\usr\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append ;
Expand Down Expand Up @@ -314,10 +319,9 @@ jobs:
LIBRARY_PATH = "${pwd_slash}/libgcc_mock"
"@ | Out-File -FilePath .cargo/config.toml -Encoding utf8 -Append ;
# TODO: Remove this step when we drop the support for R < 4.2
- name: Configure Windows for Rtools 40
if: runner.os == 'Windows' && matrix.config.rtools-version != '42'
# 1. Put rtools' mingw on PATH
# 2. Add R's i386/x64 to PATH
if: runner.os == 'Windows' && matrix.config.r == '4.1'
run: |
if ($env:RUST_TARGETS -like "*x86_64*") {
echo "C:\rtools40\mingw64\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append ;
Expand Down

0 comments on commit 1031849

Please sign in to comment.