Skip to content

revise workflow

revise workflow #4

Workflow file for this run

name: Run regression
on:
push:
branches: ["main"]
tags:
- 'v*'
pull_request:
branches: ["main"]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: true
- name: Setup python
run: pip3 install -r requirements.txt
- name: Build models
run: |
pushd src/gen
make all
zip lc4k_core.zip *.vhd ../rtl/*.vhd
popd
- uses: YosysHQ/setup-oss-cad-suite@v3
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Run tests
# don't run tests for tags
if: ${{ ! startsWith(github.ref, 'refs/tags/') }}
run: |
pushd tests
for dir in `find . -mindepth 1 -maxdepth 1 -type d`; do
pushd $dir
make
popd
done
popd
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: lc4k_core
path: src/gen/lc4k_core.zip
- name: Create Release
if: startsWith(github.ref, 'refs/tags/')
uses: actions/create-release@v1
id: create_release
with:
draft: false
prerelease: false
release_name: Release ${{ github.ref }}
tag_name: ${{ github.ref }}
body_path: CHANGELOG.md
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload Release
if: startsWith(github.ref, 'refs/tags/')
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: src/gen/lc4k_core.zip
asset_name: lc4k_core.zip
asset_content_type: application/zip