2024-04-06 14:25:22 +00:00
FROM alpine:3.19 AS build
2023-09-20 06:37:26 +00:00
RUN apk add --no-cache build-base musl-dev git autoconf make texinfo gnutls-dev ncurses-dev gawk libgccjit-dev
2023-08-13 03:14:28 +00:00
FROM build AS build-emacs
2023-08-25 05:37:25 +00:00
ARG EMACS_VERSION = emacs-29.1
RUN git clone --depth 1 --branch $EMACS_VERSION https://git.savannah.gnu.org/git/emacs.git /root/emacs
2023-08-13 03:14:28 +00:00
WORKDIR /root/emacs
RUN mkdir /root/dist
RUN ./autogen.sh
2023-09-20 06:37:26 +00:00
RUN ./configure --prefix /usr --without-x --without-sound --with-native-compilation= aot
2023-08-13 03:14:28 +00:00
RUN make
RUN make DESTDIR = "/root/dist" install
2023-07-13 03:14:22 +00:00
2023-08-13 03:14:28 +00:00
FROM build AS build-org-mode
2023-10-13 15:26:41 +00:00
ARG ORG_VERSION = abf5156096c06ee5aa05795c3dc5a065f76ada97
2023-08-13 03:14:28 +00:00
COPY --from= build-emacs /root/dist/ /
RUN mkdir /root/dist
2023-08-25 05:37:25 +00:00
# Savannah does not allow fetching specific revisions, so we're going to have to put unnecessary load on their server by cloning main and then checking out the revision we want.
RUN git clone https://git.savannah.gnu.org/git/emacs/org-mode.git /root/org-mode && git -C /root/org-mode checkout $ORG_VERSION
# RUN mkdir /root/org-mode && git -C /root/org-mode init --initial-branch=main && git -C /root/org-mode remote add origin https://git.savannah.gnu.org/git/emacs/org-mode.git && git -C /root/org-mode fetch origin $ORG_VERSION && git -C /root/org-mode checkout FETCH_HEAD
2023-08-13 03:14:28 +00:00
WORKDIR /root/org-mode
RUN make compile
RUN make DESTDIR = "/root/dist" install
2024-04-06 14:25:22 +00:00
FROM rustlang/rust:nightly-alpine3.19 AS tester
2023-09-01 00:19:28 +00:00
ENV LANG = en_US.UTF-8
2023-09-20 06:37:26 +00:00
RUN apk add --no-cache musl-dev ncurses gnutls libgccjit
2023-07-14 05:59:51 +00:00
RUN cargo install --locked --no-default-features --features ci-autoclean cargo-cache
2023-08-13 03:14:28 +00:00
COPY --from= build-emacs /root/dist/ /
COPY --from= build-org-mode /root/dist/ /
2023-08-27 21:29:55 +00:00
ENTRYPOINT [ "cargo" , "test" ]
2023-09-06 19:54:25 +00:00
FROM build as foreign-document-gather
2023-09-07 01:11:46 +00:00
2023-09-06 23:49:04 +00:00
ARG HOWARD_ABRAMS_DOT_FILES_VERSION = 1b54fe75d74670dc7bcbb6b01ea560c45528c628
ARG HOWARD_ABRAMS_DOT_FILES_PATH = /foreign_documents/howardabrams/dot-files
2023-09-07 00:56:36 +00:00
ARG HOWARD_ABRAMS_DOT_FILES_REPO = https://github.com/howardabrams/dot-files.git
2023-09-06 19:54:25 +00:00
RUN mkdir /foreign_documents
2023-09-07 00:56:36 +00:00
RUN mkdir -p $HOWARD_ABRAMS_DOT_FILES_PATH && git -C $HOWARD_ABRAMS_DOT_FILES_PATH init --initial-branch= main && git -C $HOWARD_ABRAMS_DOT_FILES_PATH remote add origin $HOWARD_ABRAMS_DOT_FILES_REPO && git -C $HOWARD_ABRAMS_DOT_FILES_PATH fetch origin $HOWARD_ABRAMS_DOT_FILES_VERSION && git -C $HOWARD_ABRAMS_DOT_FILES_PATH checkout FETCH_HEAD
2023-09-07 01:11:46 +00:00
2023-09-07 00:56:36 +00:00
ARG HOWARD_ABRAMS_HAMACS_VERSION = da51188cc195d41882175d412fe40a8bc5730c5c
ARG HOWARD_ABRAMS_HAMACS_PATH = /foreign_documents/howardabrams/hamacs
ARG HOWARD_ABRAMS_HAMACS_REPO = https://github.com/howardabrams/hamacs.git
RUN mkdir -p $HOWARD_ABRAMS_HAMACS_PATH && git -C $HOWARD_ABRAMS_HAMACS_PATH init --initial-branch= main && git -C $HOWARD_ABRAMS_HAMACS_PATH remote add origin $HOWARD_ABRAMS_HAMACS_REPO && git -C $HOWARD_ABRAMS_HAMACS_PATH fetch origin $HOWARD_ABRAMS_HAMACS_VERSION && git -C $HOWARD_ABRAMS_HAMACS_PATH checkout FETCH_HEAD
2023-09-06 19:54:25 +00:00
2023-09-07 01:11:46 +00:00
ARG HOWARD_ABRAMS_DEMO_IT_VERSION = e399fd7ceb73caeae7cb50b247359bafcaee2a3f
ARG HOWARD_ABRAMS_DEMO_IT_PATH = /foreign_documents/howardabrams/demo-it
ARG HOWARD_ABRAMS_DEMO_IT_REPO = https://github.com/howardabrams/demo-it.git
RUN mkdir -p $HOWARD_ABRAMS_DEMO_IT_PATH && git -C $HOWARD_ABRAMS_DEMO_IT_PATH init --initial-branch= main && git -C $HOWARD_ABRAMS_DEMO_IT_PATH remote add origin $HOWARD_ABRAMS_DEMO_IT_REPO && git -C $HOWARD_ABRAMS_DEMO_IT_PATH fetch origin $HOWARD_ABRAMS_DEMO_IT_VERSION && git -C $HOWARD_ABRAMS_DEMO_IT_PATH checkout FETCH_HEAD
2023-09-07 01:37:09 +00:00
ARG HOWARD_ABRAMS_MAGIT_DEMO_VERSION = 59e82f6bc7c18f550478d86a8f680c3f2da66985
ARG HOWARD_ABRAMS_MAGIT_DEMO_PATH = /foreign_documents/howardabrams/magit-demo
ARG HOWARD_ABRAMS_MAGIT_DEMO_REPO = https://github.com/howardabrams/magit-demo.git
RUN mkdir -p $HOWARD_ABRAMS_MAGIT_DEMO_PATH && git -C $HOWARD_ABRAMS_MAGIT_DEMO_PATH init --initial-branch= main && git -C $HOWARD_ABRAMS_MAGIT_DEMO_PATH remote add origin $HOWARD_ABRAMS_MAGIT_DEMO_REPO && git -C $HOWARD_ABRAMS_MAGIT_DEMO_PATH fetch origin $HOWARD_ABRAMS_MAGIT_DEMO_VERSION && git -C $HOWARD_ABRAMS_MAGIT_DEMO_PATH checkout FETCH_HEAD
ARG HOWARD_ABRAMS_PDX_EMACS_HACKERS_VERSION = bfb7bd640fdf0ce3def21f9fc591ed35d776b26d
ARG HOWARD_ABRAMS_PDX_EMACS_HACKERS_PATH = /foreign_documents/howardabrams/pdx-emacs-hackers
ARG HOWARD_ABRAMS_PDX_EMACS_HACKERS_REPO = https://github.com/howardabrams/pdx-emacs-hackers.git
RUN mkdir -p $HOWARD_ABRAMS_PDX_EMACS_HACKERS_PATH && git -C $HOWARD_ABRAMS_PDX_EMACS_HACKERS_PATH init --initial-branch= main && git -C $HOWARD_ABRAMS_PDX_EMACS_HACKERS_PATH remote add origin $HOWARD_ABRAMS_PDX_EMACS_HACKERS_REPO && git -C $HOWARD_ABRAMS_PDX_EMACS_HACKERS_PATH fetch origin $HOWARD_ABRAMS_PDX_EMACS_HACKERS_VERSION && git -C $HOWARD_ABRAMS_PDX_EMACS_HACKERS_PATH checkout FETCH_HEAD
ARG HOWARD_ABRAMS_FLORA_SIMULATOR_VERSION = 50de13068722b9e3878f8598b749b7ccd14e7f8e
ARG HOWARD_ABRAMS_FLORA_SIMULATOR_PATH = /foreign_documents/howardabrams/flora-simulator
ARG HOWARD_ABRAMS_FLORA_SIMULATOR_REPO = https://github.com/howardabrams/flora-simulator.git
RUN mkdir -p $HOWARD_ABRAMS_FLORA_SIMULATOR_PATH && git -C $HOWARD_ABRAMS_FLORA_SIMULATOR_PATH init --initial-branch= main && git -C $HOWARD_ABRAMS_FLORA_SIMULATOR_PATH remote add origin $HOWARD_ABRAMS_FLORA_SIMULATOR_REPO && git -C $HOWARD_ABRAMS_FLORA_SIMULATOR_PATH fetch origin $HOWARD_ABRAMS_FLORA_SIMULATOR_VERSION && git -C $HOWARD_ABRAMS_FLORA_SIMULATOR_PATH checkout FETCH_HEAD
ARG HOWARD_ABRAMS_LITERATE_DEVOPS_DEMO_VERSION = 2d7a5e41001a1adf7ec24aeb6acc8525a72d7892
ARG HOWARD_ABRAMS_LITERATE_DEVOPS_DEMO_PATH = /foreign_documents/howardabrams/literate-devops-demo
ARG HOWARD_ABRAMS_LITERATE_DEVOPS_DEMO_REPO = https://github.com/howardabrams/literate-devops-demo.git
RUN mkdir -p $HOWARD_ABRAMS_LITERATE_DEVOPS_DEMO_PATH && git -C $HOWARD_ABRAMS_LITERATE_DEVOPS_DEMO_PATH init --initial-branch= main && git -C $HOWARD_ABRAMS_LITERATE_DEVOPS_DEMO_PATH remote add origin $HOWARD_ABRAMS_LITERATE_DEVOPS_DEMO_REPO && git -C $HOWARD_ABRAMS_LITERATE_DEVOPS_DEMO_PATH fetch origin $HOWARD_ABRAMS_LITERATE_DEVOPS_DEMO_VERSION && git -C $HOWARD_ABRAMS_LITERATE_DEVOPS_DEMO_PATH checkout FETCH_HEAD
ARG HOWARD_ABRAMS_CLOJURE_YESQL_XP_VERSION = b651c7f8b47b2710e99fce9652980902bbc1c6c9
ARG HOWARD_ABRAMS_CLOJURE_YESQL_XP_PATH = /foreign_documents/howardabrams/clojure-yesql-xp
ARG HOWARD_ABRAMS_CLOJURE_YESQL_XP_REPO = https://github.com/howardabrams/clojure-yesql-xp.git
RUN mkdir -p $HOWARD_ABRAMS_CLOJURE_YESQL_XP_PATH && git -C $HOWARD_ABRAMS_CLOJURE_YESQL_XP_PATH init --initial-branch= main && git -C $HOWARD_ABRAMS_CLOJURE_YESQL_XP_PATH remote add origin $HOWARD_ABRAMS_CLOJURE_YESQL_XP_REPO && git -C $HOWARD_ABRAMS_CLOJURE_YESQL_XP_PATH fetch origin $HOWARD_ABRAMS_CLOJURE_YESQL_XP_VERSION && git -C $HOWARD_ABRAMS_CLOJURE_YESQL_XP_PATH checkout FETCH_HEAD
ARG HOWARD_ABRAMS_VEEP_VERSION = e37fcf63a5c4a526255735ee34955528b3b280ae
ARG HOWARD_ABRAMS_VEEP_PATH = /foreign_documents/howardabrams/veep
ARG HOWARD_ABRAMS_VEEP_REPO = https://github.com/howardabrams/veep.git
RUN mkdir -p $HOWARD_ABRAMS_VEEP_PATH && git -C $HOWARD_ABRAMS_VEEP_PATH init --initial-branch= main && git -C $HOWARD_ABRAMS_VEEP_PATH remote add origin $HOWARD_ABRAMS_VEEP_REPO && git -C $HOWARD_ABRAMS_VEEP_PATH fetch origin $HOWARD_ABRAMS_VEEP_VERSION && git -C $HOWARD_ABRAMS_VEEP_PATH checkout FETCH_HEAD
2023-09-07 01:11:46 +00:00
ARG DOOMEMACS_VERSION = 42d5fd83504f8aa80f3248036006fbcd49222943
ARG DOOMEMACS_PATH = /foreign_documents/doomemacs
ARG DOOMEMACS_REPO = https://github.com/doomemacs/doomemacs.git
RUN mkdir -p $DOOMEMACS_PATH && git -C $DOOMEMACS_PATH init --initial-branch= main && git -C $DOOMEMACS_PATH remote add origin $DOOMEMACS_REPO && git -C $DOOMEMACS_PATH fetch origin $DOOMEMACS_VERSION && git -C $DOOMEMACS_PATH checkout FETCH_HEAD
2023-09-30 05:26:24 +00:00
ARG WORG_VERSION = ba6cda890f200d428a5d68e819eef15b5306055f
2023-09-13 20:49:35 +00:00
ARG WORG_PATH = /foreign_documents/worg
ARG WORG_REPO = https://git.sr.ht/~bzg/worg
RUN mkdir -p $WORG_PATH && git -C $WORG_PATH init --initial-branch= main && git -C $WORG_PATH remote add origin $WORG_REPO && git -C $WORG_PATH fetch origin $WORG_VERSION && git -C $WORG_PATH checkout FETCH_HEAD
2023-10-29 14:49:47 +00:00
ARG LITERATE_BUILD_EMACS_VERSION = e3ac1afe1e40af601be7af12c1d13d96308ab209
ARG LITERATE_BUILD_EMACS_PATH = /foreign_documents/literate_build_emacs
ARG LITERATE_BUILD_EMACS_REPO = https://gitlab.com/spudlyo/orgdemo2.git
RUN mkdir -p $LITERATE_BUILD_EMACS_PATH && git -C $LITERATE_BUILD_EMACS_PATH init --initial-branch= main && git -C $LITERATE_BUILD_EMACS_PATH remote add origin $LITERATE_BUILD_EMACS_REPO && git -C $LITERATE_BUILD_EMACS_PATH fetch origin $LITERATE_BUILD_EMACS_VERSION && git -C $LITERATE_BUILD_EMACS_PATH checkout FETCH_HEAD
2023-10-31 21:26:13 +00:00
# unused/aws.org contains invalid paths for setupfile which causes both upstream org-mode and Organic to error out.
RUN rm $LITERATE_BUILD_EMACS_PATH /unused/aws.org
2023-09-06 19:54:25 +00:00
FROM tester as foreign-document-test
2023-09-06 21:02:56 +00:00
RUN apk add --no-cache bash coreutils
2023-09-06 19:54:25 +00:00
RUN mkdir /foreign_documents
2023-09-07 00:56:36 +00:00
COPY --from= foreign-document-gather /foreign_documents/howardabrams /foreign_documents/howardabrams
2023-09-07 01:11:46 +00:00
COPY --from= foreign-document-gather /foreign_documents/doomemacs /foreign_documents/doomemacs
2023-09-13 20:49:35 +00:00
COPY --from= foreign-document-gather /foreign_documents/worg /foreign_documents/worg
2023-10-29 14:49:47 +00:00
COPY --from= foreign-document-gather /foreign_documents/literate_build_emacs /foreign_documents/literate_build_emacs
2023-09-13 20:49:35 +00:00
COPY --from= build-org-mode /root/org-mode /foreign_documents/org-mode
COPY --from= build-emacs /root/emacs /foreign_documents/emacs
2023-10-14 22:00:20 +00:00
ENTRYPOINT [ "cargo" , "run" , "--bin" , "foreign_document_test" , "--features" , "compare,foreign_document_test" , "--profile" , "release-lto" ]