-
Notifications
You must be signed in to change notification settings - Fork 1
136 lines (120 loc) · 4.17 KB
/
ci.yml
File metadata and controls
136 lines (120 loc) · 4.17 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
name: CI
on:
push:
branches: [main, develop]
pull_request:
branches: [main, develop]
workflow_dispatch:
jobs:
# ============================================================
# Load Configuration
# ============================================================
load-config:
uses: ./.github/workflows/_config.yml
# ============================================================
# Test Job
# ============================================================
test:
needs: load-config
if: needs.load-config.outputs.enable-tests == 'true'
uses: ./.github/workflows/_test.yml
with:
os-matrix: ${{ needs.load-config.outputs.os-matrix }}
python-matrix: ${{ needs.load-config.outputs.python-matrix }}
primary-os: ${{ needs.load-config.outputs.primary-os }}
primary-python: ${{ needs.load-config.outputs.primary-python }}
secrets:
TEST_PROXY_URL: ${{ secrets.TEST_PROXY_URL }}
TEST_HTTPBIN_HOST: ${{ secrets.TEST_HTTPBIN_HOST }}
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
# ============================================================
# Build Test Jobs
# ============================================================
build-test-linux-x86_64:
name: Build Test (Linux x86_64)
needs: load-config
uses: ./.github/workflows/_build_linux_x86_64.yml
build-test-linux-aarch64:
name: Build Test (Linux aarch64)
needs: load-config
uses: ./.github/workflows/_build_linux_aarch64.yml
build-test-macos:
name: Build Test (macOS)
needs: load-config
uses: ./.github/workflows/_build_macos.yml
build-test-windows:
name: Build Test (Windows)
needs: load-config
uses: ./.github/workflows/_build_windows.yml
# ============================================================
# Summary
# ============================================================
summary:
name: CI Summary
needs: [load-config, test, build-test-linux-x86_64, build-test-linux-aarch64, build-test-macos, build-test-windows]
if: always()
runs-on: ubuntu-latest
steps:
- name: Check results
run: |
echo "==================================="
echo "CI Pipeline Summary"
echo "==================================="
echo ""
# Tests
if [ "${{ needs.load-config.outputs.enable-tests }}" == "true" ]; then
if [ "${{ needs.test.result }}" == "success" ]; then
echo "✅ Tests: PASSED"
else
echo "❌ Tests: FAILED"
EXIT_CODE=1
fi
else
echo "⊘ Tests: DISABLED"
fi
# Build Tests
echo ""
echo "Build Tests:"
# Linux x86_64
if [ "${{ needs.build-test-linux-x86_64.result }}" == "success" ]; then
echo " ✅ Linux x86_64: PASSED"
elif [ "${{ needs.build-test-linux-x86_64.result }}" == "skipped" ]; then
echo " ⊘ Linux x86_64: SKIPPED"
else
echo " ❌ Linux x86_64: FAILED"
EXIT_CODE=1
fi
# Linux aarch64
if [ "${{ needs.build-test-linux-aarch64.result }}" == "success" ]; then
echo " ✅ Linux aarch64: PASSED"
elif [ "${{ needs.build-test-linux-aarch64.result }}" == "skipped" ]; then
echo " ⊘ Linux aarch64: SKIPPED"
else
echo " ❌ Linux aarch64: FAILED"
EXIT_CODE=1
fi
# macOS
if [ "${{ needs.build-test-macos.result }}" == "success" ]; then
echo " ✅ macOS: PASSED"
elif [ "${{ needs.build-test-macos.result }}" == "skipped" ]; then
echo " ⊘ macOS: SKIPPED"
else
echo " ❌ macOS: FAILED"
EXIT_CODE=1
fi
# Windows
if [ "${{ needs.build-test-windows.result }}" == "success" ]; then
echo " ✅ Windows: PASSED"
elif [ "${{ needs.build-test-windows.result }}" == "skipped" ]; then
echo " ⊘ Windows: SKIPPED"
else
echo " ❌ Windows: FAILED"
EXIT_CODE=1
fi
echo ""
if [ "${EXIT_CODE:-0}" == "1" ]; then
echo "❌ CI Pipeline FAILED"
exit 1
else
echo "✅ CI Pipeline PASSED"
fi