ast: Add new arguments to print_code_snippet
#36
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: Run Fold tests | |
on: | |
push: | |
branches: [ "*" ] | |
pull_request: | |
branches: [ "*" ] | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
steps: | |
- name: Install Dependencies | |
shell: bash | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y 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 | |
sudo pip3 install llvmlite | |
- uses: actions/checkout@v4 | |
with: | |
path: fold | |
- name: Find out fold-yosys tip hash | |
run: | | |
{ | |
echo -n "FOLD_YOSYS_HASH=" | |
curl -s -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ | |
-H "Accept: application/vnd.github.VERSION.sha" \ | |
"https://api.github.com/repos/povik/fold-yosys/commits/master" \ | |
--fail | |
} >> $GITHUB_ENV | |
- name: Cache fold-yosys build | |
id: cache-fold-yosys | |
uses: actions/cache@v3 | |
env: | |
cache-name: cache-fold-yosys | |
with: | |
path: fold-yosys | |
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ env.FOLD_YOSYS_HASH }} | |
- if: ${{ steps.cache-fold-yosys.outputs.cache-hit != 'true' }} | |
uses: actions/checkout@v4 | |
with: | |
repository: 'povik/fold-yosys' | |
path: fold-yosys | |
- if: ${{ steps.cache-fold-yosys.outputs.cache-hit != 'true' }} | |
name: Build fold-yosys | |
shell: bash | |
run: | | |
cd fold-yosys | |
make config-gcc | |
echo "ENABLE_PYOSYS := 1" >> Makefile.conf | |
echo "ENABLE_ABC := 0" >> Makefile.conf | |
echo "PROGRAM_PREFIX := fold-" >> Makefile.conf | |
make -j6 | |
- name: Install fold-yosys | |
shell: bash | |
run: | | |
cd fold-yosys | |
sudo make install | |
- name: Build fold | |
shell: bash | |
run: | | |
cd fold | |
YOSYS_PREFIX=fold- make -j8 | |
- name: Print machinecode versions | |
shell: bash | |
run: | | |
cd fold | |
python3 -m fold.machinecode -V | |
- name: Run tests | |
shell: bash | |
run: | | |
cd fold | |
YOSYS_PREFIX=fold- make test |