2024-04-16 00:50:50 -05:00
|
|
|
name: Build and run tests with Verific (Linux)
|
|
|
|
|
|
|
|
on: [push, pull_request]
|
|
|
|
|
|
|
|
jobs:
|
2024-08-15 17:43:51 -05:00
|
|
|
pre-job:
|
2024-05-08 16:39:27 -05:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
outputs:
|
|
|
|
should_skip: ${{ steps.skip_check.outputs.should_skip }}
|
|
|
|
steps:
|
|
|
|
- id: skip_check
|
|
|
|
uses: fkirc/skip-duplicate-actions@v5
|
|
|
|
with:
|
2024-09-02 18:45:00 -05:00
|
|
|
paths_ignore: '["**/README.md", "docs/**", "guidelines/**"]'
|
|
|
|
# cancel previous builds if a new commit is pushed
|
|
|
|
cancel_others: 'true'
|
2024-05-08 16:39:27 -05:00
|
|
|
# only run on push *or* pull_request, not both
|
|
|
|
concurrent_skipping: 'same_content_newer'
|
|
|
|
|
2024-04-16 00:50:50 -05:00
|
|
|
test-verific:
|
2024-08-15 17:43:51 -05:00
|
|
|
needs: pre-job
|
|
|
|
if: needs.pre-job.outputs.should_skip != 'true'
|
2024-08-19 04:24:48 -05:00
|
|
|
runs-on: [self-hosted, linux, x64, fast]
|
2024-04-16 00:50:50 -05:00
|
|
|
steps:
|
|
|
|
- name: Checkout Yosys
|
|
|
|
uses: actions/checkout@v4
|
|
|
|
with:
|
|
|
|
persist-credentials: false
|
2024-04-12 00:08:18 -05:00
|
|
|
submodules: true
|
2024-04-16 00:50:50 -05:00
|
|
|
- name: Runtime environment
|
|
|
|
run: |
|
|
|
|
echo "procs=$(nproc)" >> $GITHUB_ENV
|
|
|
|
|
|
|
|
- name: Build Yosys
|
|
|
|
run: |
|
|
|
|
make config-clang
|
|
|
|
echo "ENABLE_VERIFIC := 1" >> Makefile.conf
|
|
|
|
echo "ENABLE_VERIFIC_EDIF := 1" >> Makefile.conf
|
|
|
|
echo "ENABLE_VERIFIC_LIBERTY := 1" >> Makefile.conf
|
2024-07-09 02:22:37 -05:00
|
|
|
echo "ENABLE_VERIFIC_YOSYSHQ_EXTENSIONS := 1" >> Makefile.conf
|
2024-04-16 00:50:50 -05:00
|
|
|
echo "ENABLE_CCACHE := 1" >> Makefile.conf
|
2024-09-06 01:47:43 -05:00
|
|
|
echo "ENABLE_FUNCTIONAL_TESTS := 1" >> Makefile.conf
|
2024-08-05 12:28:09 -05:00
|
|
|
make -j${{ env.procs }} ENABLE_LTO=1
|
2024-04-16 00:50:50 -05:00
|
|
|
|
|
|
|
- name: Install Yosys
|
|
|
|
run: |
|
|
|
|
make install DESTDIR=${GITHUB_WORKSPACE}/.local PREFIX=
|
|
|
|
|
|
|
|
- name: Checkout SBY
|
|
|
|
uses: actions/checkout@v4
|
|
|
|
with:
|
|
|
|
repository: 'YosysHQ/sby'
|
|
|
|
path: 'sby'
|
|
|
|
|
|
|
|
- name: Build SBY
|
|
|
|
run: |
|
|
|
|
make -C sby install DESTDIR=${GITHUB_WORKSPACE}/.local PREFIX=
|
|
|
|
|
|
|
|
- name: Run Yosys tests
|
|
|
|
run: |
|
|
|
|
make -j${{ env.procs }} test
|
|
|
|
|
|
|
|
- name: Run Verific specific Yosys tests
|
|
|
|
run: |
|
|
|
|
make -C tests/sva
|
|
|
|
cd tests/svtypes && bash run-test.sh
|
|
|
|
|
|
|
|
- name: Run SBY tests
|
|
|
|
if: ${{ github.ref == 'refs/heads/main' }}
|
|
|
|
run: |
|
|
|
|
make -C sby run_ci
|