Skip to content

Commit

Permalink
Fix CI failure (#21)
Browse files Browse the repository at this point in the history
  • Loading branch information
yutannihilation authored Jul 6, 2023
1 parent 92f5c22 commit a1d192d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 14 deletions.
16 changes: 4 additions & 12 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,36 +18,28 @@ jobs:
fail-fast: false
matrix:
config:
- {os: windows-latest, r: 'release', rust-version: 'stable-msvc', rtools-version: '42'}
- {os: windows-latest, r: '4.1', rust-version: 'stable-msvc'}
- {os: windows-latest, r: 'release', rust-version: 'stable-msvc', rust-target: 'x86_64-pc-windows-gnu'}
- {os: macOS-latest, r: 'release', rust-version: 'stable'}
- {os: ubuntu-latest, r: 'release', rust-version: 'stable'}
- {os: ubuntu-latest, r: 'devel', rust-version: 'stable'}

env:
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
TOOLCHAIN: ${{ matrix.config.rust-version }}

steps:
- uses: actions/checkout@v2

- uses: actions-rs/toolchain@v1
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.config.rust-version }}
default: true

- name: Add Rust targets for R < 4.2 on Windows
if: startsWith(runner.os, 'Windows') && matrix.config.r == '4.1'
run: |
rustup target add x86_64-pc-windows-gnu
rustup target add i686-pc-windows-gnu
targets: ${{ matrix.config.rust-target }}

- uses: r-lib/actions/setup-pandoc@v2

- uses: r-lib/actions/setup-r@v2
with:
r-version: ${{ matrix.config.r }}
use-public-rspm: true
rtools-version: ${{ matrix.config.rtools-version }}

- uses: r-lib/actions/setup-r-dependencies@v2
with:
Expand Down
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,9 @@ This is a template package to demonstrate how to call Rust from R using the [ext

Before you can install this package, you need to install a working Rust toolchain. We recommend using [rustup.](https://rustup.rs/)

On Windows, you'll also have to add the `i686-pc-windows-gnu` and `x86_64-pc-windows-gnu` targets:
On Windows, you'll also have to add the `x86_64-pc-windows-gnu` target:
```
rustup target add x86_64-pc-windows-gnu
rustup target add i686-pc-windows-gnu
```

Once Rust is working, you can install this package via:
Expand Down

0 comments on commit a1d192d

Please sign in to comment.