FROM python:3.11 AS metrics-base WORKDIR /code/ FROM metrics-base AS metrics-tmg RUN git clone https://github.com/OnGoTeam/TMGmod.git repo WORKDIR /code/repo/ RUN git fetch && git checkout 82db35f2db92572c98d84ef781f64f8d65d2f023 ENV SRCPATTERN="./build/src/**/*.cs" FROM metrics-base AS metrics-radn RUN git clone https://gitea.parrrate.ru/PTV/radn-rs.git repo WORKDIR /code/repo/ RUN git fetch && git checkout 02550c0ded5358e78cd7bb64675085ceec005ea5 FROM metrics-base AS metrics-meta RUN git clone https://gitea.parrrate.ru/PTV/radn-dev.git repo WORKDIR /code/repo/ RUN git fetch && git checkout 33d8daee79e53fc0eded5f7d56486f68aac4d26d ENV SRCPATTERN="./*metrics/**/*" FROM metrics-base AS metrics-mdbook RUN git clone https://github.com/rust-lang/mdBook.git repo WORKDIR /code/repo/ RUN git fetch && git checkout 904aa530b5f59387f19feb0dbe0e959de3f247d2 FROM metrics-base AS metrics-rustup RUN git clone https://github.com/rust-lang/rustup.git repo WORKDIR /code/repo/ RUN git fetch && git checkout 849adb7c1b8c97e4145e350a934c3a665f61798e FROM metrics-base AS metrics-cargo RUN git clone https://github.com/rust-lang/cargo.git repo WORKDIR /code/repo/ RUN git fetch && git checkout 5b377cece0e0dd0af686cf53ce4637d5d85c2a10 FROM metrics-base AS metrics-rust RUN git clone https://github.com/rust-lang/rust.git repo WORKDIR /code/repo/ RUN git fetch && git checkout 32d81eccd64513bacef9dfa1574543ada6b45d85 FROM metrics-base AS metrics-ocen RUN git clone https://github.com/ocen-lang/ocen.git repo WORKDIR /code/repo/ RUN git fetch && git checkout 0b1a63d0e141fc3032f10c70b5cae117429e2dcb ENV SRCPATTERN="./**/*.[oa][ec]" FROM metrics-base AS metrics-aecor RUN git clone https://github.com/mustafaquraish/aecor.git repo WORKDIR /code/repo/ RUN git fetch && git checkout f81543a34ee363dcc00e8632fd7cfcd4a3478b23 ENV SRCDIR="." ENV SRCPATTERN="./**/*.[ach]*" FROM metrics-base AS metrics-ruchei RUN git clone https://github.com/parrrate/ruchei.git repo WORKDIR /code/repo/ RUN git fetch && git checkout 8ee80921f7ca7b6dd197870278df4ad4260f266a ENV SRCPATTERN="./**/*.rs ./**/*.toml" FROM metrics-base AS metrics-temp COPY temp repo WORKDIR /code/repo/ ENV SRCPATTERN="./**/*.rs ./**/*.sql" FROM metrics-temp AS metrics-repo FROM metrics-repo AS metrics-commits COPY common.py /code/common.py COPY commits.py /code/commits.py RUN python3 /code/commits.py FROM metrics-repo AS metrics COPY common.py /code/common.py COPY metrics.py /code/metrics.py COPY --from=metrics-commits /code/commits.dat commits.dat RUN python3 /code/metrics.py FROM metrics-base AS metrics-process RUN python3 -m pip install numpy FROM metrics-process AS metrics-data COPY --from=metrics /code/metrics.dat metrics.dat FROM metrics-process AS metrics-plot RUN python3 -m pip install matplotlib FROM metrics-data AS metrics-entries COPY entries.py entries.py RUN python3 entries.py FROM metrics-data AS metrics-y COPY cors.py cors.py RUN python3 cors.py FROM metrics-plot AS metrics-c COPY --from=metrics-y /code/Y.dat Y.dat COPY k2c.py k2c.py FROM metrics-c AS metrics-c-linear COPY c_linear.py c_linear.py RUN python3 c_linear.py FROM metrics-c AS metrics-c-proportional COPY c_proportional.py c_proportional.py RUN python3 c_proportional.py FROM metrics-process AS metrics-x COPY --from=metrics-y /code/Y.dat Y.dat FROM metrics-x AS metrics-x-linear COPY x_linear.py x_linear.py RUN python3 x_linear.py FROM metrics-x AS metrics-x-proportional COPY x_proportional.py x_proportional.py RUN python3 x_proportional.py FROM metrics-plot AS metrics-render RUN mkdir /code/metrics/ FROM metrics-render AS metrics-render-ploc COPY --from=metrics-entries /code/entries.dat entries.dat COPY render_ploc.py render_ploc.py RUN python3 render_ploc.py FROM metrics-render AS metrics-render-hist COPY --from=metrics-y /code/Y.dat Y.dat COPY render_hist.py render_hist.py FROM metrics-render-hist AS metrics-render-01x COPY --from=metrics-x-linear /code/X.dat X.dat COPY --from=metrics-c-linear /code/C.dat C.dat RUN python3 render_hist.py FROM metrics-render-hist AS metrics-render-02y COPY --from=metrics-x-linear /code/X.dat X.dat COPY --from=metrics-c-proportional /code/C.dat C.dat RUN python3 render_hist.py FROM metrics-render-hist AS metrics-render-03xy ENV SAME_UNITS=true COPY --from=metrics-x-proportional /code/X.dat X.dat COPY --from=metrics-c-proportional /code/C.dat C.dat RUN python3 render_hist.py FROM scratch COPY --from=metrics-render-ploc /code/metrics/out.png /metrics.png COPY --from=metrics-render-01x /code/metrics/out.png /metrics-01x.png COPY --from=metrics-render-02y /code/metrics/out.png /metrics-02y.png COPY --from=metrics-render-03xy /code/metrics/out.png /metrics-03xy.png