-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of https://github.com/newmansc2/openEBL-2024-07-S…
…i-Heaters into pr/44
- Loading branch information
Showing
188 changed files
with
9,926 additions
and
497 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
name: Automatic Approve | ||
on: | ||
schedule: | ||
- cron: "*/5 * * * *" | ||
|
||
jobs: | ||
automatic-approve: | ||
name: Automatic Approve | ||
if: github.repository_owner == 'SiEPIC' | ||
#if: >- | ||
#github.event.pull_request.user.login != 'SiEPIC' && repository_dispatch.organization | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Automatic Approve | ||
uses: mheap/automatic-approve-action@v1 | ||
with: | ||
token: ${{ secrets.PAT }} | ||
workflows: "run-verification.yml,run-drc.yml,run-yaml-verification.yml,yaml_file.yml" |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,109 @@ | ||
name: Run DRC Verification | ||
|
||
on: | ||
workflow_dispatch: | ||
workflow_run: | ||
workflows: ["Run Python Files"] | ||
types: | ||
- completed | ||
push: | ||
paths: | ||
- 'submissions/**.gds' | ||
- 'submissions/**.oas' | ||
branches: | ||
- '**' | ||
pull_request: | ||
paths: | ||
- 'submissions/**.gds' | ||
- 'submissions/**.oas' | ||
branches: | ||
- '**' | ||
|
||
|
||
jobs: | ||
verification: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: checkout repo content | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
# can also specify python version if needed | ||
- name: setup python | ||
uses: actions/setup-python@v4 | ||
|
||
- name: install python packages | ||
run: | | ||
pip install klayout | ||
- name: get .gds and .oas files, run example layout verification | ||
id: run-script | ||
run: | | ||
# if the action is being triggered after running python files, get resulting oas files from txt file | ||
# github actions is not configured to detect files pushed from another action, thus we cannot use the method below | ||
if [ -s "python-to-gds_oas.txt" ] && [ -n "$(cat python-to-gds_oas.txt)" ]; then | ||
export FILES=$(cat python-to-gds_oas.txt) | ||
IFS=' ' | ||
echo "" > python-to-gds_oas.txt | ||
# push empty text file to repo | ||
git config --local user.email "${{ github.actor }}@users.noreply.github.com" | ||
git config --local user.name "${{ github.actor }}" | ||
git add python-to-gds_oas.txt | ||
git commit -m "Emptying text file" | ||
git push | ||
else | ||
if [ "${{ github.event_name }}" = "pull_request" ]; then | ||
# triggered on pull request, get all changed / added files from forked repo | ||
export FILES=$(git diff --name-only --diff-filter=ACM origin/main...HEAD | grep -E '\.(gds|oas)$' | sed 's|^submissions/||') | ||
else | ||
# triggered push, locate the changed / added .gds and .oas files in the submission folder | ||
export FILES=$(git diff --name-status --diff-filter=ACM --relative=submissions ${{ github.event.before }} ${{ github.sha }} submissions | grep -E '\.(gds|oas)$' | awk '{print $2}') | ||
fi | ||
IFS=$'\n' | ||
fi | ||
# print the names of the files | ||
echo "Files for verification; $FILES" | ||
files_with_errors="" | ||
# run verification on all files | ||
for file in $FILES; do | ||
echo "Running verification on $file" | ||
output=$(python run_DRC.py "submissions/$file") | ||
# get number of errors | ||
errors_from_output=$(echo "$output" | tail -n 1) | ||
echo "$errors_from_output errors detected for $file" | ||
# if file results in verification errors add to string files_with_errors | ||
if [[ "$errors_from_output" -ge 1 ]]; then | ||
files_with_errors+="$file, $errors_from_output errors. " | ||
echo $files_with_errors >> $GITHUB_STEP_SUMMARY | ||
echo $output >> $GITHUB_STEP_SUMMARY | ||
fi | ||
echo "Done verification on $file" | ||
done | ||
echo "files_with_errors=$files_with_errors" >> $GITHUB_ENV | ||
- name: fail if there are errors from layout verification | ||
run: | | ||
if [ -z "$files_with_errors" ]; then | ||
echo "No errors detected." | ||
echo "No errors detected." >> $GITHUB_STEP_SUMMARY | ||
else | ||
echo "Errors detected: $files_with_errors" | ||
echo "Errors detected: $files_with_errors" >> $GITHUB_STEP_SUMMARY | ||
exit 1 | ||
fi | ||
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
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
Oops, something went wrong.