added CI for defaults updating #3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
# Runs on Every Push | |
push: | |
# Runs on Pull Requests | |
pull_request: | |
workflow_dispatch: | |
jobs: | |
defaults: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
design_types: ["openframe", "analog", "digital"] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: download README and gds files | |
run: | | |
pip install strsimpy | |
mkdir -p $GITHUB_WORKSPACE/tmp_default_content/gds | |
if [ "${{ matrix.design_types }}" = "openframe" ]; then | |
repo_name="caravel_openframe_project" | |
gds_name="openframe_project_wrapper" | |
elif [ "${{ matrix.design_types }}" = "analog" ]; then | |
repo_name="caravel_user_project_analog" | |
gds_name="user_analog_project_wrapper" | |
elif [ "${{ matrix.design_types }}" = "digital" ]; then | |
repo_name="caravel_user_project" | |
gds_name="user_project_wrapper" | |
fi | |
curl -o $GITHUB_WORKSPACE/tmp_default_content/README_${{ matrix.design_types }}.md -L https://raw.githubusercontent.com/efabless/$repo_name/main/README.md | |
curl -o $GITHUB_WORKSPACE/tmp_default_content/gds/$gds_name.gds -L https://raw.githubusercontent.com/efabless/$repo_name/main/gds/$gds_name.gds | |
python3 $GITHUB_WORKSPACE/checks/defaults_check.py -i $GITHUB_WORKSPACE/tmp_default_content -d $GITHUB_WORKSPACE/_default_content |