action for datasheet
diff --git a/.github/workflows/tt_datasheet.yaml b/.github/workflows/tt_datasheet.yaml index ac3666a..5e72008 100644 --- a/.github/workflows/tt_datasheet.yaml +++ b/.github/workflows/tt_datasheet.yaml
@@ -24,42 +24,27 @@ - name: setup python uses: actions/setup-python@v4 with: - python-version: '3.7.7' # install the python version needed + python-version: '3.7.7' + cache: 'pip' + - run: pip install -r requirements.txt - # python deps from reqirements file, use a marketplace action - - name: Install Python dependencies - uses: py-actions/py-dependency-install@v4 - with: - path: "tt_docs/requirements.txt" + # fetch the repos + - name: fetch all + run: python ./configure.py --clone-all --debug - # run the job - - name: build datasheet - run: | - cp project_urls.py tt_docs/tt02_projects.py - cd tt_docs - python builddoc.py - - # convert to PDF + # pandoc deps - name: Pandoc deps run: | sudo apt-get update -y sudo apt-get install -y pandoc texlive-xetex - - name: convert pdf - run: | - cd tt_docs - ./pandoc.sh + # dump pdf + - name: update datasheet + run: python ./configure.py --dump-markdown datasheet.md --dump-pdf datasheet.pdf # archive the PDF - name: Archive PDF uses: actions/upload-artifact@v3 with: name: PDF - path: tt_docs/tt02.pdf - - # archive the MD - - name: Archive MD - uses: actions/upload-artifact@v3 - with: - name: MD - path: tt_docs/tt02.md + path: datasheet.pdf
diff --git a/git_utils.py b/git_utils.py index 00c8c0d..641cd4e 100644 --- a/git_utils.py +++ b/git_utils.py
@@ -42,6 +42,7 @@ return file_content + # the latest artifact isn't necessarily the one related to the latest commit, as github # could have taken longer to process an older commit than a newer one. # so iterate through commits and return the artifact that matches @@ -51,6 +52,7 @@ if commit['sha'] in release_sha_to_download_url: return release_sha_to_download_url[commit['sha']] + def split_git_url(url): res = urlparse(url) try: @@ -61,6 +63,7 @@ repo = repo.replace('.git', '') return user_name, repo + # download the artifact for each project to get the gds & lef def install_artifacts(url, directory): logging.debug(url)
diff --git a/lint.sh b/lint.sh index 70f483b..f48f86a 100755 --- a/lint.sh +++ b/lint.sh
@@ -1 +1,2 @@ flake8 --ignore W605,E203,E123,E501,E221,E401 configure.py +flake8 --ignore W605,E203,E123,E501,E221,E401 git_utils.py