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..4df963a 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -43,20 +43,20 @@ jobs: - name: Rustfmt run: | - cargo fmt -- --check + cargo fmt --all-features -- --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) + 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..fcffe4d --- /dev/null +++ b/.github/workflows/web.yml @@ -0,0 +1,36 @@ +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 rustfmt + + - 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"