diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 77ab39e..91a1092 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,39 +14,39 @@ jobs: matrix: # do the slow ones first, to make the overall build quicker build: - # - 00 tcl - - 01 prolog - - 02 smalltalk - - 03 python3 - - 04 julia - - 05 perl - - 06 cobol - - 07 haskell - - 08 ruby - - 09 forth - - 10 lua - - 11 php - - 12 erlang - - 13 crystal - - 14 scala - - 15 csharp - - 16 coffeescript - - 17 kotlin - - 18 java - - 19 deno - - 20 node - - 21 go - - 22 bun - - 23 fortran - - 24 rust - - 25 cpp-clang - - 26 cpp-gcc - - 27 c-clang - - 28 c-gcc - - 29 nim - - 30 pascal - - 31 zig - - 32 assembly + # - 00_tcl + - 01_prolog + - 02_smalltalk + - 03_python3 + - 04_julia + - 05_perl + - 06_cobol + - 07_haskell + - 08_ruby + - 09_forth + - 10_lua + - 11_php + - 12_erlang + - 13_crystal + - 14_scala + - 15_csharp + - 16_coffeescript + - 17_kotlin + - 18_java + - 19_deno + - 20_node + - 21_go + - 22_bun + - 23_fortran + - 24_rust + - 25_cpp-clang + - 26_cpp-gcc + - 27_c-clang + - 28_c-gcc + - 29_nim + - 30_pascal + - 31_zig + - 32_assembly runs-on: ubuntu-latest container: image: acheronfail/count @@ -55,14 +55,18 @@ jobs: uses: actions/checkout@v3 # really github? why do you override $HOME? # https://github.com/actions/runner/issues/863 - - run: 'echo HOME=/root >> $GITHUB_ENV' + - name: Setup environment + run: | + echo HOME=/root >> $GITHUB_ENV + WHAT=${{ matrix.build }} + echo WHAT=${WHAT##*_} >> $GITHUB_ENV # do the thing - - run: just test ${{ matrix.build }} - - run: just measure ${{ matrix.build }} + - run: just test ${{ env.WHAT }} + - run: just measure ${{ env.WHAT }} # report - uses: actions/upload-artifact@v3 with: - path: 'results/${{ matrix.build }}.json' + path: 'results/${{ env.WHAT }}.json' report: needs: ['run'] diff --git a/Dockerfile b/Dockerfile index 78553c4..64a6d08 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,15 +1,16 @@ -FROM ubuntu:latest +FROM ubuntu:23.04 ENV DEBIAN_FRONTEND="noninteractive" TZ="Europe/London" RUN apt-get update && apt-get install -y \ - bc build-essential clang coffeescript curl default-jdk default-jre erlang \ - fp-compiler gdb lldb gforth gfortran git gnu-smalltalk gnucobol3 golang \ - haskell-platform jq kotlin lua5.4 mono-complete moreutils nasm php ruby \ - scala swi-prolog tar tcl unzip wget xz-utils \ + bc build-essential clang curl default-jdk default-jre erlang fp-compiler gdb \ + ghc lldb gforth gfortran git gnu-smalltalk gnucobol3 golang jq kotlin lua5.4 \ + mono-complete moreutils nasm php ruby scala swi-prolog tar tcl unzip wget \ + xz-utils \ && apt-get clean RUN curl -fSL https://deb.nodesource.com/setup_lts.x | bash - \ - && apt-get install -y nodejs + && apt-get install -y nodejs \ + && npm install --global coffeescript RUN curl -fSL https://sh.rustup.rs | sh -s -- -y --default-toolchain stable ENV PATH="/root/.cargo/bin:$PATH" @@ -28,7 +29,7 @@ ENV PATH="/root/.bun/bin:$PATH" RUN curl -fSL https://deno.land/x/install/install.sh | sh ENV PATH="/root/.deno/bin:$PATH" -RUN curl -fSL https://crystal-lang.org/install.sh | bash +RUN curl -fSL https://crystal-lang.org/install.sh | bash -s -- --version=1.11 RUN curl -fSL https://nim-lang.org/choosenim/init.sh | sh -s -- -y ENV PATH="/root/.nimble/bin:$PATH" @@ -40,4 +41,6 @@ RUN cd && curl -fSL "$(curl -fSL https://ziglang.org/download/index.json | jq -r && rm zig.tar.xz ENV PATH="/root/.zig:$PATH" +RUN cargo install --git https://github.com/acheronfail/max_rss.git --rev fae12f9 + WORKDIR /var/count diff --git a/justfile b/justfile index 54c9863..f4e5bca 100644 --- a/justfile +++ b/justfile @@ -93,8 +93,8 @@ measure what: jq '. += {"size":"'"$(cat SIZE)"'"}' "$out" | sponge "$out" fi - gdb --command rss.gdb --args $(cat CMD) >/dev/null - jq '. += {"rss":'$(( $(rg -oPr '$1' 'Rss:\s*(\d+)' ./rss.txt) * 1024 ))'}' "$out" | sponge "$out" + max_rss $(cat CMD) + jq '. += {"rss":'$(jq '.max_rss' ./max_rss.json)'}' "$out" | sponge "$out" measure-all: #!/usr/bin/env bash