diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index df54321..5ad60f6 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -45,13 +45,13 @@ jobs: - name: build env: RUSTFLAGS: -Cinstrument-coverage - run: cargo build --features inhibit --verbose + run: cargo build -p afrim-memory -p afrim-preprocessor -p afrim-translator -p afrim-config -p afrim --verbose - name: test env: RUSTFLAGS: -Cinstrument-coverage LLVM_PROFILE_FILE: name-%p-%m.profraw - run: cargo test --verbose + run: cargo test -p afrim-memory -p afrim-preprocessor -p afrim-translator -p afrim-config -p afrim --verbose - name: Run grcov run: | diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index c591141..f87dad1 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -46,17 +46,17 @@ jobs: cargo fmt -- --check - name: Clippy - run: cargo clippy --all-targets -- -D warnings + run: cargo clippy --all-targets --all-features -- -D warnings - name: Build - run: cargo build --verbose + run: cargo build --all-features --verbose - - name: Run tests - run: | - cargo test --lib --bins --tests --verbose ${{matrix.extra}} - cargo test --benches ${{matrix.extra}} + - name: Run tests (minimal) + run: cargo test --no-default-features --lib --bins --tests --verbose ${{matrix.extra}} + + - name: Run tests (normal) + run: cargo test --lib --bins --tests --verbose ${{matrix.extra}} + + - name: Run tests (full) + run: cargo test --all-features --lib --bins --tests --verbose ${{matrix.extra}} - - name: Check compatibility with Wasm - run: | - rustup target add wasm32-unknown-unknown - cargo build -p afrim-translator -p afrim-preprocessor --target wasm32-unknown-unknown --all-features diff --git a/.github/workflows/web.yml b/.github/workflows/web.yml new file mode 100644 index 0000000..c4e2d45 --- /dev/null +++ b/.github/workflows/web.yml @@ -0,0 +1,35 @@ +name: Web + +on: + workflow_dispatch: + push: + branches: [main, release-*] + pull_request: + branches: [main, release-*] + +env: + CARGO_TERM_COLOR: always + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - uses: Swatinem/rust-cache@v2 + - uses: awalsh128/cache-apt-pkgs-action@latest + with: + packages: libxtst-dev libevdev-dev libxdo-dev + version: 1.0 + + - name: Add components + run: rustup component add clippy + + - name: Add wasm target + run: rustup target add wasm32-unknown-unknown + + - name: Clippy + run: cargo clippy -p afrim-translator -p afrim-memory -p afrim-preprocessor --target wasm32-unknown-unknown --all-features + + - name: Build + run: cargo build -p afrim-translator -p afrim-memory -p afrim-preprocessor --target wasm32-unknown-unknown --all-features diff --git a/Cargo.toml b/Cargo.toml index d15f054..0c3fd02 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -6,5 +6,6 @@ members = [ "engine/preprocessor", "engine/translator", ] +default-members = ["service"] resolver = "2"