|
| 1 | +name: CI |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: [main] |
| 6 | + pull_request: |
| 7 | + branches: [main] |
| 8 | + workflow_dispatch: |
| 9 | + |
| 10 | +jobs: |
| 11 | + build-and-test: |
| 12 | + runs-on: ${{ matrix.os }} |
| 13 | + strategy: |
| 14 | + matrix: |
| 15 | + os: [ubuntu-latest, macos-latest] |
| 16 | + |
| 17 | + steps: |
| 18 | + - name: Checkout code |
| 19 | + uses: actions/checkout@v4 |
| 20 | + |
| 21 | + # Setup: Toolchains |
| 22 | + - name: Set up Rust |
| 23 | + uses: actions-rs/toolchain@v1 |
| 24 | + with: |
| 25 | + toolchain: stable |
| 26 | + components: rustfmt, clippy |
| 27 | + override: true |
| 28 | + |
| 29 | + - name: Set up Python |
| 30 | + uses: actions/setup-python@v5 |
| 31 | + with: |
| 32 | + python-version: "3.10" |
| 33 | + |
| 34 | + - name: Set up Node.js |
| 35 | + uses: actions/setup-node@v4 |
| 36 | + with: |
| 37 | + node-version: "18" |
| 38 | + |
| 39 | + - name: Set up R |
| 40 | + uses: r-lib/actions/setup-r@v2 |
| 41 | + with: |
| 42 | + r-version: "4.5" |
| 43 | + |
| 44 | + # OS-specific system dependencies (Linux only) |
| 45 | + - name: Install system dependencies (Linux only) |
| 46 | + if: runner.os == 'Linux' |
| 47 | + run: | |
| 48 | + sudo apt-get update |
| 49 | + sudo apt-get install -y \ |
| 50 | + libcurl4-openssl-dev \ |
| 51 | + libssl-dev \ |
| 52 | + libfontconfig1-dev \ |
| 53 | + libfreetype6-dev \ |
| 54 | + libharfbuzz-dev \ |
| 55 | + libfribidi-dev \ |
| 56 | + libpng-dev \ |
| 57 | + libtiff5-dev \ |
| 58 | + libjpeg-dev |
| 59 | +
|
| 60 | + # Node dependencies |
| 61 | + - name: Install JS dependencies |
| 62 | + working-directory: wasm_bindings |
| 63 | + run: npm ci |
| 64 | + |
| 65 | + # Python dependencies |
| 66 | + - name: Install Python dependencies |
| 67 | + working-directory: python_bindings |
| 68 | + run: | |
| 69 | + pip install --upgrade pip |
| 70 | + pip install maturin pytest |
| 71 | +
|
| 72 | + # R dependencies (Linux only) |
| 73 | + - name: Install R dependencies (Linux only) |
| 74 | + if: runner.os == 'Linux' |
| 75 | + run: | |
| 76 | + sudo apt-get install -y libcurl4-openssl-dev libssl-dev |
| 77 | + Rscript -e 'install.packages(c("devtools", "rextendr"), repos="https://cloud.r-project.org")' |
| 78 | +
|
| 79 | + # Build all bindings (Rust, Python, WASM, R) |
| 80 | + - name: Build all components |
| 81 | + run: make all |
| 82 | + |
| 83 | + # Run full test suite |
| 84 | + - name: Run full test suite |
| 85 | + run: make test |
0 commit comments