forked from avengineers/SPLed
-
Notifications
You must be signed in to change notification settings - Fork 0
151 lines (135 loc) · 5.18 KB
/
Copy pathci.yml
File metadata and controls
151 lines (135 loc) · 5.18 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
name: CI
on:
push:
branches: [develop, "release/*"]
pull_request:
branches: [develop, "release/*"]
schedule:
- cron: "0 0 * * *"
workflow_dispatch:
jobs:
determine-gate:
name: Determine Quality Gate
runs-on: ubuntu-24.04
outputs:
marker: ${{ steps.gate.outputs.marker }}
steps:
- name: Determine Quality Gate
id: gate
shell: bash
run: |
if [ "${{ github.event_name }}" = "schedule" ]; then
marker="gate_develop_nightly"
elif [ "${{ github.event_name }}" = "pull_request" ]; then
if [[ "${{ github.base_ref }}" == release/* ]]; then
marker="gate_release_pr"
else
marker="gate_develop_pr"
fi
elif [ "${{ github.event_name }}" = "push" ]; then
if [[ "${{ github.ref }}" == refs/heads/release/* ]]; then
marker="gate_release"
else
marker="gate_develop_push"
fi
else
marker="gate_develop_push"
fi
echo "Selected gate marker: $marker"
echo "marker=$marker" >> "$GITHUB_OUTPUT"
test-on-windows:
name: Build and Test on Windows
runs-on: windows-2025
needs: determine-gate
steps:
- name: Checkout Code
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Installation of Dependencies and Execute Tests
env:
# Workaround to force usage of scoop apps installed in $env:USERPROFILE
USER_PATH_FIRST: 1
run: |
.\build.ps1 -install
.\build.ps1 -selftests -marker "${{ needs.determine-gate.outputs.marker }}"
shell: powershell
- name: Deploy Test Results
if: always()
uses: mikepenz/action-junit-report@v6
with:
report_paths: |
test/output/test-report.xml
build/**/variant-junit.xml
detailed_summary: true
include_passed: true
fail_on_failure: true
fail_on_parse_error: true
require_tests: true
check_name: "Test Results (Windows)"
- name: Deploy Artifacts
uses: actions/upload-artifact@v4
with:
name: artifacts
retention-days: 90
path: |
build/**/*.7z
build/**/pr_changes.json
if-no-files-found: error
test-on-linux:
name: Build and Test on Linux
runs-on: ubuntu-24.04
timeout-minutes: 30
needs: determine-gate
steps:
- name: Checkout Code
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Setup Python
uses: actions/setup-python@v6
with:
python-version: "3.11"
- name: Install Poetry
run: pipx install poetry
- name: Installation of Dependencies and Execute Tests
run: |
# The build toolchain (gcc/clang/cmake/ninja) is provisioned in an
# OS-independent way by poks via ./build.sh --install (no apt).
./build.sh --install
./build.sh --selftests --marker "${{ needs.determine-gate.outputs.marker }}"
- name: Deploy Test Results
if: always()
uses: mikepenz/action-junit-report@v6
with:
report_paths: |
test/output/test-report.xml
build/**/variant-junit.xml
detailed_summary: true
include_passed: true
fail_on_failure: true
fail_on_parse_error: true
require_tests: true
check_name: "Test Results (Linux)"
- name: Upload Test Reports
if: always()
uses: actions/upload-artifact@v4
with:
name: test-reports-linux
retention-days: 14
path: |
test/output/test-report.xml
build/**/variant-junit.xml
if-no-files-found: warn
- name: Deploy Artifacts
# Optional: mirrors the Windows job's artifact upload, but non-blocking —
# a missing 7z/pr_changes.json on Linux only warns, it never fails the gate.
continue-on-error: true
uses: actions/upload-artifact@v4
with:
name: artifacts-linux
retention-days: 90
path: |
build/**/*.7z
build/**/pr_changes.json
if-no-files-found: warn