-
Notifications
You must be signed in to change notification settings - Fork 2
57 lines (50 loc) · 1.51 KB
/
ci.yml
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
name: Rust SDK
on:
push:
branches:
- main
pull_request:
workflow_call:
inputs:
test_data_branch:
type: string
description: The branch in sdk-test-data to target for testcase files
required: false
sdk_branch:
type: string
description: The branch of the SDK to test
required: false
env:
CARGO_TERM_COLOR: always
SDK_BRANCH: ${{ inputs.sdk_branch || github.ref || 'main' }}
TEST_DATA_BRANCH: ${{ inputs.test_data_branch || 'main' }}
jobs:
cargo_build_and_test:
name: Cargo Build & Test
runs-on: ubuntu-latest
strategy:
matrix:
toolchain:
- stable
steps:
- uses: actions/checkout@v4
with:
submodules: ${{ !inputs.test_data_branch }}
repository: Eppo-exp/eppo-multiplatform
ref: ${{ env.SDK_BRANCH }}
- uses: actions/checkout@v4
if: ${{ inputs.test_data_branch }}
with:
repository: Eppo-exp/sdk-test-data
ref: ${{ inputs.test_data_branch }}
path: sdk-test-data
- run: npm ci
- run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }}
- run: cargo build --verbose --all-targets --workspace
- run: cargo test --verbose --workspace
- run: cargo doc --verbose
# Add WASM target
- run: rustup target add wasm32-wasi
# Build WASM target separately
- run: cargo build --verbose --target wasm32-wasi
working-directory: fastly-edge-assignments