2024-01-23 15:50:06 -06:00
|
|
|
name: Build and test doc code samples
|
|
|
|
|
|
|
|
on:
|
|
|
|
pull_request:
|
|
|
|
branches:
|
2024-03-23 23:41:40 -05:00
|
|
|
- main
|
2024-01-23 15:50:06 -06:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
test-docs:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Install Dependencies
|
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
sudo apt-get update
|
2024-01-24 14:38:50 -06:00
|
|
|
sudo apt-get install gperf build-essential bison flex libreadline-dev gawk tcl-dev libffi-dev git graphviz xdot pkg-config python3 libboost-system-dev libboost-python-dev libboost-filesystem-dev zlib1g-dev
|
2024-01-23 15:50:06 -06:00
|
|
|
|
|
|
|
- name: Setup GCC
|
|
|
|
uses: Dup4/actions-setup-gcc@v1
|
|
|
|
|
|
|
|
- name: Runtime environment
|
|
|
|
shell: bash
|
|
|
|
env:
|
|
|
|
WORKSPACE: ${{ github.workspace }}
|
|
|
|
run: |
|
|
|
|
echo "GITHUB_WORKSPACE=`pwd`" >> $GITHUB_ENV
|
|
|
|
echo "$GITHUB_WORKSPACE/.local/bin" >> $GITHUB_PATH
|
|
|
|
echo "procs=$(nproc)" >> $GITHUB_ENV
|
|
|
|
|
|
|
|
- name: Checkout Yosys
|
|
|
|
uses: actions/checkout@v3
|
2024-04-12 00:08:18 -05:00
|
|
|
with:
|
|
|
|
submodules: true
|
2024-01-23 15:50:06 -06:00
|
|
|
- name: Build yosys
|
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
make config-gcc
|
|
|
|
make -j${{ env.procs }}
|
|
|
|
|
|
|
|
- name: Run tests
|
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
make -C docs test -j${{ env.procs }}
|