|
73 | 73 |
|
74 | 74 | - name: Build WASM |
75 | 75 | run: cargo build --target wasm32-unknown-unknown --features wasm --no-default-features |
| 76 | + |
| 77 | + c-embedding: |
| 78 | + runs-on: ubuntu-latest |
| 79 | + steps: |
| 80 | + - uses: actions/checkout@v4 |
| 81 | + |
| 82 | + - name: Install Rust |
| 83 | + uses: dtolnay/rust-toolchain@stable |
| 84 | + |
| 85 | + - name: Cache cargo |
| 86 | + uses: actions/cache@v4 |
| 87 | + with: |
| 88 | + path: | |
| 89 | + ~/.cargo/bin/ |
| 90 | + ~/.cargo/registry/index/ |
| 91 | + ~/.cargo/registry/cache/ |
| 92 | + ~/.cargo/git/db/ |
| 93 | + target/ |
| 94 | + key: ${{ runner.os }}-cargo-c-api-${{ hashFiles('**/Cargo.lock') }} |
| 95 | + restore-keys: | |
| 96 | + ${{ runner.os }}-cargo-c-api- |
| 97 | +
|
| 98 | + - name: Build library with C API |
| 99 | + run: cargo build --release --features c-api |
| 100 | + |
| 101 | + - name: Build C examples |
| 102 | + working-directory: examples/c-embedding |
| 103 | + run: make all |
| 104 | + |
| 105 | + - name: Run C examples |
| 106 | + working-directory: examples/c-embedding |
| 107 | + run: make run-all |
| 108 | + |
| 109 | + go-wazero: |
| 110 | + runs-on: ubuntu-latest |
| 111 | + steps: |
| 112 | + - uses: actions/checkout@v4 |
| 113 | + |
| 114 | + - name: Install Rust |
| 115 | + uses: dtolnay/rust-toolchain@stable |
| 116 | + with: |
| 117 | + targets: wasm32-unknown-unknown |
| 118 | + |
| 119 | + - name: Install Go |
| 120 | + uses: actions/setup-go@v5 |
| 121 | + with: |
| 122 | + go-version: '1.21' |
| 123 | + |
| 124 | + - name: Cache cargo |
| 125 | + uses: actions/cache@v4 |
| 126 | + with: |
| 127 | + path: | |
| 128 | + ~/.cargo/bin/ |
| 129 | + ~/.cargo/registry/index/ |
| 130 | + ~/.cargo/registry/cache/ |
| 131 | + ~/.cargo/git/db/ |
| 132 | + target/ |
| 133 | + key: ${{ runner.os }}-cargo-wasm-${{ hashFiles('**/Cargo.lock') }} |
| 134 | + restore-keys: | |
| 135 | + ${{ runner.os }}-cargo-wasm- |
| 136 | +
|
| 137 | + - name: Build and test Go examples |
| 138 | + working-directory: examples/go-wazero |
| 139 | + run: ./build.sh --test |
| 140 | + |
| 141 | + wasm-playground: |
| 142 | + runs-on: ubuntu-latest |
| 143 | + steps: |
| 144 | + - uses: actions/checkout@v4 |
| 145 | + |
| 146 | + - name: Install Rust |
| 147 | + uses: dtolnay/rust-toolchain@stable |
| 148 | + with: |
| 149 | + targets: wasm32-unknown-unknown |
| 150 | + |
| 151 | + - name: Setup Node.js |
| 152 | + uses: actions/setup-node@v4 |
| 153 | + with: |
| 154 | + node-version: '20' |
| 155 | + |
| 156 | + - name: Cache cargo |
| 157 | + uses: actions/cache@v4 |
| 158 | + with: |
| 159 | + path: | |
| 160 | + ~/.cargo/bin/ |
| 161 | + ~/.cargo/registry/index/ |
| 162 | + ~/.cargo/registry/cache/ |
| 163 | + ~/.cargo/git/db/ |
| 164 | + target/ |
| 165 | + key: ${{ runner.os }}-cargo-wasm-${{ hashFiles('**/Cargo.lock') }} |
| 166 | + restore-keys: | |
| 167 | + ${{ runner.os }}-cargo-wasm- |
| 168 | +
|
| 169 | + - name: Build and test WASM playground |
| 170 | + working-directory: examples/wasm-playground |
| 171 | + run: ./build.sh --test |
0 commit comments