diff --git a/.github/scripts/build_local_target.sh b/.github/scripts/build_local_target.sh new file mode 100755 index 0000000..f3f73ee --- /dev/null +++ b/.github/scripts/build_local_target.sh @@ -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" "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 "bazel-"${stage} + fi +done diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 51bc92a..decf80e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -45,3 +45,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