forked from BeeStation/BeeStation-Hornet
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Juke Build Reforged (BeeStation#4861)
* # This is a combination of 7 commits. # This is the 1st commit message: Revert "z" This reverts commit 3c2b584. # This is the commit message BeeStation#2: Revert "jesus im dum" This reverts commit 079e7c6. # This is the commit message BeeStation#3: text # This is the commit message BeeStation#4: Revert "ccc" This reverts commit e7ef024. # This is the commit message BeeStation#5: Revert "prec1s" This reverts commit e217e18. # This is the commit message BeeStation#6: Revert "reverttoclassic" This reverts commit 591e333. # This is the commit message BeeStation#7: Revert "v" This reverts commit bbd3c05. * Readds the old CBT * Juke Build (#59390) * Juke Build Hotfix 1 (#59643) * Juke Build Fix * More fixes * Juke Build Hotfix 2 - PreCompile script compatibility (#59649) * Juke Build Hotfix 2 - PreCompile script compatibility * Pass arguments from bat to build.js * Pass arguments in BUILD.bat as well * Quick tweak * Juke Build 0.4.0 (#59796) Updated Juke Build to version 0.4.0 Main new feature: dependsOn, inputs, outputs, and onlyWhen fields now all accept a function of format ({ get }) => ..., and all of them can be async. This means that you can easily parametrize every part of the build. Added references to Juke Build to README in the build folder * Stop compiling DM if compiler outputs are locked. (#60022) Basically, saves developer's time by yelling that the compiler can't write to dmb/rsc, because they are locked by Dream Daemon. Added myself as a code owner for /tools/build. * Spring Cleaning * Adapt CI to work with this. * Update continuous_integration, no more ENV: * merge mistake * Clear out dist A mistake made when removing CBT from the old PR, this folder was meant to be untracked and became tracked. * Docker experiment. Not done. Too lazy to stash Sorry ~ * Possibly temporary use of tgstation's docker image * Actually grab auxmos btw, bee's dockerfile doesn't * Quickfix for Linux Auxtools Co-authored-by: Aleksej Komarov <[email protected]>
- Loading branch information
1 parent
34da7bc
commit 261160d
Showing
49 changed files
with
8,296 additions
and
423 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,3 +24,4 @@ tgstation.lk | |
tgstation.dyn.rsc | ||
*.dll | ||
Dockerfile | ||
tools/bootstrap/.cache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
linux_scripts: | ||
PreCompile.sh: tools/tgs4_scripts/PreCompile.sh | ||
windows_scripts: | ||
PreCompile.bat: tools/tgs4_scripts/PreCompile.bat |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"type": "byond", | ||
"request": "launch", | ||
"name": "Launch DreamSeeker", | ||
"preLaunchTask": "Build All", | ||
"dmb": "${workspaceFolder}/${command:CurrentDMB}" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
{ | ||
"version": "2.0.0", | ||
"tasks": [ | ||
{ | ||
"type": "process", | ||
"command": "tools/build/build", | ||
"windows": { | ||
"command": ".\\tools\\build\\build.bat" | ||
}, | ||
"options": { | ||
"env": { | ||
"DM_EXE": "${config:dreammaker.byondPath}" | ||
} | ||
}, | ||
"problemMatcher": [ | ||
"$dreammaker", | ||
"$tsc", | ||
"$eslint-stylish" | ||
], | ||
"group": { | ||
"kind": "build", | ||
"isDefault": true | ||
}, | ||
"dependsOn": "dm: reparse", | ||
"label": "Build All" | ||
}, | ||
{ | ||
"type": "dreammaker", | ||
"dme": "beestation.dme", | ||
"problemMatcher": [ | ||
"$dreammaker" | ||
], | ||
"group": "build", | ||
"label": "dm: build - beestation.dme" | ||
}, | ||
{ | ||
"type": "shell", | ||
"command": "tgui/bin/tgui", | ||
"windows": { | ||
"command": ".\\tgui\\bin\\tgui.bat" | ||
}, | ||
"problemMatcher": [ | ||
"$tsc", | ||
"$eslint-stylish" | ||
], | ||
"group": "build", | ||
"label": "tgui: build" | ||
}, | ||
{ | ||
"command": "${command:dreammaker.reparse}", | ||
"group": "build", | ||
"label": "dm: reparse" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
@echo off | ||
call "%~dp0\tools\build\build.bat" %* | ||
pause |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,72 +1,91 @@ | ||
FROM beestation/byond:514.1554 as base | ||
ONBUILD ENV BYOND_MAJOR=514 | ||
ONBUILD ENV BYOND_MINOR=1554 | ||
# base = ubuntu + full apt update | ||
FROM ubuntu:xenial AS base | ||
|
||
FROM base as build_base | ||
|
||
RUN apt-get update \ | ||
RUN dpkg --add-architecture i386 \ | ||
&& apt-get update \ | ||
&& apt-get upgrade -y \ | ||
&& apt-get dist-upgrade -y \ | ||
&& apt-get install -y --no-install-recommends \ | ||
git \ | ||
dos2unix\ | ||
ca-certificates | ||
ca-certificates | ||
|
||
FROM build_base as rust_g | ||
|
||
WORKDIR /rust_g | ||
# byond = base + byond installed globally | ||
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/BeeStation/rust-g | ||
curl \ | ||
unzip \ | ||
make \ | ||
libstdc++6:i386 | ||
|
||
COPY dependencies.sh . | ||
|
||
RUN dos2unix dependencies.sh \ | ||
&& /bin/bash -c "source dependencies.sh \ | ||
&& git fetch --depth 1 origin \$RUST_G_VERSION" \ | ||
&& git checkout FETCH_HEAD \ | ||
&& ~/.cargo/bin/cargo build --release --all-features \ | ||
&& apt-get --purge remove -y dos2unix | ||
|
||
FROM base as dm_base | ||
|
||
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 | ||
|
||
# build = byond + beestation compiled and deployed to /deploy. Hijacking it for auxtools to prevent making another layer. | ||
FROM byond AS build | ||
WORKDIR /beestation | ||
|
||
FROM dm_base as build | ||
RUN apt-get install -y --no-install-recommends \ | ||
curl | ||
|
||
COPY . . | ||
|
||
RUN apt-get update \ | ||
&& apt-get install -y --no-install-recommends dos2unix \ | ||
&& rm -rf /var/lib/apt/lists/* \ | ||
&& DreamMaker -max_errors 0 beestation.dme && dos2unix tools/deploy.sh && tools/deploy.sh /deploy | ||
RUN env TG_BOOTSTRAP_NODE_LINUX=1 tools/build/build \ | ||
&& tools/deploy.sh /deploy \ | ||
&& cd auxtools \ | ||
&& curl -O "https://github.com/BeeStation/auxmos/releases/download/${AUXMOS_VERSION}/libauxmos.so" \ | ||
&& chmod +x libauxmos.so | ||
|
||
FROM dm_base | ||
# rust = base + rustc and i686 target | ||
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 1337 | ||
# rust_g = base + rust_g compiled to /rust_g | ||
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 \ | ||
mariadb-client \ | ||
libssl1.0.0 \ | ||
&& rm -rf /var/lib/apt/lists/* \ | ||
&& mkdir -p /root/.byond/bin | ||
RUN apt-get install -y --no-install-recommends \ | ||
pkg-config:i386 \ | ||
libssl-dev:i386 \ | ||
gcc-multilib \ | ||
git \ | ||
&& git init \ | ||
&& git remote add origin https://github.com/beestation/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 --all-features --target i686-unknown-linux-gnu | ||
|
||
# final = byond + runtime deps + rust_g + build | ||
FROM byond | ||
WORKDIR /beestation | ||
|
||
RUN apt-get install -y --no-install-recommends \ | ||
libssl1.0.0:i386 \ | ||
zlib1g:i386 | ||
|
||
COPY --from=rust_g /rust_g/target/release/librust_g.so /root/.byond/bin/rust_g | ||
COPY --from=build /deploy ./ | ||
COPY --from=rust_g /rust_g/target/i686-unknown-linux-gnu/release/librust_g.so /root/.byond/bin/rust_g | ||
|
||
#auxtools fexists memes | ||
RUN ln -s /beestation/auxtools/libauxmos.so /root/.byond/bin/libauxmos.so | ||
|
||
VOLUME [ "/beestation/config", "/beestation/data" ] | ||
|
||
ENTRYPOINT [ "DreamDaemon", "beestation.dmb", "-port", "1337", "-trusted", "-close", "-verbose" ] | ||
EXPOSE 1337 |
Oops, something went wrong.