Skip to content

Commit 3297403

Browse files
committed
impl: Restructure build; Add icestorm and prjtrellis
two separated images impl:{ice40,ecp5} WIP Update impl images WIP fix impl tests WIP fix file perm impl tests
1 parent ac89ad3 commit 3297403

File tree

8 files changed

+128
-16
lines changed

8 files changed

+128
-16
lines changed

.github/workflows/impl.yml

Lines changed: 28 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,19 @@ jobs:
4343

4444
- run: echo "$(pwd)/.github/bin" >> $GITHUB_PATH
4545

46-
- run: dockerBuild impl impl
46+
- run: dockerBuild impl:ice40 impl ice40
47+
- run: dockerBuild impl:icestorm impl icestorm
48+
- run: dockerBuild impl:ecp5 impl ecp5
49+
- run: dockerBuild impl:prjtrellis impl prjtrellis
50+
- run: dockerBuild impl:pnr impl pnr
51+
- run: dockerBuild impl:latest impl latest
4752

48-
- run: dockerTest impl
53+
- run: dockerTest impl:ice40 impl--ice40
54+
- run: dockerTest impl:icestorm impl--icestorm
55+
- run: dockerTest impl:ecp5 impl--ecp5
56+
- run: dockerTest impl:prjtrellis impl--prjtrellis
57+
- run: dockerTest impl:pnr impl--pnr
58+
- run: dockerTest impl:latest impl
4959

5060
- name: Login to DockerHub
5161
if: github.event_name != 'pull_request' && github.repository == 'hdl/containers'
@@ -54,5 +64,20 @@ jobs:
5464
username: ${{ secrets.DOCKER_USER }}
5565
password: ${{ secrets.DOCKER_PASS }}
5666

57-
- run: dockerPush impl
67+
- run: dockerPush impl:ice40
68+
if: github.event_name != 'pull_request' && github.repository == 'hdl/containers'
69+
70+
- run: dockerPush impl:icestorm
71+
if: github.event_name != 'pull_request' && github.repository == 'hdl/containers'
72+
73+
- run: dockerPush impl:ecp5
74+
if: github.event_name != 'pull_request' && github.repository == 'hdl/containers'
75+
76+
- run: dockerPush impl:prjtrellis
77+
if: github.event_name != 'pull_request' && github.repository == 'hdl/containers'
78+
79+
- run: dockerPush impl:pnr
80+
if: github.event_name != 'pull_request' && github.repository == 'hdl/containers'
81+
82+
- run: dockerPush impl:latest
5883
if: github.event_name != 'pull_request' && github.repository == 'hdl/containers'

impl.dockerfile

Lines changed: 42 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,20 +17,52 @@
1717
#
1818
# SPDX-License-Identifier: Apache-2.0
1919

20-
FROM hdlc/nextpnr
20+
FROM hdlc/ghdl:yosys AS base
2121

2222
COPY --from=hdlc/pkg:ghdl-yosys-plugin /ghdl /
2323
COPY --from=hdlc/pkg:yosys /yosys /
2424

2525
RUN apt-get update -qq \
2626
&& DEBIAN_FRONTEND=noninteractive apt-get -y install --no-install-recommends \
27-
libffi-dev \
28-
libgnat-8 \
29-
libreadline-dev \
30-
tcl-dev \
31-
graphviz \
32-
xdot \
27+
libboost-all-dev \
28+
libomp5-7 \
29+
make \
3330
&& apt-get autoclean && apt-get clean && apt-get -y autoremove \
34-
&& rm -rf /var/lib/apt/lists \
35-
&& yosys-config --exec mkdir -p --datdir/plugins \
36-
&& yosys-config --exec ln -s /usr/local/lib/ghdl_yosys.so --datdir/plugins/ghdl.so
31+
&& rm -rf /var/lib/apt/lists
32+
33+
#---
34+
35+
FROM base AS ice40
36+
37+
COPY --from=hdlc/pkg:nextpnr-ice40 /nextpnr /
38+
39+
#---
40+
41+
FROM ice40 AS icestorm
42+
43+
COPY --from=hdlc/pkg:icestorm /icestorm /
44+
45+
#---
46+
47+
FROM base AS ecp5
48+
49+
COPY --from=hdlc/pkg:nextpnr-ecp5 /nextpnr /
50+
51+
#---
52+
53+
FROM ecp5 AS prjtrellis
54+
55+
COPY --from=hdlc/pkg:prjtrellis /prjtrellis /
56+
57+
#---
58+
59+
FROM base AS pnr
60+
61+
COPY --from=hdlc/pkg:nextpnr-all /nextpnr /
62+
63+
#---
64+
65+
FROM pnr AS latest
66+
67+
COPY --from=hdlc/pkg:icestorm /icestorm /
68+
COPY --from=hdlc/pkg:prjtrellis /prjtrellis /

test/impl--ecp5.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/usr/bin/env sh
2+
3+
set -e
4+
5+
cd $(dirname "$0")
6+
7+
./ghdl.sh
8+
./yosys.sh
9+
./nextpnr--ecp5.sh

test/impl--ice40.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/usr/bin/env sh
2+
3+
set -e
4+
5+
cd $(dirname "$0")
6+
7+
./ghdl.sh
8+
./yosys.sh
9+
./nextpnr--ice40.sh

test/impl--icestorm.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/usr/bin/env sh
2+
3+
set -e
4+
5+
cd $(dirname "$0")
6+
7+
./ghdl.sh
8+
./yosys.sh
9+
10+
./nextpnr--ice40.sh
11+
./icestorm.sh

test/impl--pnr.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/usr/bin/env sh
2+
3+
set -e
4+
5+
cd $(dirname "$0")
6+
7+
./ghdl.sh
8+
./yosys.sh
9+
10+
./nextpnr--ecp5.sh
11+
./nextpnr--ice40.sh

test/impl--prjtrellis.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/usr/bin/env sh
2+
3+
set -e
4+
5+
cd $(dirname "$0")
6+
7+
./ghdl.sh
8+
./yosys.sh
9+
10+
./nextpnr--ecp5.sh
11+
./prjtrellis.sh

test/impl.sh

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,11 @@ cd $(dirname "$0")
2929
./smoke-tests/nextpnr.sh
3030
./smoke-tests/yosys.sh
3131

32-
ghdl --version
33-
yosys --version
32+
./ghdl.sh
33+
./yosys.sh
3434

35-
./_todo.sh
35+
./nextpnr--ice40.sh
36+
./icestorm.sh
37+
38+
./nextpnr--ecp5.sh
39+
./prjtrellis.sh

0 commit comments

Comments
 (0)