Skip to content

Fix guide

Fix guide #585

on:
push:
branches: [main, master]
pull_request:
branches: [main, master]
name: Check WASM and ARM64 build
jobs:
build-wasm:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v4
- 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/
shell: bash
- name: Build wasm packages
uses: r-wasm/actions/build-rwasm@main
with:
packages: "local::./R-package"
# check at least it can build
build-arm64:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
targets: aarch64-unknown-linux-gnu
- name: Install GCC toolchain for ARM
run: |
sudo apt-get update
sudo apt-get install -y gcc-aarch64-linux-gnu
- name: Build
run: cargo build --target aarch64-unknown-linux-gnu