blob: 629c2811bd8b9f2358bbce80ad6a44b5a10324e6 [file] [log] [blame]
name: Tool Updater
# To run on the GCP replace all 'ubuntu-latest' with 'self-hosted'
on:
# Runs every day at midnight UTC
schedule:
- cron: "0 0 * * *"
# Manual Dispatch
workflow_dispatch:
jobs:
create-cid-tools-branches:
runs-on: ubuntu-20.04
strategy:
matrix:
tools: [magic, netgen, yosys, openroad_app]
steps:
# EXPORT BLOCK
- name: Export Repo URL
run: echo "REPO_URL=https://github.com/${{ github.repository }}" >> $GITHUB_ENV
- name: Export Branch Name
run: echo "BRANCH_NAME=${{ secrets.MAIN_BRANCH }}" >> $GITHUB_ENV
- name: Export PDK ROOT
run: echo "PDK_ROOT=${{ github.workspace }}/pdks" >> $GITHUB_ENV
# END EXPORT BLOCK
- uses: actions/checkout@v2
with:
ref: ${{ secrets.MAIN_BRANCH }}
- name: Export TOOL Name
run: echo "TOOL=${{ matrix.tools }}" >> $GITHUB_ENV
- name: Update TOOL
run: cd ${GITHUB_WORKSPACE}/ && python3 ${GITHUB_WORKSPACE}/.github/scripts/update_tools.py ${{ env.TOOL }}
- name: Create Pull Request
if: ${{ env.NO_UPDATE != '1' }}
uses: peter-evans/create-pull-request@v3
with:
token: ${{ secrets.MY_TOKEN }}
title: "[BOT] Update ${{ env.TOOL }}"
body: |
This is an automated PR.
See the individual commits for details.
commit-message: |
[BOT] Update ${{ env.TOOL }}
${{ env.TOOL }} -> ${{ env.TOOL_COMMIT_HASH }}
branch: ${{ matrix.tools }}-update-branch
push-to-fork: ${{ secrets.FORK_NAME }}
delete-branch: true
create-cid-pdk-branch:
runs-on: ubuntu-20.04
steps:
# EXPORT BLOCK
- name: Export Repo URL
run: echo "REPO_URL=https://github.com/${{ github.repository }}" >> $GITHUB_ENV
- name: Export Branch Name
run: echo "BRANCH_NAME=${{ secrets.MAIN_BRANCH }}" >> $GITHUB_ENV
- name: Export PDK ROOT
run: echo "PDK_ROOT=${{ github.workspace }}/pdks" >> $GITHUB_ENV
# END EXPORT BLOCK
- uses: actions/checkout@v2
with:
ref: ${{ secrets.MAIN_BRANCH }}
- name: Update PDK
run: python3 ${GITHUB_WORKSPACE}/.github/scripts/update_tools.py sky130 open_pdks
- name: Create Pull Request
if: ${{ env.NO_UPDATE != '1' }}
uses: peter-evans/create-pull-request@v3
with:
token: ${{ secrets.MY_TOKEN }}
title: "[BOT] Update PDK"
body: |
This is an automated PR.
See the individual commits for details.
commit-message: |
[BOT] Update PDK
sky130 -> ${{ env.SKY130_COMMIT_HASH }}
open_pdks -> ${{ env.OPEN_PDKS_COMMIT_HASH }}
base: ${{ env.BRANCH_NAME }}
branch: pdk-update-branch
push-to-fork: ${{ secrets.FORK_NAME }}
delete-branch: true