File: Earthfile

package info (click to toggle)
jekyll 4.3.4%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 6,356 kB
  • sloc: ruby: 16,765; javascript: 1,455; sh: 214; xml: 29; makefile: 9
file content (49 lines) | stat: -rw-r--r-- 1,344 bytes parent folder | download | duplicates (2)
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
FROM alpine

# Run locally: `earthly +all` to run full CI process
all:
    BUILD --build-arg RUBY=3.0 +test
    BUILD --build-arg RUBY=2.7 +test
    BUILD --build-arg RUBY=2.5 +test
    BUILD --build-arg RUBY=jruby:9.2.14.0 +test
    BUILD style-check
    BUILD profile-docs

# Run locally: `earthly +test`
# Run with specific version: `earthly --build-arg RUBY=2.5 +test`
test:
    FROM +deps
    RUN script/test    
    RUN script/cucumber
    RUN script/default-site

style-check:
    FROM +deps
    RUN script/fmt

profile-docs:
    FROM +deps
    RUN bundle install --jobs 4
    RUN script/profile-docs
    RUN script/memprof

# Install dependencies and copy in source
# used in above steps
deps:
    ARG RUBY=3.0
    IF case $RUBY in jruby*) ;; *) false; esac
        FROM $RUBY
        ENV JRUBY_OPTS="--dev -J-XX:+TieredCompilation -J-XX:TieredStopAtLevel=1  -J-XX:CompileThreshold=10 -J-XX:ReservedCodeCacheSize=128M"
    ELSE
        FROM ruby:$RUBY
    END
    WORKDIR /src
    RUN apt-get update && apt-get install nodejs dnsutils git make coreutils g++ build-essential -y
    RUN gem install bundler
    RUN gem install sassc -v '2.4.0' --source 'https://rubygems.org/'
    COPY Gemfile .
    COPY jekyll.gemspec .
    COPY lib/jekyll/version.rb lib/jekyll/version.rb
    COPY test test
    RUN bundle install --jobs 4
    COPY . .