Skip to content

Commit 3eaef5a

Browse files
authored
Update idris2-lsp install steps (#58)
Because idris2-lsp project changes, we only build devcontainer for latest.
1 parent 833a6ac commit 3eaef5a

File tree

2 files changed

+22
-26
lines changed

2 files changed

+22
-26
lines changed

.github/workflows/build-test-deploy.yml

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -130,13 +130,10 @@ jobs:
130130
needs: base-deploy
131131
strategy:
132132
matrix:
133-
# latest does not work right now!
134-
idris-version: ["v0.5.1", "v0.6.0"]
133+
idris-version: ["latest"]
135134
include:
136-
- idris-version: "v0.5.1"
137-
lsp-version: "idris2-0.5.1"
138-
- idris-version: "v0.6.0"
139-
lsp-version: "idris2-0.6.0"
135+
- idris-version: "latest"
136+
lsp-version: "latest"
140137
env:
141138
TEST_TAG: devcontainer-test
142139
steps:
@@ -179,13 +176,10 @@ jobs:
179176
needs: devcontainer-build-test
180177
strategy:
181178
matrix:
182-
# latest does not work right now!
183-
idris-version: ["v0.5.1", "v0.6.0"]
179+
idris-version: ["latest"]
184180
include:
185-
- idris-version: "v0.5.1"
186-
lsp-version: "idris2-0.5.1"
187-
- idris-version: "v0.6.0"
188-
lsp-version: "idris2-0.6.0"
181+
- idris-version: "latest"
182+
lsp-version: "latest"
189183
steps:
190184
- name: Checkout Repo
191185
uses: actions/checkout@v3

devcontainer.Dockerfile

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
11
ARG IDRIS_VERSION=latest
2-
# LSP_VERSION is in the form "idris2-0.5.1", or "latest"
3-
ARG IDRIS_LSP_VERSION=latest
42

53
FROM ghcr.io/joshuanianji/idris-2-docker/base:${IDRIS_VERSION} as base
64

75
FROM debian:bullseye as builder
8-
# args are not shared between build stages
9-
# https://github.com/moby/moby/issues/37345
10-
ARG IDRIS_LSP_VERSION
6+
# IDRIS_LSP_VERSION is in the form "idris2-0.5.1", "idris2-0.6.0", or "latest"
7+
ARG IDRIS_LSP_VERSION=latest
118
ARG IDRIS_LSP_SHA
129

1310
RUN apt-get update && \
@@ -26,23 +23,29 @@ RUN if [ $IDRIS_LSP_VERSION = "latest" ] ; \
2623
fi
2724

2825
WORKDIR /build/idris2-lsp
29-
RUN git submodule update --init --recursive
26+
RUN git submodule update --init Idris2
3027
WORKDIR /build/idris2-lsp/Idris2
31-
RUN make bootstrap SCHEME=scheme PREFIX=/usr/local/lib/idris2 && make install PREFIX=/usr/local/lib/idris2
28+
RUN make bootstrap SCHEME=scheme PREFIX=/usr/local/lib/idris2
29+
RUN make install PREFIX=/usr/local/lib/idris2
3230

3331
# ensure idris2 is in path
3432
ENV PATH="/usr/local/lib/idris2/bin:${PATH}"
3533
ENV LD_LIBRARY_PATH="/usr/local/lib/idris2/lib:${LD_LIBRARY_PATH}"
3634

37-
# Manual install of idris2-lsp
38-
# https://github.com/idris-community/idris2-lsp#manual-installation
35+
RUN make clean PREFIX=/usr/local/lib/idris2
36+
RUN make all PREFIX=/usr/local/lib/idris2
37+
RUN make install PREFIX=/usr/local/lib/idris2
3938
RUN make install-with-src-libs PREFIX=/usr/local/lib/idris2
4039
RUN make install-with-src-api PREFIX=/usr/local/lib/idris2
40+
41+
# Manually install LSP library and idris2-lsp
4142
WORKDIR /build/idris2-lsp
42-
# we need an IDRIS2_PREFIX env var instead of PREFIX
43-
# https://github.com/idris-community/idris2-lsp/pull/56
44-
# WAIT, DO WE? It seems that they can rely on `idris2 --prefix`
45-
RUN make install
43+
RUN git submodule update --init LSP-lib
44+
WORKDIR /build/idris2-lsp/LSP-lib
45+
ENV IDRIS2_PREFIX="/usr/local/lib/idris2"
46+
RUN idris2 --install-with-src
47+
WORKDIR /build/idris2-lsp
48+
RUN make install PREFIX=/usr/local/lib/idris2
4649

4750
FROM mcr.microsoft.com/vscode/devcontainers/base:bullseye
4851

@@ -55,4 +58,3 @@ COPY --from=base /root/scheme-lib/ /usr/lib/
5558
# set new Idris2
5659
ENV PATH="/usr/local/lib/idris2/bin:${PATH}"
5760
ENV LD_LIBRARY_PATH="/usr/local/lib/idris2/lib:${LD_LIBRARY_PATH}"
58-

0 commit comments

Comments
 (0)