-
Notifications
You must be signed in to change notification settings - Fork 1k
82 lines (71 loc) · 2.44 KB
/
swift-procedure-e2e.yml
File metadata and controls
82 lines (71 loc) · 2.44 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
name: Swift Procedure E2E
on:
pull_request:
paths:
- sdks/swift/**
- crates/codegen/src/swift.rs
- crates/codegen/src/lib.rs
- crates/cli/src/subcommands/generate.rs
- modules/module-test/**
- tools/swift-procedure-e2e.sh
- tools/check-swift-demo-bindings.sh
- .github/workflows/swift-procedure-e2e.yml
push:
branches:
- master
paths:
- sdks/swift/**
- crates/codegen/src/swift.rs
- crates/codegen/src/lib.rs
- crates/cli/src/subcommands/generate.rs
- modules/module-test/**
- tools/swift-procedure-e2e.sh
- tools/check-swift-demo-bindings.sh
- .github/workflows/swift-procedure-e2e.yml
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || format('sha-{0}', github.sha) }}
cancel-in-progress: true
jobs:
swift-procedure-e2e:
name: Swift Procedure E2E (macOS)
runs-on: macos-latest
timeout-minutes: 45
env:
CARGO_TARGET_DIR: ${{ github.workspace }}/target
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Install Rust toolchain
uses: dsherret/rust-toolchain-file@v1
- name: Set default rust toolchain
run: rustup default $(rustup show active-toolchain | cut -d' ' -f1)
- name: Cache Rust dependencies
uses: Swatinem/rust-cache@v2
with:
workspaces: ${{ github.workspace }}
shared-key: spacetimedb
save-if: false
prefix-key: v1
- name: Install SpacetimeDB CLI from local checkout
run: |
export CARGO_HOME="$HOME/.cargo"
echo "$CARGO_HOME/bin" >> "$GITHUB_PATH"
cargo install --force --path crates/cli --locked --message-format=short
cargo install --force --path crates/standalone --features allow_loopback_http_for_tests --locked --message-format=short
ln -sf "$CARGO_HOME/bin/spacetimedb-cli" "$CARGO_HOME/bin/spacetime"
- name: Show toolchain versions
run: |
rustc --version
cargo --version
swiftc --version
spacetime --version
- name: Verify generated Swift demo bindings are in sync
run: tools/check-swift-demo-bindings.sh
- name: Start local SpacetimeDB server
run: |
spacetime start &
disown
sleep 5
- name: Run Swift procedure callback E2E
run: tools/swift-procedure-e2e.sh