Skip to content

Commit

Permalink
CI: test local flow
Browse files Browse the repository at this point in the history
Signed-off-by: Pawel Czarnecki <[email protected]>
  • Loading branch information
lpawelcz authored and oharboe committed Apr 13, 2024
1 parent ddd06d5 commit 17e5309
Show file tree
Hide file tree
Showing 2 changed files with 74 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/scripts/build_local_target.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#!/bin/bash

set -e

target_name=${TARGET:-"tag_array_64x184"}
if [[ -z "$STAGES" ]]; then
if [[ "$target_name" == L1MetadataArray_* ]]; then
STAGES=("synth_sdc" "synth" "floorplan" "place" "cts" "grt" "generate_abstract")
else
STAGES=("synth_sdc" "synth" "memory" "floorplan" "generate_abstract")
fi
else
eval "STAGES=($STAGES)"
fi

echo "Build tag_array_64x184 macro"
for stage in ${STAGES[@]}
do
if [[ -z $SKIP_BUILD ]] ; then
echo "query make script target"
bazel query ${target_name}_${stage}_make
bazel query ${target_name}_${stage}_make --output=build
echo "build make script"
bazel build --subcommands --verbose_failures --sandbox_debug ${target_name}_${stage}_make
fi
if [[ -z $SKIP_RUN ]] ; then
echo "run make script"
./bazel-bin/${target_name}_${stage}_make $(if [[ "$stage" != "memory" ]] ; then echo "bazel-" ; fi)${stage}
fi
done
44 changes: 44 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,47 @@ jobs:
- 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/bazel-orfs@sha256:78b4c15830d75e026dc2294b280cb5ff1200f6ee7902a714dca71fd61b5b2e4e
defaults:
run:
shell: bash
strategy:
fail-fast: false
env:
DEBIAN_FRONTEND: "noninteractive"
steps:
# Workaround for https://github.com/actions/runner/issues/863
- name: Override HOME env var
shell: bash
run: |
echo HOME=/root | sudo tee -a $GITHUB_ENV
- name: Print info
run: |
echo "USER: "$(whoami)
echo "PWD: "$(pwd)
ls -la
echo "HOME: "$HOME
cd ~/OpenROAD-flow-scripts
echo "OpenROAD-flow-scripts SHA: "$(git rev-parse HEAD)
source ./env.sh
yosys --version
openroad -version
- name: Checkout megaboom
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

0 comments on commit 17e5309

Please sign in to comment.