mddbench: Fix repo format #2
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
name: Build Yosys and run under mddbench | |
on: [push, pull_request] | |
jobs: | |
pre-job: | |
runs-on: ubuntu-latest | |
outputs: | |
should_skip: ${{ steps.skip_check.outputs.should_skip }} | |
steps: | |
- id: skip_check | |
uses: fkirc/skip-duplicate-actions@v5 | |
with: | |
paths_ignore: '["**/README.md", "docs/**", "guidelines/**", "tests/**", "examples/**"]' | |
# cancel previous builds if a new commit is pushed | |
cancel_others: 'true' | |
# only run on push *or* pull_request, not both | |
concurrent_skipping: 'same_content_newer' | |
build-yosys: | |
runs-on: [self-hosted, linux, x64] | |
needs: [pre-job] | |
if: needs.pre_job.outputs.should_skip != 'true' | |
outputs: | |
yosys-key: ${{ steps.rte.outputs.yosys-key }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
persist-credentials: false | |
submodules: true | |
- name: Runtime environment | |
id: rte | |
run: | | |
echo "procs=$(nproc)" >> $GITHUB_ENV | |
echo "yosys-key=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT | |
- name: Cache Yosys | |
id: cache-yosys | |
uses: actions/cache@v4 | |
with: | |
path: .local/yosys/ | |
key: linux-${{ steps.rte.outputs.yosys-key }} | |
- name: Build Yosys | |
if: steps.cache-yosys.outputs.cache-hit != 'true' | |
run: | | |
make config-clang | |
echo "ENABLE_VERIFIC := 1" >> Makefile.conf | |
echo "ENABLE_VERIFIC_EDIF := 1" >> Makefile.conf | |
echo "ENABLE_VERIFIC_LIBERTY := 1" >> Makefile.conf | |
echo "ENABLE_VERIFIC_YOSYSHQ_EXTENSIONS := 1" >> Makefile.conf | |
echo "ENABLE_CCACHE := 1" >> Makefile.conf | |
make -j${{ env.procs }} ENABLE_LTO=1 | |
make install DESTDIR=${GITHUB_WORKSPACE}/.local/yosys PREFIX= | |
- name: Configure mddbench | |
run: | | |
sed -i -e 's|{YOSYS_KEY}|'${{ env.YOSYS_KEY }}'|g' mddbench-config.yaml | |
- name: Store mddbench-config | |
uses: actions/upload-artifact@v4 | |
with: | |
name: mddbench-config | |
path: mddbench-config.yaml | |
retention-days: 1 | |
base: | |
runs-on: [self-hosted, linux, x64, long] | |
needs: [build-yosys, pre-job] | |
if: needs.pre_job.outputs.should_skip != 'true' | |
env: | |
YOSYS_KEY: ${{ needs.build-yosys.outputs.yosys-key }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
repository: YosysHQ/mddbench | |
submodules: recursive | |
- name: Runtime environment | |
run: | | |
echo "procs=$(nproc)" >> $GITHUB_ENV | |
- name: Restore Yosys | |
uses: actions/cache/restore@v4 | |
with: | |
path: .local/yosys/ | |
key: linux-${{ env.YOSYS_KEY }} | |
fail-on-cache-miss: true | |
- name: Download mddbench-config | |
uses: actions/download-artifact@v4 | |
with: | |
name: mddbench-config | |
- name: Setup mddbench | |
run: | | |
sed -e 's|{GITHUB_WORKSPACE}|'${GITHUB_WORKSPACE}'|g' < mddbench-config.yaml > config.yaml | |
pip install -r scripts/requirements.txt | |
- name: Run mddbench | |
run: | | |
python3 -m scripts.mau_runner -j${{ env.procs }} -Eg --flowgroup=base | |
cat gh.md >> $GITHUB_STEP_SUMMARY |