wip #8
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: Test changes | |
on: | |
push: | |
branches: "*" | |
pull_request: | |
env: | |
RUSTFLAGS: -Dwarnings | |
jobs: | |
test: | |
runs-on: ${{ matrix.os }} | |
if: ${{ !startsWith(github.ref, 'refs/tags/v') }} | |
strategy: | |
matrix: | |
include: | |
- os: ubuntu-22.04 | |
- os: windows-2022 | |
steps: | |
- name: checkout | |
uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: rust version | |
run: rustc -V | |
- name: cache | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
target/ | |
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
- name: build workspace without default features | |
run: cargo build --workspace --no-default-features | |
- name: build workspace with all features | |
run: cargo build --workspace --all-features | |
- name: clippy | |
run: cargo clippy --workspace | |
- name: check examples | |
run: | | |
cd examples/template | |
cargo add relib_module --path ../../module --package module | |
cargo add relib_host --path ../../host --package host | |
cargo rm relib_interface --package host | |
cargo rm relib_interface --package host --build | |
cargo add relib_interface --path ../../interface --package host --features include | |
cargo add relib_interface --path ../../interface --package host --features build --build | |
cargo rm relib_interface --package module | |
cargo rm relib_interface --package module --build | |
cargo add relib_interface --path ../../interface --package module --features include | |
cargo add relib_interface --path ../../interface --package module --features build --build | |
cargo build --workspace | |
cargo clippy --workspace | |
cargo build --workspace --features unloading | |
cargo clippy --workspace --features unloading | |
cd ../abi_stable_usage | |
cargo build --workspace | |
cargo clippy --workspace | |
cargo build --workspace --features unloading | |
cargo clippy --workspace --features unloading | |
cd ../custom_global_alloc | |
cargo build --workspace | |
cargo clippy --workspace | |
cargo build --workspace --features unloading | |
cargo clippy --workspace --features unloading | |
cd ../live_reload | |
cargo build --workspace | |
cargo clippy --workspace | |
cd ../export_main_macro | |
cargo build --workspace | |
cargo clippy --workspace |