changelog #18
This file contains hidden or 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
| 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 | |
| popd | |
| zip lc4k_core.zip src/gen/*.vhd src/rtl/*.vhd README.md LICENSE | |
| - uses: YosysHQ/setup-oss-cad-suite@v4 | |
| # don't run tests for tags | |
| if: ${{ ! startsWith(github.ref, 'refs/tags/') }} | |
| with: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Run tests | |
| # don't run tests for tags | |
| if: ${{ ! startsWith(github.ref, 'refs/tags/') }} | |
| run: | | |
| pushd tests | |
| fail=0 | |
| for dir in `find . -mindepth 1 -maxdepth 1 -type d`; do | |
| pushd $dir | |
| if ! make; then | |
| fail=1 | |
| popd | |
| break | |
| fi | |
| popd | |
| done | |
| if [ ! $fail -eq 0 ]; then false; else true; fi | |
| - name: Upload artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: lc4k_core | |
| path: 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: lc4k_core.zip | |
| asset_name: lc4k_core.zip | |
| asset_content_type: application/zip |