Skip to content

Commit

Permalink
testing CI
Browse files Browse the repository at this point in the history
  • Loading branch information
marwaneltoukhy committed Nov 28, 2023
1 parent b60fcae commit 740a1e5
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 12 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/user_project_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ jobs:
python3 $GITHUB_WORKSPACE/.github/scripts/get_designs.py --design $GITHUB_WORKSPACE
for word in $(cat harden_sequence.txt); do
echo "CURRENT_DESIGN=${word}" >> $GITHUB_ENV
make $word
DISABLE_VERSION_CHECK=1 make $word
done
rm -rf openlane/user_proj_example/runs openlane/user_project_wrapper/runs pdk openlane_src caravel mgmt_core_wrapper timing-scripts mpw_precheck
Expand Down Expand Up @@ -238,7 +238,7 @@ jobs:
- name: install cocotb
run: |
make setup-cocotb
DISABLE_VERSION_CHECK=1 make setup-cocotb
- name: run RTL verification
run: |
Expand Down Expand Up @@ -418,9 +418,9 @@ jobs:
export CUP_ROOT=$GITHUB_WORKSPACE
export PROJECT_ROOT=$GITHUB_WORKSPACE
cd $CUP_ROOT
make extract-parasitics
make create-spef-mapping
make caravel-sta
DISABLE_VERSION_CHECK=1 make extract-parasitics
DISABLE_VERSION_CHECK=1 make create-spef-mapping
DISABLE_VERSION_CHECK=1 make caravel-sta
tar -cf /tmp/timing.tar $CUP_ROOT/signoff/caravel/openlane-signoff/timing
find $CUP_ROOT/signoff/caravel/openlane-signoff/timing/*/ -name "summary.log" | head -n1 \
| xargs head -n5 | tail -n1 > $CUP_ROOT/signoff/caravel/openlane-signoff/timing/all-summary.rpt
Expand Down
13 changes: 9 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ endif
export OPENLANE_ROOT?=$(PWD)/dependencies/openlane_src
export PDK_ROOT?=$(PWD)/dependencies/pdks
export DISABLE_LVS?=0
export DISABLE_VERSION_CHECK?=0

export ROOTLESS

Expand Down Expand Up @@ -65,9 +66,9 @@ ifeq ($(PDK),gf180mcuD)
endif

# Include Caravel Makefile Targets
# .PHONY: % : check-caravel
# %:
# export CARAVEL_ROOT=$(CARAVEL_ROOT) && export MPW_TAG=$(MPW_TAG) && $(MAKE) -f $(CARAVEL_ROOT)/Makefile $@
.PHONY: % : check-caravel
%:
export CARAVEL_ROOT=$(CARAVEL_ROOT) && export MPW_TAG=$(MPW_TAG) && $(MAKE) -f $(CARAVEL_ROOT)/Makefile $@

# Install DV setup
.PHONY: simenv
Expand Down Expand Up @@ -222,7 +223,11 @@ uninstall:

.PHONY: check_versions
check_versions:
./venv/bin/$(PYTHON_BIN) -u scripts/compare_versions.py
@if [ "$$DISABLE_VERSION_CHECK" = "1" ]; then\
echo "Skipping version check"; \
else \
./venv/bin/$(PYTHON_BIN) -u scripts/compare_versions.py; \
fi
# Install Pre-check
# Default installs to the user home directory, override by "export PRECHECK_ROOT=<precheck-installation-path>"
.PHONY: precheck
Expand Down
10 changes: 7 additions & 3 deletions scripts/compare_versions.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import os
import requests
import json

Expand All @@ -10,9 +11,12 @@ def compare_json(tool_versions_json_path):
raise ValueError(f'Failed to get upstream JSON from {upstream_url}: {response.status_code}')
upstream_json = response.json()

# Load the tool_versions.json
with open(tool_versions_json_path, 'r') as tool_versions_file:
tool_versions_json = json.load(tool_versions_file)
if os.path.isfile(tool_versions_json_path):
with open(tool_versions_json_path, 'r') as tool_versions_file:
tool_versions_json = json.load(tool_versions_file)
else:
print("Couldn't find tool_versions.json, please run make setup")
exit(1)

# Compare the two JSON objects
if upstream_json == tool_versions_json:
Expand Down

0 comments on commit 740a1e5

Please sign in to comment.