From 5c4abf7c8ee2219dc6c2841d709ac565bb457cc8 Mon Sep 17 00:00:00 2001 From: Sebastian Birke Date: Sun, 13 Dec 2020 00:14:12 +0100 Subject: [PATCH 1/2] builds: get source code through git clone to derive version strings later --- base.dockerfile | 1 + nextpnr.dockerfile | 14 ++++++-------- yosys.dockerfile | 5 ++--- 3 files changed, 9 insertions(+), 11 deletions(-) diff --git a/base.dockerfile b/base.dockerfile index e51677d8..044a8486 100644 --- a/base.dockerfile +++ b/base.dockerfile @@ -35,6 +35,7 @@ FROM base AS build RUN apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get -y install --no-install-recommends \ clang \ + git \ make ENV CC clang diff --git a/nextpnr.dockerfile b/nextpnr.dockerfile index adfe8e4f..f28ed9bd 100644 --- a/nextpnr.dockerfile +++ b/nextpnr.dockerfile @@ -43,10 +43,9 @@ RUN apt-get update -qq \ FROM build AS build-ice40 COPY --from=hdlc/pkg:icestorm /icestorm/usr/local/share/icebox /usr/local/share/icebox -RUN mkdir -p /tmp/nextpnr/build \ - && cd /tmp/nextpnr \ - && curl -fsSL https://codeload.github.com/YosysHQ/nextpnr/tar.gz/master | tar xzf - --strip-components=1 \ - && cd build \ +RUN git clone https://github.com/YosysHQ/nextpnr.git /tmp/nextpnr \ + && mkdir /tmp/nextpnr/build/ \ + && cd /tmp/nextpnr/build \ && cmake .. \ -DARCH=ice40 \ -DBUILD_GUI=OFF \ @@ -70,10 +69,9 @@ COPY --from=hdlc/pkg:icestorm /icestorm / FROM build AS build-ecp5 COPY --from=hdlc/pkg:prjtrellis /prjtrellis / -RUN mkdir -p /tmp/nextpnr/build \ - && cd /tmp/nextpnr \ - && curl -fsSL https://codeload.github.com/YosysHQ/nextpnr/tar.gz/master | tar xzf - --strip-components=1 \ - && cd build \ +RUN git clone https://github.com/YosysHQ/nextpnr.git /tmp/nextpnr \ + && mkdir /tmp/nextpnr/build/ \ + && cd /tmp/nextpnr/build \ && cmake .. \ -DARCH=ecp5 \ -DBUILD_GUI=OFF \ diff --git a/yosys.dockerfile b/yosys.dockerfile index f731df1f..fda3804e 100644 --- a/yosys.dockerfile +++ b/yosys.dockerfile @@ -39,15 +39,14 @@ RUN apt-get update -qq \ flex \ gawk \ gcc \ - git \ iverilog \ pkg-config \ zlib1g-dev \ && apt-get autoclean && apt-get clean && apt-get -y autoremove \ && rm -rf /var/lib/apt/lists/* -RUN mkdir /tmp/yosys && cd /tmp/yosys \ - && curl -fsSL https://codeload.github.com/YosysHQ/yosys/tar.gz/master | tar xzf - --strip-components=1 \ +RUN git clone https://github.com/YosysHQ/yosys.git /tmp/yosys \ + && cd /tmp/yosys \ && make -j $(nproc) \ && make DESTDIR=/opt/yosys install \ && make test From 5216482f15b7164dc02afd52a5d8fc047617290a Mon Sep 17 00:00:00 2001 From: Sebastian Birke Date: Sun, 13 Dec 2020 00:15:11 +0100 Subject: [PATCH 2/2] tests: extend some tests with querying versions of the tools --- test/nextpnr--ecp5.sh | 2 ++ test/nextpnr--ice40.sh | 2 ++ test/nextpnr.sh | 3 +++ test/prjtrellis.sh | 2 ++ 4 files changed, 9 insertions(+) diff --git a/test/nextpnr--ecp5.sh b/test/nextpnr--ecp5.sh index d9604cbd..ecd7e454 100755 --- a/test/nextpnr--ecp5.sh +++ b/test/nextpnr--ecp5.sh @@ -27,4 +27,6 @@ cd $(dirname "$0") ./smoke-tests/nextpnr-ecp5.sh +nextpnr-ecp5 --version + ./_todo.sh diff --git a/test/nextpnr--ice40.sh b/test/nextpnr--ice40.sh index 27584ede..4bb430ea 100755 --- a/test/nextpnr--ice40.sh +++ b/test/nextpnr--ice40.sh @@ -27,4 +27,6 @@ cd $(dirname "$0") ./smoke-tests/nextpnr-ice40.sh +nextpnr-ice40 --version + ./_todo.sh diff --git a/test/nextpnr.sh b/test/nextpnr.sh index fb8af3ec..fccc5475 100755 --- a/test/nextpnr.sh +++ b/test/nextpnr.sh @@ -27,4 +27,7 @@ cd $(dirname "$0") ./smoke-tests/nextpnr.sh +nextpnr-ecp5 --version +nextpnr-ice40 --version + ./_todo.sh diff --git a/test/prjtrellis.sh b/test/prjtrellis.sh index 415b7b41..cad60bdc 100755 --- a/test/prjtrellis.sh +++ b/test/prjtrellis.sh @@ -27,4 +27,6 @@ cd $(dirname "$0") ./smoke-tests/prjtrellis.sh +ecppack --version + ./_todo.sh