Skip to content

Commit

Permalink
debian-bullseye/yosys: needs g++ for running tests
Browse files Browse the repository at this point in the history
  • Loading branch information
umarcor committed Sep 7, 2023
1 parent d14f609 commit bf4053f
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 0 deletions.
8 changes: 8 additions & 0 deletions debian-bookworm/yosys/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,14 @@ RUN --mount=type=bind,target=/tmp/ctx . /tmp/ctx/HDLC \

RUN --mount=type=bind,target=/tmp/ctx . /tmp/ctx/HDLC && build

RUN --mount=type=bind,target=/tmp/ctx . /tmp/ctx/HDLC \
&& apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get -y install --no-install-recommends ${depends[@]} ${testdepends[@]} \
&& apt-get autoclean && apt-get clean && apt-get -y autoremove \
&& rm -rf /var/lib/apt/lists/*

RUN --mount=type=bind,target=/tmp/ctx . /tmp/ctx/HDLC && runtests

#---

FROM scratch AS pkg
Expand Down
8 changes: 8 additions & 0 deletions debian-bookworm/yosys/HDLC
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,19 @@ makedepends=(
make
)

testdepends=(
g++
)

build() {
git clone https://github.com/YosysHQ/yosys.git /tmp/yosys
cd /tmp/yosys
make -j $(nproc)
make DESTDIR=/opt/yosys install
}

runtests() {
cd /tmp/yosys
make test
}

Expand Down
8 changes: 8 additions & 0 deletions debian-bullseye/yosys/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,14 @@ RUN --mount=type=bind,target=/tmp/ctx . /tmp/ctx/HDLC \

RUN --mount=type=bind,target=/tmp/ctx . /tmp/ctx/HDLC && build

RUN --mount=type=bind,target=/tmp/ctx . /tmp/ctx/HDLC \
&& apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get -y install --no-install-recommends ${depends[@]} ${testdepends[@]} \
&& apt-get autoclean && apt-get clean && apt-get -y autoremove \
&& rm -rf /var/lib/apt/lists/*

RUN --mount=type=bind,target=/tmp/ctx . /tmp/ctx/HDLC && runtests

#---

FROM scratch AS pkg
Expand Down
8 changes: 8 additions & 0 deletions debian-bullseye/yosys/HDLC
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,19 @@ makedepends=(
make
)

testdepends=(
g++
)

build() {
git clone https://github.com/YosysHQ/yosys.git /tmp/yosys
cd /tmp/yosys
make -j $(nproc)
make DESTDIR=/opt/yosys install
}

runtests() {
cd /tmp/yosys
make test
}

Expand Down

0 comments on commit bf4053f

Please sign in to comment.