Skip to content

Commit 77225c0

Browse files
committed
ci: refactor full flow to bash script
1 parent 770c345 commit 77225c0

File tree

2 files changed

+67
-1
lines changed

2 files changed

+67
-1
lines changed

.github/scripts/run_full_flow.sh

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
#!/bin/bash
2+
# Copyright (c) 2026 ETH Zurich and University of Bologna.
3+
# Licensed under the Apache License, Version 2.0, see LICENSE for details.
4+
# SPDX-License-Identifier: Apache-2.0
5+
#
6+
# Authors:
7+
# - Philippe Sauter <phsauter@iis.ee.ethz.ch>
8+
#
9+
# Full backend flow:
10+
# - Yosys synthesis
11+
# - OpenROAD P&R
12+
# - KLayout GDS export
13+
14+
set -euo pipefail
15+
16+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
17+
CROC_ROOT="$(cd "$SCRIPT_DIR/../.." && pwd)"
18+
19+
cd "$CROC_ROOT"
20+
21+
echo "============================================="
22+
echo " Step 1: Yosys synthesis"
23+
echo "============================================="
24+
cd yosys
25+
./run_synthesis.sh --synth
26+
cd "$CROC_ROOT"
27+
28+
echo ""
29+
echo "============================================="
30+
echo " Step 2: OpenROAD P&R"
31+
echo "============================================="
32+
cd openroad
33+
./run_backend.sh --all
34+
cd "$CROC_ROOT"
35+
36+
echo ""
37+
echo "============================================="
38+
echo " Checking OpenROAD logs for errors"
39+
echo "============================================="
40+
LOG_DIR="$CROC_ROOT/openroad/logs"
41+
ERROR_FOUND=0
42+
for log in "$LOG_DIR"/*.log; do
43+
if grep -q "\[ERROR" "$log"; then
44+
echo "ERROR: [ERROR] found in $log:"
45+
grep "\[ERROR" "$log"
46+
ERROR_FOUND=1
47+
fi
48+
done
49+
if [ "$ERROR_FOUND" -eq 1 ]; then
50+
echo "OpenROAD log check FAILED."
51+
exit 1
52+
fi
53+
echo "OpenROAD passed (no [ERROR] found)."
54+
55+
echo ""
56+
echo "============================================="
57+
echo " Step 3: KLayout GDS export"
58+
echo "============================================="
59+
cd klayout
60+
./run_finishing.sh --gds --seal
61+
cd "$CROC_ROOT"
62+
63+
echo ""
64+
echo "============================================="
65+
echo " Full flow completed"
66+
echo "============================================="

.github/workflows/full-flow.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
- name: Run Yosys, OpenROAD and KLayout
3232
uses: ./.github/actions/oseda-cmd
3333
with:
34-
cmd: "cd yosys && ./run_synthesis.sh --synth && cd ../openroad && QT_QPA_PLATFORM=offscreen ./run_backend.sh --all && cd ../klayout && ./run_finishing.sh --gds --seal"
34+
cmd: ".github/scripts/run_full_flow.sh"
3535
- name: Upload openroad outputs
3636
uses: actions/upload-artifact@v4
3737
with:

0 commit comments

Comments
 (0)