Synplify Flow Integration #1562
Workflow file for this run
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
# Copyright 2020-2022 F4PGA Authors | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# | |
# Unless required by applicable law or agreed to in writing, software | |
# distributed under the License is distributed on an "AS IS" BASIS, | |
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
# See the License for the specific language governing permissions and | |
# limitations under the License. | |
# | |
# SPDX-License-Identifier: Apache-2.0 | |
name: CI tests | |
on: [push, pull_request] | |
jobs: | |
Run-tests: | |
runs-on: ubuntu-20.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
plugin: | |
- fasm | |
- xdc | |
- params | |
- sdc | |
- ql-iob | |
- design_introspection | |
- integrateinv | |
- ql-qlf | |
- systemverilog | |
- uhdm | |
- dsp-ff | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
submodules: recursive | |
- uses: actions/setup-python@v2 | |
- name: Install | |
run: | | |
sudo apt-get update | |
sudo apt-get install git g++-9 build-essential bison flex \ | |
libreadline-dev gawk tcl-dev libffi-dev git graphviz xdot \ | |
pkg-config libboost-system-dev libboost-python-dev \ | |
libboost-filesystem-dev zlib1g-dev clang-format-8 cmake | |
- name: Format | |
run: source .github/workflows/format-check.sh | |
env: | |
OS: ${{ runner.os }} | |
- name: ccache | |
uses: hendrikmuhs/ccache-action@v1 | |
- name: Install Yosys | |
run: | | |
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH" | |
source .github/workflows/setup.sh | |
env: | |
OS: ${{ runner.os }} | |
- name: Build and test plugins | |
run: | | |
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH" | |
source env/conda/bin/activate yosys-plugins | |
source .github/workflows/build-and-test.sh | |
env: | |
OS: ${{ runner.os }} | |
PLUGIN_NAME: ${{ matrix.plugin }} | |
release-tagging: | |
name: Version Tagging | |
runs-on: ubuntu-20.04 | |
if: ${{github.event_name == 'push' && github.ref == 'refs/heads/main'}} | |
permissions: | |
contents: write | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Tag with Makefile version if not already. | |
run: | | |
git config --local user.name "Development Bot" | |
git config --local user.email "[email protected]" | |
# We want to tag whenever the version in the Makefile changes. | |
# So extract the hash of when the current version was entered. | |
read TAG_HASH TAG_VERSION <<<$(git annotate -l Makefile | sed 's/\(^[0-9A-Fa-f]\+\).*PLUGIN_VERSION\s\+=\s\+\([0-9]\+\.[0-9]\+\).*/\1 \2/p;d') | |
echo "F4PGA Yosys Plugin Version v${TAG_VERSION} at hash ${TAG_HASH}" | |
# If this is the first time we see this tag: apply. | |
if [ -z "$(git tag -l "v${TAG_VERSION}")" ]; then | |
git tag -a "v${TAG_VERSION}" ${TAG_HASH} -m "Update to v${TAG_VERSION}" | |
git push origin "v${TAG_VERSION}" | |
else | |
echo "Tag already applied" | |
fi |