-
Notifications
You must be signed in to change notification settings - Fork 17
167 lines (147 loc) · 4.67 KB
/
Copy pathtest.arc.yaml
File metadata and controls
167 lines (147 loc) · 4.67 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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
name: Test - Arc
on:
pull_request:
paths:
- .bazeliskrc
- .bazelrc
- .clang-format
- .clang-format-ignore
- .github/workflows/test.arc.yaml
- arc/**
- alamos/go/**
- MODULE.bazel
- MODULE.bazel.lock
- scripts/check_clang_format.sh
- scripts/check_gofmt.sh
- scripts/sanitizers/**
- vendor/wasmtime/**
- x/cpp/**
- x/go/**
push:
branches:
- main
- rc
paths:
- .bazeliskrc
- .bazelrc
- .clang-format
- .clang-format-ignore
- .github/workflows/test.arc.yaml
- arc/**
- alamos/go/**
- MODULE.bazel
- MODULE.bazel.lock
- scripts/check_clang_format.sh
- scripts/check_gofmt.sh
- scripts/sanitizers/**
- vendor/wasmtime/**
- x/cpp/**
- x/go/**
workflow_dispatch:
env:
BAZEL_REMOTE_CACHE: ${{ vars.BAZEL_REMOTE_CACHE_GRPC_URL }}
jobs:
server:
uses: ./.github/workflows/build.docker.yaml
permissions:
packages: write
with:
module: core
tag: ghcr.io/synnaxlabs/synnax:${{ github.sha }}
test-cpp-linux:
name: Test C++ (ubuntu-build-bot)
runs-on: ubuntu-build-bot
needs: [server]
steps:
- name: Checkout Repository
uses: actions/checkout@v6
- name: Force Quit Existing Synnax Processes
continue-on-error: true
run: integration/scripts/kill_synnax_processes.sh
- name: Login to GitHub Container Registry
run:
echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor
}} --password-stdin
- name: Ensure Port 9090 is Free
run: |
docker rm -f synnax-test-arc || true
docker ps -q --filter "publish=9090" | xargs -r docker rm -f || true
- name: Start Synnax
run: |
docker run -d --name synnax-test-arc \
-p 9090:9090 \
-e SYNNAX_LISTEN=localhost:9090 \
-e SYNNAX_VERBOSE=true \
-e SYNNAX_INSECURE=true \
-e SYNNAX_MEM=true \
-e SYNNAX_LICENSE_KEY=${{ secrets.SYNNAX_LICENSE_KEY }} \
ghcr.io/synnaxlabs/synnax:${{ github.sha }}
echo "Waiting for Synnax to be ready..."
for i in $(seq 1 30); do
if nc -z localhost 9090 2>/dev/null; then
echo "Synnax is ready"
break
fi
echo "Waiting for port 9090... (attempt $i/30)"
sleep 1
done
if ! nc -z localhost 9090 2>/dev/null; then
echo "Synnax failed to start within 30 seconds"
docker logs synnax-test-arc
exit 1
fi
- name: Install Rust
uses: actions-rust-lang/setup-rust-toolchain@v1
- name: Update Submodules
run: git submodule update --init --recursive
- name: Setup Bazel
uses: bazel-contrib/setup-bazel@0.19.0
with:
bazelisk-cache: false
disk-cache: false
repository-cache: false
- name: Install Clang Format
run: scripts/install_clang_format.sh
- name: Check Formatting
run: scripts/check_clang_format.sh arc/cpp
- name: Test
run: |
bazel test --config=asan-leak --test_output=all //arc/cpp/... \
--remote_cache=${{ env.BAZEL_REMOTE_CACHE }} --remote_cache_compression=true \
--test_env=LSAN_OPTIONS="suppressions=${{ github.workspace }}/scripts/sanitizers/lsan_suppressions.txt" \
--spawn_strategy=local \
--jobs=1
- name: Stop Synnax
if: always()
run: docker rm -f synnax-test-arc || true
test-cpp:
name: Test C++ (${{ matrix.os }})
strategy:
fail-fast: false
matrix:
os: [macos-build-bot, windows-build-bot]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout Repository
uses: actions/checkout@v6
- name: Update Submodules
run: git submodule update --init --recursive
- name: Setup Bazel
uses: bazel-contrib/setup-bazel@0.19.0
with:
bazelisk-cache: false
disk-cache: false
repository-cache: false
- name: Test (macOS)
if: matrix.os == 'macos-build-bot'
run: |
bazel test --config=asan --test_output=all //arc/cpp/... \
--test_tag_filters=-no-asan,-requires-core
shell: bash
- name: Test (Windows)
if: matrix.os == 'windows-build-bot'
run: |
bazel --output_user_root=C:/tmp test --test_output=all //arc/cpp/... \
--remote_cache=${{ env.BAZEL_REMOTE_CACHE }} --remote_cache_compression=true \
--test_tag_filters=-requires-core
shell: bash