diff --git a/.tgs.yml b/.tgs.yml index dd18c3b8a2..8aedea02b4 100644 --- a/.tgs.yml +++ b/.tgs.yml @@ -3,7 +3,7 @@ version: 1 # The BYOND version to use (kept in sync with dependencies.sh by the "TGS Test Suite" CI job) # Must be interpreted as a string, keep quoted -byond: "515.1637" +byond: "515.1647" # Folders to create in "/Configuration/GameStaticFiles/" static_files: # Config directory should be static diff --git a/Dockerfile b/Dockerfile index e582b9759e..ccdf7188d5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,79 +1,79 @@ -FROM i386/ubuntu:xenial as base +FROM ubuntu:22.04 AS base -ARG BYOND_MAJOR=515 -ARG BYOND_MINOR=1640 +RUN dpkg --add-architecture i386 \ + && apt-get update \ + && apt-get upgrade -y \ + && apt-get dist-upgrade -y \ + && apt-get install -y --no-install-recommends \ + ca-certificates -RUN apt-get update \ - && apt-get install -y \ - curl \ - unzip \ - make \ - libstdc++6 \ - && curl "https://www.byond.com/download/build/${BYOND_MAJOR}/${BYOND_MAJOR}.${BYOND_MINOR}_byond_linux.zip" -o byond.zip \ - && unzip byond.zip \ - && cd byond \ - && sed -i 's|install:|&\n\tmkdir -p $(MAN_DIR)/man6|' Makefile \ - && make install \ - && chmod 644 /usr/local/byond/man/man6/* \ - && apt-get purge -y --auto-remove curl unzip make \ - && cd .. \ - && rm -rf byond byond.zip /var/lib/apt/lists/* - -FROM base as rust_g - -RUN apt-get update \ - && apt-get install -y --no-install-recommends \ - git \ - ca-certificates - -WORKDIR /rust_g +FROM base AS byond +WORKDIR /byond RUN apt-get install -y --no-install-recommends \ - libssl-dev \ - pkg-config \ - curl \ - gcc-multilib \ - && curl https://sh.rustup.rs -sSf | sh -s -- -y --default-host i686-unknown-linux-gnu \ - && git init \ - && git remote add origin https://github.com/tgstation/rust-g + curl \ + unzip \ + make \ + libstdc++6:i386 COPY dependencies.sh . -RUN /bin/bash -c "source dependencies.sh \ - && git fetch --depth 1 origin \$RUST_G_VERSION" \ - && git checkout FETCH_HEAD \ - && ~/.cargo/bin/cargo build --release +RUN . ./dependencies.sh \ + && curl "http://www.byond.com/download/build/${BYOND_MAJOR}/${BYOND_MAJOR}.${BYOND_MINOR}_byond_linux.zip" -o byond.zip \ + && unzip byond.zip \ + && cd byond \ + && sed -i 's|install:|&\n\tmkdir -p $(MAN_DIR)/man6|' Makefile \ + && make install \ + && chmod 644 /usr/local/byond/man/man6/* \ + && apt-get purge -y --auto-remove curl unzip make \ + && cd .. \ + && rm -rf byond byond.zip -FROM base as dm_base +FROM byond AS build WORKDIR /vorestation -FROM dm_base as build +RUN apt-get install -y --no-install-recommends \ + curl COPY . . -RUN DreamMaker -max_errors 0 vorestation.dme +RUN env TG_BOOTSTRAP_NODE_LINUX=1 tools/build/build -FROM dm_base +FROM base AS rust +RUN apt-get install -y --no-install-recommends \ + curl && \ + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal \ + && ~/.cargo/bin/rustup target add i686-unknown-linux-gnu -EXPOSE 2303 +FROM rust AS rust_g +WORKDIR /rust_g -RUN apt-get update \ - && apt-get install -y --no-install-recommends software-properties-common \ - && add-apt-repository ppa:ubuntu-toolchain-r/test \ - && apt-get update \ - && apt-get upgrade -y \ - && apt-get dist-upgrade -y \ - && apt-get install -y --no-install-recommends \ - libmariadb2 \ - mariadb-client \ - libssl1.0.0 \ - && rm -rf /var/lib/apt/lists/* \ - && mkdir -p /root/.byond/bin +RUN apt-get install -y --no-install-recommends \ + libssl3 \ + gcc-multilib \ + git \ + && git init \ + && git remote add origin https://github.com/tgstation/rust-g + +COPY dependencies.sh . + +RUN . ./dependencies.sh \ + && git fetch --depth 1 origin "${RUST_G_VERSION}" \ + && git checkout FETCH_HEAD \ + && env PKG_CONFIG_ALLOW_CROSS=1 ~/.cargo/bin/cargo build --release --target i686-unknown-linux-gnu --features all + +FROM byond +WORKDIR /vorestation + +RUN apt-get install -y --no-install-recommends \ + libssl3 \ + zlib1g:i386 COPY --from=build /vorestation/ ./ -COPY --from=rust_g /rust_g/target/release/librust_g.so ./librust_g.so +COPY --from=rust_g /rust_g/target/i686-unknown-linux-gnu/release/librust_g.so ./librust_g.so #VOLUME [ "/vorestation/config", "/vorestation/data" ] ENTRYPOINT [ "DreamDaemon", "vorestation.dmb", "-port", "2303", "-trusted", "-close", "-verbose" ] +EXPOSE 2303 diff --git a/_build_dependencies.sh b/_build_dependencies.sh deleted file mode 100644 index 7a2057f339..0000000000 --- a/_build_dependencies.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/sh - -# This file has all the information on what versions of libraries are thrown into the code - -#rust_g git tag -export RUST_G_VERSION=3.4.0 - -# byond version -export BYOND_MAJOR=515 -export BYOND_MINOR=1642 -export MACRO_COUNT=4 - -# node version -export NODE_VERSION=20 -export NODE_VERSION_PRECISE=20.9.0 - -# SpacemanDMM git tag -export SPACEMAN_DMM_VERSION=suite-1.8 - -# Python version for mapmerge and other tools -export PYTHON_VERSION=3.9.0 - -#hypnagogic repo -export CUTTER_REPO=actioninja/hypnagogic - -#hypnagogic git tag -export CUTTER_VERSION=v3.0.1 diff --git a/dependencies.sh b/dependencies.sh index 20ba2e5197..8afb098d23 100644 --- a/dependencies.sh +++ b/dependencies.sh @@ -5,11 +5,13 @@ # byond version export BYOND_MAJOR=515 -export BYOND_MINOR=1637 +export BYOND_MINOR=1647 + +# Macro Count export MACRO_COUNT=8 #rust_g git tag -export RUST_G_VERSION=3.4.0 +export RUST_G_VERSION=3.5.1 #node version export NODE_VERSION_LTS=20.13.0