Skip to content

Commit

Permalink
CI: Add step for testing local targets using an extracted docker image
Browse files Browse the repository at this point in the history
Signed-off-by: Mateusz Leonowicz <[email protected]>
  • Loading branch information
mleonowicz committed Sep 12, 2024
1 parent be29cf7 commit f3f4424
Showing 1 changed file with 57 additions and 2 deletions.
59 changes: 57 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ jobs:
bazel run --subcommands --verbose_failures --sandbox_debug ${{ matrix.STAGE_TARGET }} -- `pwd`/build
test-target-local:
name: Local flow - test targets
test-target-local-clean-setup:
name: Local flow - clean setup
runs-on: ubuntu-22.04
defaults:
run:
Expand All @@ -99,3 +99,58 @@ jobs:
env:
TARGET: L1MetadataArray
run: .github/scripts/build_local_target.sh

generate-config:
name: Generate configs
runs-on: ubuntu-22.04
outputs:
docker-tag: ${{ steps.docker-image.outputs.docker-orfs }}
steps:
- name: Checkout bazel-orfs
uses: actions/checkout@v4
- name: Lint Bazel files
run: bazel mod tidy && git diff --exit-code
- name: Extract Docker tag
id: docker-image
run: |
revision=$(python3 .github/scripts/extract_docker_revision.py MODULE.bazel.lock)
echo "docker-orfs=$revision" | tee -a $GITHUB_OUTPUT
test-target-local-preinstalled-orfs:
name: Local flow - preinstalled orfs
runs-on: ubuntu-22.04
needs: generate-config
container:
image: ${{ fromJSON(needs.generate-config.outputs.docker-tag).image }}
defaults:
run:
shell: bash
env:
DEBIAN_FRONTEND: "noninteractive"
FLOW_HOME: /OpenROAD-flow-scripts/flow
steps:
- name: Print info and setup orfs
run: |
echo "USER: "$(whoami)
echo "PWD: "$(pwd)
echo "HOME: "$HOME
ls -la
cd /OpenROAD-flow-scripts
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 - L1MetadataArray
env:
TARGET: L1MetadataArray
run: .github/scripts/build_local_target.sh

0 comments on commit f3f4424

Please sign in to comment.