-
Notifications
You must be signed in to change notification settings - Fork 0
89 lines (80 loc) · 3.3 KB
/
Copy pathci.yml
File metadata and controls
89 lines (80 loc) · 3.3 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
name: ci
on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install build tools
run: sudo apt-get update && sudo apt-get install -y build-essential gfortran libarchive-dev libzstd-dev tar zstd
- name: Build native binaries
run: |
chmod +x scripts/build_native.sh
./scripts/build_native.sh
- name: Generate tar.zst test fixtures
run: |
chmod +x tests/generate_tar_zst_fixtures.sh
./tests/generate_tar_zst_fixtures.sh
- name: Prepare CI bundle
run: mkdir -p .github/ci-artifacts
- name: Run native tests
run: |
set -o pipefail
START_TS=$(date -u +%s)
./bin/test_core_native 2>&1 | tee .github/ci-artifacts/test_core_native.log
STATUS1=${PIPESTATUS[0]}
./bin/test_enhanced 2>&1 | tee .github/ci-artifacts/test_enhanced.log
STATUS2=${PIPESTATUS[0]}
./bin/test_fortran_backend 2>&1 | tee .github/ci-artifacts/test_fortran_backend.log
STATUS3=${PIPESTATUS[0]}
./bin/test_auto_backend 2>&1 | tee .github/ci-artifacts/test_auto_backend.log
STATUS4=${PIPESTATUS[0]}
./bin/test_performance_fix 2>&1 | tee .github/ci-artifacts/test_performance_fix.log
STATUS5=${PIPESTATUS[0]}
./bin/test_telemetry_processor_perf 2>&1 | tee .github/ci-artifacts/test_telemetry_processor_perf.log
STATUS6=${PIPESTATUS[0]}
./bin/test_tar_zst 2>&1 | tee .github/ci-artifacts/test_tar_zst.log
STATUS7=${PIPESTATUS[0]}
TEST_STATUS=0
if [ "$STATUS1" -ne 0 ] || [ "$STATUS2" -ne 0 ] || [ "$STATUS3" -ne 0 ] || [ "$STATUS4" -ne 0 ] || [ "$STATUS5" -ne 0 ] || [ "$STATUS6" -ne 0 ] || [ "$STATUS7" -ne 0 ]; then
TEST_STATUS=1
fi
END_TS=$(date -u +%s)
DURATION=$((END_TS - START_TS))
{
echo "# KEYSTONE CI Summary"
echo "repository: KEYSTONE"
echo "workflow: ${{ github.workflow }}"
echo "run_id: ${{ github.run_id }}"
echo "job: ${{ github.job }}"
echo "status: $([ \"$TEST_STATUS\" = \"0\" ] && echo PASS || echo FAIL)"
echo "duration_seconds: $DURATION"
echo "test_core_native_status: $STATUS1"
echo "test_enhanced_status: $STATUS2"
echo "test_fortran_backend_status: $STATUS3"
echo "test_auto_backend_status: $STATUS4"
echo "test_performance_fix_status: $STATUS5"
echo "test_telemetry_processor_perf_status: $STATUS6"
echo "test_tar_zst_status: $STATUS7"
echo "ref: ${{ github.ref }}"
echo "sha: ${{ github.sha }}"
} > .github/ci-artifacts/ci-summary.md
exit "$TEST_STATUS"
- name: Upload CI artifacts
if: always()
uses: actions/upload-artifact@v4
with:
name: stisorter-ci-artifacts
path: .github/ci-artifacts/
- name: Emit workflow status
if: always()
run: |
echo "::notice file=.github/ci-artifacts/ci-summary.md,title=KEYSTONE CI Summary::See attached artifact 'stisorter-ci-artifacts'"