-
Notifications
You must be signed in to change notification settings - Fork 1
120 lines (106 loc) · 3.51 KB
/
ci.yml
File metadata and controls
120 lines (106 loc) · 3.51 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
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 }}
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
# ============================================================
# Build Test Jobs
# ============================================================
build-test-linux:
name: Build Test (Linux)
needs: load-config
uses: ./.github/workflows/_build_linux.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, 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
if [ "${{ needs.build-test-linux.result }}" == "success" ]; then
echo " ✅ Linux: PASSED"
elif [ "${{ needs.build-test-linux.result }}" == "skipped" ]; then
echo " ⊘ Linux: SKIPPED"
else
echo " ❌ Linux: 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