-
Notifications
You must be signed in to change notification settings - Fork 0
81 lines (72 loc) · 2.23 KB
/
fold-test.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
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 python3-llvmlite 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
- 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