Skip to content

Commit 435d5cc

Browse files
authored
Make dev container point to top-of-tree instead of latest release (#3360)
1 parent 8851fae commit 435d5cc

File tree

2 files changed

+17
-9
lines changed

2 files changed

+17
-9
lines changed

.devcontainer/Dockerfile

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM --platform=$BUILDPLATFORM ubuntu:20.04
1+
FROM --platform=$BUILDPLATFORM ubuntu:22.04
22

33
ARG TARGETARCH
44

@@ -19,8 +19,7 @@ RUN \
1919
git perl python3 make autoconf clang flex bison ccache \
2020
libgoogle-perftools-dev numactl perl-doc \
2121
libfl2 \
22-
libfl-dev \
23-
zlibc zlib1g zlib1g-dev
22+
libfl-dev
2423
# Build from Source
2524
RUN \
2625
git clone -b v4.226 https://github.com/verilator/verilator /verilator-source && \
@@ -58,12 +57,20 @@ RUN \
5857
DEBIAN_FRONTEND=noninteractive \
5958
apt-get install -y \
6059
cmake \
61-
ninja-build
62-
# You can select a specific release by changing this to, for example, `download/firtool-1.36.0`. The `download` part is weird because the GitHub URL changes based on if you use `latest` or not.
63-
ARG CIRCT_RELEASE=latest/download
64-
# Grab the source of the release from GitHub
65-
ADD https://github.com/llvm/circt/releases/$CIRCT_RELEASE/circt-full-sources.tar.gz /circt/source-bundle.tar.gz
66-
RUN cd /circt && mkdir source && tar xvf source-bundle.tar.gz --strip-components=1 -C /circt/source
60+
ninja-build \
61+
curl
62+
63+
# Install recent git (required for `ls-tree --object-only`)
64+
RUN \
65+
DEBIAN_FRONTEND=noninteractive \
66+
apt-get install -y software-properties-common && \
67+
apt-add-repository ppa:git-core/ppa && \
68+
apt-get update -y && \
69+
apt-get install -y git
70+
RUN git clone https://github.com/llvm/circt /circt/source
71+
# Grab the llvm source from GitHub directly to avoid having to clone the entire llvm-project repo
72+
RUN cd /circt/source && \
73+
curl -L https://github.com/llvm/llvm-project/tarball/$(git ls-tree --object-only HEAD -- llvm) | tar xz --strip-components=1 -C llvm
6774
# Install firtool
6875
RUN cd /circt/source && \
6976
cmake \

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,4 @@ test_run_dir
2020
.scala-build
2121
metals.sbt
2222
version.txt
23+
.bsp

0 commit comments

Comments
 (0)