-
-
Notifications
You must be signed in to change notification settings - Fork 1
105 lines (89 loc) · 3.55 KB
/
test.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
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
# This workflow builds the project for production, with IndexStoreDB integration enabled.
name: test
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
linux-server:
runs-on: ubuntu-24.04
name: Linux (server)
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up mock deployments
run: |
docker compose -f Guides/docs.docc/local/docker-compose.yml up -d
- name: Initialize replica set
run: |
timeout 60s bash -c \
'until docker exec -t unidoc-mongod-container \
/bin/mongosh --file /unidoc-rs-init-containerized.js; do sleep 1; done'
- name: Run pipeline
run: |
docker run -t --rm \
--network=unidoc-test \
--name swift-environment \
--user root \
-v $PWD:/swift/swift-unidoc \
-w /swift/swift-unidoc \
-e SWIFT_INSTALLATION=/usr \
swift:6.0.2-noble \
/bin/bash Scripts/Linux/TestAll
linux:
runs-on: ubuntu-24.04
name: Linux
env:
UNIDOC_ENABLE_INDEXSTORE: "1"
steps:
- name: Install Swift
uses: tayloraswift/swift-install-action@master
with:
swift-prefix: "swift-6.0.2-release/ubuntu2404/swift-6.0.2-RELEASE"
swift-id: "swift-6.0.2-RELEASE-ubuntu24.04"
- name: Checkout repository
uses: actions/checkout@v3
- name: Build release
run: |
swift --version
swift build -c release \
--build-tests \
--explicit-target-dependency-import-check=error \
-Xcxx -I$SWIFT_INSTALLATION/lib/swift \
-Xcxx -I$SWIFT_INSTALLATION/lib/swift/Block
mkdir $HOME/bin
mv .build/release/ssgc $HOME/bin
echo "$HOME/bin" >> $GITHUB_PATH
- name: Build packages
run: Scripts/Linux/GeneratePackageSymbolGraphs
- name: Validate packages
run: |
swift test -c release \
--skip-build \
--filter SymbolGraphValidationTests \
-Xcxx -I$SWIFT_INSTALLATION/lib/swift \
-Xcxx -I$SWIFT_INSTALLATION/lib/swift/Block
macos:
runs-on: macos-15
name: macOS
env:
UNIDOC_ENABLE_INDEXSTORE: "1"
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Build release
run: |
swift --version
swift build -c release \
--product ssgc \
--explicit-target-dependency-import-check=error
mkdir $HOME/bin
mv .build/release/ssgc $HOME/bin
echo "$HOME/bin" >> $GITHUB_PATH
- name: Build packages
run: Scripts/macOS/GeneratePackageSymbolGraphs
- name: Validate packages
run: |
swift test -c release \
--filter SymbolGraphValidationTests