fix #8
This file contains hidden or 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: CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| build: | |
| name: Build (${{ matrix.os }}) | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, windows-latest, macos-latest] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: rustfmt, clippy | |
| - name: Cache cargo registry & build | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cargo/registry | |
| ~/.cargo/git | |
| target | |
| key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
| restore-keys: ${{ runner.os }}-cargo- | |
| - name: Install AT-SPI2 dev libs (Linux only) | |
| if: runner.os == 'Linux' | |
| run: sudo apt-get update && sudo apt-get install -y libatspi2.0-dev libdbus-1-dev | |
| - name: Build | |
| run: cargo build --release | |
| - name: Check formatting | |
| run: cargo fmt -- --check | |
| - name: Clippy | |
| run: cargo clippy -- -D warnings || true | |
| sdk-python: | |
| name: Python SDK | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| - name: Install SDK | |
| run: | | |
| cd sdk/python | |
| pip install . | |
| - name: Import test | |
| run: python -c "from oculos import OculOS; print('Python SDK import OK')" | |
| sdk-typescript: | |
| name: TypeScript SDK | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: "22" | |
| - name: Install & build | |
| run: | | |
| cd sdk/typescript | |
| npm install | |
| npm run build | |
| - name: Type check | |
| run: | | |
| cd sdk/typescript | |
| npx tsc --noEmit |