Repository navigation
107 lines (90 loc) · 2.94 KB
/
Copy pathci.yml
File metadata and controls
107 lines (90 loc) · 2.94 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
name: QLDPC Software and FPGA CI
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
inputs:
run_hardware:
description: "Run HLS, Vivado, PetaLinux, and HIL checks on the trusted ZCU111 runner"
required: false
default: false
type: boolean
permissions:
contents: read
jobs:
software-ci:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v7
- name: Install build dependencies
run: |
sudo apt-get update
sudo apt-get install -y cmake ninja-build libomp-dev
- name: Configure
run: >-
cmake -S . -B build
-G Ninja
-DCMAKE_BUILD_TYPE=Release
- name: Build
run: cmake --build build --parallel 2
- name: Run smoke test
run: ./build/qldpc_decoder
- name: Run Catch2 unit tests
run: ctest --test-dir build --output-on-failure
- name: Run latency benchmark
env:
LDPC_MAX_LATENCY_NS: 1000
run: ./build/ldpc_benchmark
hardware-bitstream-build:
# Never run code from an external pull request on a local runner.
# The trusted hardware runner is intentionally opt-in to avoid queued CI when
# a ZCU111/Vivado runner is offline. Start it manually with run_hardware=true.
if: github.event_name == 'workflow_dispatch' && inputs.run_hardware
needs: software-ci
runs-on: [self-hosted, vivado, zcu111]
timeout-minutes: 120
steps:
- name: Checkout repository
uses: actions/checkout@v7
- name: Build HLS, Vivado and PetaLinux artifacts
shell: bash
run: |
set -euo pipefail
source /tools/Xilinx/Vitis/2023.2/settings64.sh
source /tools/Xilinx/Vitis_HLS/2023.2/settings64.sh
source /tools/xilinx/petalinux/2023.2/settings.sh
make all
- name: Build HIL benchmark
run: |
cmake -S . -B build-hil -G Ninja \
-DCMAKE_BUILD_TYPE=Release \
-DBUILD_UNIT_TESTS=OFF \
-DBUILD_AXI_DMA_DRIVER=OFF \
-DBUILD_HIL_BENCHMARK=ON
cmake --build build-hil --parallel 2
- name: Run HIL latency gate
env:
HIL_NUM_TESTS: 100000
HIL_MAX_LATENCY_US: 100
run: ./build-hil/hil_benchmark
- name: Upload HIL latency report
uses: actions/upload-artifact@v7
with:
name: qldpc-hil-latency-report
if-no-files-found: error
retention-days: 30
path: latencies_report.csv
- name: Upload FPGA and PetaLinux artifacts
uses: actions/upload-artifact@v7
with:
name: qldpc-rfsoc-bitstream-artifacts
if-no-files-found: error
retention-days: 30
path: |
vivado/*.xsa
petalinux/images/linux/BOOT.BIN
petalinux/images/linux/image.ub
petalinux/images/linux/download.bit