forked from The-OpenROAD-Project/bazel-orfs
-
Notifications
You must be signed in to change notification settings - Fork 0
153 lines (147 loc) · 4.74 KB
/
ci.yml
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
152
153
name: bazel-orfs build tests
on:
workflow_dispatch:
push:
pull_request:
env:
DOCKER_IMAGE: openroad/flow-ubuntu22.04-builder:latest
jobs:
lint:
name: Lint Bazel files
runs-on: ubuntu-22.04
env:
DEBIAN_FRONTEND: "noninteractive"
steps:
- name: Download buildifier
run: |
wget https://github.com/bazelbuild/buildtools/releases/download/v6.4.0/buildifier-linux-amd64 -O /usr/local/bin/buildifier
chmod +x /usr/local/bin/buildifier
buildifier -version
- name: Checkout bazel-orfs
uses: actions/checkout@v4
- name: Check Bazel files
run: |
buildifier -lint warn -r .
build-stage-target:
name: Build sample stage targets
runs-on: ubuntu-22.04
defaults:
run:
shell: bash
strategy:
fail-fast: false
matrix:
STAGE_TARGET:
- "tag_array_64x184_generate_abstract"
- "L1MetadataArray_test_generate_abstract"
- "L1MetadataArray_full_generate_abstract"
- "L1MetadataArray_test_gds_final"
- "tag_array_64x184_memory"
env:
DEBIAN_FRONTEND: "noninteractive"
steps:
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@main
with:
swap-storage: false
- name: Print info
run: |
echo "USER: "$(whoami)
echo "PWD: "$(pwd)
ls -la
echo "HOME: "$HOME
docker --version
- name: Checkout bazel-orfs
uses: actions/checkout@v4
- name: load docker image
run: |
bazel run --subcommands --verbose_failures --sandbox_debug orfs_env
- name: query target
run: |
bazel query ${{ matrix.STAGE_TARGET }}
bazel query ${{ matrix.STAGE_TARGET }} --output=build
- name: build target
run: |
bazel build --subcommands --verbose_failures --sandbox_debug ${{ matrix.STAGE_TARGET }}
test-make-script-target:
name: Execute sample _make scripts
runs-on: ubuntu-22.04
container:
image: ghcr.io/antmicro/openroad-flow-scripts/ubuntu22.04@sha256:b13b35193bec45cb708bd9a5ee3546a7f20378e3c977a4c49f00e9c1c8a71181
defaults:
run:
shell: bash
strategy:
fail-fast: false
env:
DEBIAN_FRONTEND: "noninteractive"
ORFS: /OpenROAD-flow-scripts
steps:
- name: Print info
run: |
echo "USER: "$(whoami)
echo "PWD: "$(pwd)
ls -la
echo "HOME: "$HOME
cd $ORFS
echo "OpenROAD-flow-scripts SHA: "$(git rev-parse HEAD)
source ./env.sh
yosys --version
openroad -version
- name: Install bazelisk as bazel
run: |
wget https://github.com/bazelbuild/bazelisk/releases/download/v1.19.0/bazelisk-linux-amd64 -O /usr/local/bin/bazel
chmod +x /usr/local/bin/bazel
- name: Checkout bazel-orfs
uses: actions/checkout@v4
- name: build local stage targets - tag_array_64x184
env:
TARGET: tag_array_64x184
run: .github/scripts/build_local_target.sh
- name: build local stage targets - lb_32x128
env:
TARGET: lb_32x128
run: .github/scripts/build_local_target.sh
- name: build local stage targets - L1MetadataArray_test
env:
TARGET: L1MetadataArray_test
run: .github/scripts/build_local_target.sh
test-stage-make-targets:
name: Run ORFS using stage targets and _make scrips
runs-on: ubuntu-22.04
defaults:
run:
shell: bash
env:
DEBIAN_FRONTEND: "noninteractive"
STAGES: "floorplan generate_abstract"
TARGET: tag_array_64x184
steps:
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@main
with:
swap-storage: false
- name: Checkout bazel-orfs
uses: actions/checkout@v4
- name: load docker image
run: |
bazel run --subcommands --verbose_failures --sandbox_debug orfs_env
- name: build synth stage targets
run: |
bazel build --subcommands --verbose_failures --sandbox_debug tag_array_64x184_synth_sdc tag_array_64x184_synth
- name: build make target
env:
SKIP_RUN: 1
run: .github/scripts/build_local_target.sh
- name: set env
run: |
echo "DOCKER_ARGS=-v $(realpath ~/.cache):$(realpath ~/.cache)" >> $GITHUB_ENV
echo "OR_IMAGE=$DOCKER_IMAGE" >> $GITHUB_ENV
- name: run make target
run: |
./docker_shell.sh "export SKIP_BUILD=1
export TARGET=$TARGET
export STAGES=\"$STAGES\"
export ORFS=/OpenROAD-flow-scripts
cd "'$WORK_HOME
$WORK_HOME/.github/scripts/build_local_target.sh'