Skip to content

Commit

Permalink
--wip-- [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
acheronfail committed Jan 10, 2024
1 parent fae1bff commit fae12d5
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 10 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@ java/
kotlin/
scala/
CMD
VERSION
VERSION
STATS
19 changes: 11 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
FROM ubuntu:latest

ENV DEBIAN_FRONTEND="noninteractive" TZ="Europe/London"
RUN curl -fsSL https://deb.nodesource.com/setup_lts.x | bash -

RUN apt-get update && apt-get install -y \
build-essential clang coffeescript curl default-jdk default-jre erlang \
fp-compiler gdb lldb gforth gfortran gnu-smalltalk gnucobol3 golang \
haskell-platform jq kotlin lua5.4 mono-complete moreutils nasm nodejs npm \
php scala sudo swi-prolog tar tcl unzip wget xz-utils \
haskell-platform jq kotlin lua5.4 mono-complete moreutils nasm php ruby \
scala sudo swi-prolog tar tcl unzip wget xz-utils \
&& apt-get clean
RUN curl -fsSL https://deb.nodesource.com/setup_lts.x | bash - \
&& apt-get install -y nodejs

RUN useradd -m runner && echo "runner ALL=(ALL:ALL) NOPASSWD: ALL" > /etc/sudoers.d/runner
USER runner
Expand All @@ -34,11 +36,12 @@ RUN curl -fsSL https://crystal-lang.org/install.sh | sudo -E bash
RUN curl -fsSL https://nim-lang.org/choosenim/init.sh | sh -s -- -y
ENV PATH="/home/runner/.nimble/bin:$PATH"

RUN sudo mkdir -p /opt/zig && cd $_ && \
wget --quiet --show-progress -O zig.tar.xz \
$(curl -fsSL https://ziglang.org/download/index.json | jq -r '.[keys_unsorted[1]]["x86_64-linux"].tarball') && \
tar -xvf zig.tar.xz --strip-components=1 2>&1 >/dev/null
ENV PATH="/opt/zig:$PATH"
RUN cd && curl -fSL "$(curl -fSL https://ziglang.org/download/index.json | jq -r '.[keys_unsorted[1]]["x86_64-linux"].tarball')" \
> zig.tar.xz \
&& mkdir -p "/home/runner/.zig" \
&& tar -xvf zig.tar.xz --strip-components=1 -C "/home/runner/.zig" \
&& rm zig.tar.xz
ENV PATH="/home/runner/.zig:$PATH"

WORKDIR /data
COPY --chown=runner:runner . .
Expand Down
3 changes: 2 additions & 1 deletion justfile
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,8 @@ measure what:
hyperfine $args --shell=none --export-json "$out" "$(cat CMD)"
jq '.results[0] | del(.exit_codes)' "$out" | sponge "$out"
jq '. += {"name":"{{what}}","version":"'"$(cat VERSION)"'"}' "$out" | sponge "$out"
timers $(cat CMD) >/dev/null 2> >(jq '. += {"max_rss":'$(rg -oP '(?:max_rss:\s*)(\d+)' -r '$1')'}' "$out" | sponge "$out")
timers $(cat CMD) >/dev/null 2> STATS
jq '. += {"max_rss":'$(rg -oP '(?:max_rss:\s*)(\d+)' -r '$1' ./STATS)'}' "$out" | sponge "$out"

summary results:
cd scripts && node ./summary.js --results ../results
Expand Down

0 comments on commit fae12d5

Please sign in to comment.