Build and test with the latest version of tools set #256
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 flow will build the latest docker image, test the OpenFASOC flow in it and if it works, update the readme file and push it to the docker hub for reference | |
name: Build and test with the latest version of tools set | |
on: | |
#push: | |
#pull_request: | |
workflow_dispatch: | |
schedule: | |
- cron: 0 1 * * * # run at 1 AM UTC | |
jobs: | |
build_docker_image: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v2 | |
- name: Log in to Docker Hub | |
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- name: Build the docker image | |
env: | |
IMAGE_NAME: msaligane/openfasoc:alpha | |
run: | | |
cd $GITHUB_WORKSPACE/docker/conda | |
docker build -t $IMAGE_NAME . | |
docker push $IMAGE_NAME | |
sky130hd_temp: | |
needs: build_docker_image | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v2 | |
- name: Test sky130hd Temp sensor | |
env: | |
IMAGE_NAME: msaligane/openfasoc:alpha | |
run: | | |
cd $GITHUB_WORKSPACE | |
touch file.log | |
docker run --rm \ | |
-v $PWD:$PWD\ | |
-w $PWD\ | |
$IMAGE_NAME\ | |
bash -c "\ | |
pip3 install -r requirements.txt &&\ | |
cd ./openfasoc/generators/temp-sense-gen &&\ | |
make sky130hd_temp\ | |
">> file.log | |
if grep "\[ERROR\]" file.log; then exit 1; else exit 0; fi | |
# sky130hd_temp_full: | |
# runs-on: self-hosted | |
# steps: | |
# - name: Checkout repo | |
# uses: actions/checkout@v2 | |
# - name: Test sky130hd Temp sensor | |
# env: | |
# IMAGE_NAME: msaligane/openfasoc:alpha | |
# run: | | |
# cd $GITHUB_WORKSPACE | |
# touch flow_report.log | |
# docker run --rm \ | |
# -v $PWD:$PWD\ | |
# -w $PWD\ | |
# $IMAGE_NAME\ | |
# bash -c "\ | |
# pip3 install -r requirements.txt &&\ | |
# cd ./openfasoc/generators/temp-sense-gen &&\ | |
# make clean &&\ | |
# make sky130hd_temp_full\ | |
# ">> flow_report.log | |
# if grep "\[ERROR\]" flow_report.log; then exit 1; else exit 0; fi | |
update_readme: | |
needs: sky130hd_temp | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v2 | |
- name: Grep the commit numbers of all dependent tools and update README.rst | |
env: | |
IMAGE_NAME: msaligane/openfasoc:alpha | |
run: | | |
cd $GITHUB_WORKSPACE | |
docker run --rm \ | |
-v $PWD:$PWD\ | |
-w $PWD\ | |
$IMAGE_NAME\ | |
bash -c "\ | |
chmod 755 /scripts/extract_conda_versions.sh | |
/scripts/extract_conda_versions.sh > conda_versions.txt | |
chmod 755 /scripts/extract_tool_versions.sh | |
/scripts/extract_tool_versions.sh > versions.txt | |
/scripts/modify_readme.py" | |
- name: Log in to Docker Hub | |
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- name: Push the docker image | |
env: | |
IMAGE_NAME: msaligane/openfasoc:stable | |
run: | | |
docker tag msaligane/openfasoc:alpha $IMAGE_NAME | |
docker push $IMAGE_NAME | |
- name: Create Pull Request | |
uses: peter-evans/create-pull-request@v4 | |
with: | |
token: ${{ secrets.BOT_TOKEN }} | |
title: "[BOT] Update successful version records of dependencies to the repository" | |
author: ${{ secrets.BOT_AUTHOR_LINE }} | |
committer: ${{ secrets.BOT_AUTHOR_LINE }} | |
body: | | |
This is an automated PR. | |
See the individual commits for details. | |
commit-message: | | |
[BOT] Update dependencies successful version records in the repository | |
branch: versions-update-branch | |
push-to-fork: ${{ secrets.FORK_NAME }} | |
delete-branch: true | |
# - name: Commit README.rst | |
# run: | | |
# git config --global user.name 'idea-fasoc' | |
# git config --global user.email '[email protected]' | |
# git add -A | |
# git commit -m "Updated README with latest stable version numbers of dependent tools" | |
# git push |