-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathEarthfile
85 lines (79 loc) · 2.92 KB
/
Earthfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
VERSION 0.7
FROM alpine:3.17
docs:
FROM julia:alpine3.18
COPY --dir src .
COPY --dir docs .
COPY Project.toml .
RUN apk add --update --no-cache git
RUN julia --color=yes --project=docs -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.instantiate()'
RUN julia --color=yes --project=docs -e 'using Documenter: DocMeta, doctest; using HapLink; DocMeta.setdocmeta!(HapLink, :DocTestSetup, :(using HapLink); recursive=true); doctest(HapLink)'
RUN julia --color=yes --project=docs docs/make.jl
SAVE ARTIFACT docs/build AS LOCAL local-output/site
test-all:
FOR JULIA_VERSION IN 1 rc 1.6
BUILD +test --version $JULIA_VERSION
END
test:
ARG version=latest
ARG project=@.
ARG precompile=no
ARG check_bounds=yes
ARG coverage=true
ARG depwarn=yes
ARG force_latest_compatible_version=auto
ARG inline=yes
ARG prefix=''
ARG annotate=false
ARG runtest_version=1.9.3
FROM julia:$version
COPY --dir src .
COPY --dir docs .
COPY --dir test .
COPY Project.toml .
ENV JULIA_PKG_PRECOMPILE_AUTO=$precompile
ENV ANNOTATE=$annotate
ENV COVERAGE=$coverage
ENV FORCE_LATEST_COMPATIBLE_VERSION=$force_latest_compatible_version
ENV CHECK_BOUNDS=$check_bounds
ENV INPUT_DIRECTORIES='src,ext'
RUN julia --color=yes --project=$project -e ' \
import Pkg; \
VERSION >= v"1.5-" && Pkg.Registry.add("General"); \
VERSION >= v"1.1.0-rc1" ? Pkg.build(verbose=true) : Pkg.build()'
RUN julia --color=yes -e '\
if v"1.8pre" < VERSION < v"1.9.0-beta3"; \
using Pkg; \
Pkg.activate("tests-logger-env"; shared=true); \
Pkg.add(Pkg.PackageSpec(name="GitHubActions", version="0.1")); \
end'
RUN curl -L https://github.com/julia-actions/julia-runtest/archive/refs/tags/v1.9.3.tar.gz | tar xvz
RUN julia --color=yes \
--depwarn=yes \
--inline=yes \
--project=@. \
-e 'include(joinpath("julia-runtest-1.9.3", "test_harness.jl"))'
RUN curl -L https://github.com/julia-actions/julia-processcoverage/archive/refs/tags/v1.2.2.tar.gz | tar xvz
RUN julia --color=yes julia-processcoverage-1.2.2/main.jl
SAVE ARTIFACT lcov.info AS LOCAL local-output/lcov.$version.info
compiler:
FROM julia:latest
RUN apt-get update && apt-get install -y --no-install-recommends curl git ca-certificates build-essential
build:
FROM +compiler
COPY --dir src .
COPY --dir deps .
COPY --dir example .
COPY Project.toml .
COPY Comonicon.toml .
RUN julia --project -e 'using Pkg; Pkg.instantiate()'
RUN julia --project deps/build.jl app
SAVE ARTIFACT build AS LOCAL build
docker:
FROM ubuntu:focal
ARG TAG=latest
COPY +build/build/haplink/bin /usr/bin
COPY +build/build/haplink/lib /usr/lib
COPY +build/build/haplink/share /usr/share
ENTRYPOINT ["/usr/bin/haplink"]
SAVE IMAGE --push millironx/haplink:${TAG}