Add basic CI conf (#3)
* Add basic CI conf * Pull in submodules in Rustfmt job * Exclude WASI from workspace; fix name clash in memory crate * Refactor CI conf
This commit is contained in:
61
.github/workflows/main.yml
vendored
Normal file
61
.github/workflows/main.yml
vendored
Normal file
@@ -0,0 +1,61 @@
|
|||||||
|
name: CI
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
pull_request:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
rustfmt:
|
||||||
|
name: Rustfmt
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v1
|
||||||
|
with:
|
||||||
|
submodules: true
|
||||||
|
- name: Install Rust
|
||||||
|
run: |
|
||||||
|
rustup update stable
|
||||||
|
rustup default stable
|
||||||
|
rustup component add rustfmt
|
||||||
|
- name: Cargo fmt
|
||||||
|
run: cargo fmt --all -- --check
|
||||||
|
|
||||||
|
build:
|
||||||
|
name: Build
|
||||||
|
runs-on: ${{ matrix.os }}-latest
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
os: [ubuntu, macOS, windows]
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v1
|
||||||
|
with:
|
||||||
|
submodules: true
|
||||||
|
- name: Install Rust
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
rustup update stable
|
||||||
|
rustup default stable
|
||||||
|
- name: Build
|
||||||
|
run: cargo build --all --release -vv
|
||||||
|
|
||||||
|
test:
|
||||||
|
name: Test
|
||||||
|
runs-on: ${{ matrix.os }}-latest
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
os: [ubuntu, macOS, windows]
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v1
|
||||||
|
with:
|
||||||
|
submodules: true
|
||||||
|
- name: Install Rust
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
rustup update stable
|
||||||
|
rustup default stable
|
||||||
|
- name: Test
|
||||||
|
run: cargo test --all
|
||||||
@@ -9,4 +9,8 @@ generate = { path = "crates/generate" }
|
|||||||
memory = { path = "crates/memory" }
|
memory = { path = "crates/memory" }
|
||||||
|
|
||||||
[workspace]
|
[workspace]
|
||||||
members = ["crates/generate"]
|
members = [
|
||||||
|
"crates/generate",
|
||||||
|
"crates/memory"
|
||||||
|
]
|
||||||
|
exclude = ["crates/WASI"]
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ mod guest_type;
|
|||||||
mod memory;
|
mod memory;
|
||||||
mod region;
|
mod region;
|
||||||
|
|
||||||
|
pub use self::memory::{GuestMemory, GuestPtr, GuestPtrMut, GuestRef, GuestRefMut};
|
||||||
pub use error::GuestError;
|
pub use error::GuestError;
|
||||||
pub use guest_type::{GuestErrorType, GuestType, GuestTypeClone, GuestTypeCopy, GuestTypePtr};
|
pub use guest_type::{GuestErrorType, GuestType, GuestTypeClone, GuestTypeCopy, GuestTypePtr};
|
||||||
pub use memory::{GuestMemory, GuestPtr, GuestPtrMut, GuestRef, GuestRefMut};
|
|
||||||
pub use region::Region;
|
pub use region::Region;
|
||||||
|
|||||||
Reference in New Issue
Block a user