[WIP] Use CompactString as backing storage for Steel strings. #1279
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
name: Build | |
on: | |
push: | |
branches: [master] | |
pull_request: | |
branches: [master] | |
jobs: | |
test: | |
name: Test Suite | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Install Rust toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
profile: minimal | |
override: true | |
- name: Remove sync feature from build | |
run: sed -i 's/"dylib-build", "sync"/"dylib-build"/' Cargo.toml | |
- name: Set the STEEL_HOME environment variable | |
run: echo STEEL_HOME=${PWD}/.steel >> $GITHUB_ENV | |
- uses: Swatinem/rust-cache@v2 | |
with: | |
shared-key: "build" | |
- name: Build | |
run: cargo build --no-default-features --verbose | |
- name: install steel dylib installer | |
env: | |
STEEL_HOME: ${{ env.STEEL_HOME }} | |
run: mkdir -p $STEEL_HOME/native && cd crates/cargo-steel-lib && cargo install --path . | |
- name: Install cogs | |
env: | |
STEEL_HOME: ${{ env.STEEL_HOME }} | |
run: | | |
echo $STEEL_HOME | |
mkdir -p .steel/cogs | |
cd cogs/ | |
cargo run --no-default-features -- install.scm | |
- uses: actions-rs/cargo@v1 | |
env: | |
STEEL_HOME: ${{ env.STEEL_HOME }} | |
with: | |
command: test | |
args: --all --no-default-features | |
- name: install cargo-tarpaulin | |
run: cargo install cargo-tarpaulin | |
- name: run code coverage | |
run: cargo tarpaulin --all --no-default-features -o "lcov" --engine llvm | |
- name: Coveralls GitHub Action | |
uses: coverallsapp/[email protected] | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
path-to-lcov: ./lcov.info | |
sync-build: | |
name: Test Suite (sync) | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Install Rust toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
profile: minimal | |
override: true | |
- name: Set the STEEL_HOME environment variable | |
run: echo STEEL_HOME=${PWD}/.steel-sync >> $GITHUB_ENV | |
- uses: Swatinem/rust-cache@v2 | |
with: | |
shared-key: "build" | |
- name: Build | |
run: cargo build --verbose | |
- name: install steel dylib installer | |
env: | |
STEEL_HOME: ${{ env.STEEL_HOME }} | |
run: mkdir -p $STEEL_HOME/native && cd crates/cargo-steel-lib && cargo install --path . | |
- name: Install cogs | |
env: | |
STEEL_HOME: ${{ env.STEEL_HOME }} | |
run: | | |
echo $STEEL_HOME | |
mkdir -p .steel/cogs | |
cd cogs/ | |
cargo run -- install.scm | |
- uses: actions-rs/cargo@v1 | |
env: | |
STEEL_HOME: ${{ env.STEEL_HOME }} | |
with: | |
command: test | |
args: --all steel-core/sync | |
wasm-build: | |
name: Wasm32 build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Install Rust toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
profile: minimal | |
override: true | |
- name: Build wasm32-unknown-unknown | |
run: | | |
cd crates/steel-core/ | |
rustup target add wasm32-unknown-unknown | |
cargo build --target wasm32-unknown-unknown | |
rustfmt: | |
name: Rustfmt | |
runs-on: ubuntu-latest | |
needs: test | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Install Rust toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
profile: minimal | |
override: true | |
components: rustfmt | |
- name: Check formatting | |
uses: actions-rs/cargo@v1 | |
with: | |
command: fmt | |
args: --all -- --check | |