@@ -218,3 +218,44 @@ jobs:
218
218
219
219
- name : Run bindgen tests
220
220
run : cargo test -p spacetimedb-cli
221
+
222
+ update :
223
+ name : Test spacetimedb-update flow
224
+ permissions : read-all
225
+ strategy :
226
+ matrix :
227
+ include :
228
+ - { target: x86_64-unknown-linux-gnu, runner: spacetimedb-runner }
229
+ - { target: aarch64-unknown-linux-gnu, runner: arm-runner }
230
+ - { target: aarch64-apple-darwin, runner: macos-latest }
231
+ - { target: x86_64-pc-windows-msvc, runner: windows-latest }
232
+ runs-on : ${{ matrix.runner }}
233
+ steps :
234
+ - name : Checkout
235
+ uses : actions/checkout@v3
236
+
237
+ - name : Install Rust
238
+ uses : dsherret/rust-toolchain-file@v1
239
+
240
+ - name : Install rust target
241
+ run : rustup target add ${{ matrix.target }}
242
+
243
+ - name : Install packages
244
+ if : ${{ matrix.runner == 'arm-runner' }}
245
+ shell : bash
246
+ run : sudo apt install libssl-dev
247
+
248
+ - name : Build spacetimedb-update
249
+ run : cargo build --features github-token-auth --target ${{ matrix.target }} -p spacetimedb-update
250
+
251
+ - name : Run self-install
252
+ env :
253
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
254
+ shell : bash
255
+ run : |
256
+ ROOT_DIR="$(mktemp -d)"
257
+ # NOTE(bfops): We need the `github-token-auth` feature because we otherwise tend to get ratelimited when we try to fetch `/releases/latest`.
258
+ # My best guess is that, on the GitHub runners, the "anonymous" ratelimit is shared by *all* users of that runner (I think this because it
259
+ # happens very frequently on the `macos-runner`, but we haven't seen it on any others).
260
+ cargo run --features github-token-auth --target ${{ matrix.target }} -p spacetimedb-update -- self-install --root-dir="${ROOT_DIR}" --yes
261
+ "${ROOT_DIR}"/spacetime --root-dir="${ROOT_DIR}" help
0 commit comments