One-char typo fix (#316) #845
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples | |
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help | |
on: | |
push: | |
branches: [main, master] | |
pull_request: | |
branches: [main, master] | |
name: R-CMD-check | |
jobs: | |
R-CMD-check: | |
runs-on: ${{ matrix.config.os }} | |
defaults: | |
run: | |
shell: bash | |
name: "${{ matrix.config.os }} (R: ${{ matrix.config.r }}, rust: ${{ matrix.config.rust }})" | |
strategy: | |
fail-fast: false | |
matrix: | |
config: | |
- {os: macos-latest, r: 'release', rust: 'stable'} | |
- {os: windows-latest, r: 'release', rust: 'stable'} | |
- {os: ubuntu-latest, r: 'release', rust: 'stable'} | |
- {os: ubuntu-latest, r: 'devel', rust: 'stable', http-user-agent: 'release'} | |
- {os: ubuntu-latest, r: 'release', rust: 'nightly'} | |
env: | |
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | |
R_KEEP_PKG_SOURCE: yes | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@nightly | |
if: matrix.config.rust == 'nightly' | |
- uses: r-lib/actions/setup-r@v2 | |
with: | |
r-version: ${{ matrix.config.r }} | |
http-user-agent: ${{ matrix.config.http-user-agent }} | |
use-public-rspm: true | |
- uses: r-lib/actions/setup-r-dependencies@v2 | |
with: | |
extra-packages: | | |
any::rcmdcheck | |
github::yutannihilation/savvy-helper-R-package | |
needs: check | |
working-directory: R-package | |
- name: Run cargo test | |
run: | | |
cargo test --manifest-path=./savvy-macro/Cargo.toml | |
cargo test --manifest-path=./savvy-bindgen/Cargo.toml | |
cargo test --manifest-path=./savvy-cli/Cargo.toml | |
# run `savvy-cli test` to test savvy itself | |
cargo r-test --features complex | |
# run `savvy-cli test` on R-package to test `savvy-cli test` | |
cargo r-test ./R-package/src/rust/ | |
- name: Tweak | |
run: | | |
cat - <<EOF > ./R-package/src/rust/Cargo.toml | |
[package] | |
name = "simple-savvy" | |
version = "0.1.0" | |
edition = "2021" | |
[lib] | |
crate-type = ["staticlib"] | |
[dependencies] | |
savvy = { path = "../savvy", features = ["complex", "altrep", "logger"] } | |
savvy-ffi = { path = "../savvy/savvy-ffi" } | |
[workspace.package] | |
version = "0.1.0" | |
edition = "2021" | |
authors = ["Hiroaki Yutani"] | |
license = "MIT" | |
repository = "https://github.com/yutannihilation/savvy/" | |
EOF | |
mkdir ./R-package/src/savvy | |
mv src/ Cargo.toml build.rs ./R-package/src/savvy/ | |
mv savvy-macro/ ./R-package/src/savvy/ | |
mv savvy-bindgen/ ./R-package/src/savvy/ | |
mv savvy-ffi/ ./R-package/src/savvy/ | |
- uses: r-lib/actions/check-r-package@v2 | |
with: | |
args: 'c("--no-manual")' # no --as-cran | |
upload-snapshots: true | |
working-directory: R-package |