Skip to content

Commit

Permalink
Fix Docker Build (tgstation#51781)
Browse files Browse the repository at this point in the history
* Change BYOND version to 513.1526

* Remove BSQL from docker image

* Add a docker publish action

* Add a docker test action

* Cleanup runtime icons

* Cleanup runtime sounds

* Correct docker workflow names

* Add Dockerfile as an appveyor cache dependency

* Fix build issues

* Copy all dlls

* No need for .dlls in docker

* Minor cleanups
  • Loading branch information
Cyberboss authored Jun 22, 2020
1 parent 636916e commit c89d7b1
Show file tree
Hide file tree
Showing 856 changed files with 107 additions and 96 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/docker_publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Docker Build

on:
push:
branches:
- master

jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Build and Publish Docker Image to Registry
uses: elgohr/Publish-Docker-Github-Action@master
with:
name: tgstation/tgstation
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
dockerfile: Dockerfile
tags: "latest"
cache: true
11 changes: 11 additions & 0 deletions .github/workflows/docker_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
on: [pull_request]

jobs:
docker_build:
runs-on: ubuntu-latest
name: Build Artifacts Docker Image
steps:
- uses: actions/checkout@v2

- name: Build Docker Image
run: docker build . -f Dockerfile
44 changes: 5 additions & 39 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
FROM tgstation/byond:513.1514 as base
FROM tgstation/byond:513.1526 as base

FROM base as build_base
FROM base as rust_g

RUN apt-get update \
&& apt-get install -y --no-install-recommends \
git \
ca-certificates

FROM build_base as rust_g

WORKDIR /rust_g

RUN apt-get install -y --no-install-recommends \
Expand All @@ -27,36 +25,6 @@ RUN /bin/bash -c "source dependencies.sh \
&& git checkout FETCH_HEAD \
&& ~/.cargo/bin/cargo build --release

FROM build_base as bsql

WORKDIR /bsql

RUN apt-get install -y --no-install-recommends software-properties-common \
&& add-apt-repository ppa:ubuntu-toolchain-r/test \
&& apt-get update \
&& apt-get install -y --no-install-recommends \
cmake \
make \
g++-7 \
libmariadb-client-lgpl-dev \
&& git init \
&& git remote add origin https://github.com/tgstation/BSQL

COPY dependencies.sh .

RUN /bin/bash -c "source dependencies.sh \
&& git fetch --depth 1 origin \$BSQL_VERSION" \
&& git checkout FETCH_HEAD

WORKDIR /bsql/artifacts

ENV CC=gcc-7 CXX=g++-7

RUN ln -s /usr/include/mariadb /usr/include/mysql \
&& ln -s /usr/lib/i386-linux-gnu /root/MariaDB \
&& cmake .. \
&& make

FROM base as dm_base

WORKDIR /tgstation
Expand All @@ -65,7 +33,9 @@ FROM dm_base as build

COPY . .

RUN DreamMaker -max_errors 0 tgstation.dme && tools/deploy.sh /deploy
RUN DreamMaker -max_errors 0 tgstation.dme \
&& tools/deploy.sh /deploy \
&& rm /deploy/*.dll

FROM dm_base

Expand All @@ -85,12 +55,8 @@ RUN apt-get update \
&& mkdir -p /root/.byond/bin

COPY --from=rust_g /rust_g/target/release/librust_g.so /root/.byond/bin/rust_g
COPY --from=bsql /bsql/artifacts/src/BSQL/libBSQL.so ./
COPY --from=build /deploy ./

#bsql fexists memes
RUN ln -s /tgstation/libBSQL.so /root/.byond/bin/libBSQL.so

VOLUME [ "/tgstation/config", "/tgstation/data" ]

ENTRYPOINT [ "DreamDaemon", "tgstation.dmb", "-port", "1337", "-trusted", "-close", "-verbose" ]
4 changes: 2 additions & 2 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ branches:
- ___TGS3TempBranch
- ___TGSTempBranch
cache:
- C:\byond\ -> dependencies.sh
- C:\byond\ -> dependencies.sh, Dockerfile
build_script:
- ps: tools/appveyor/build.ps1
- ps: "$deployPath = $env:APPVEYOR_BUILD_FOLDER + '/deploy'; bash tools/deploy.sh $deployPath"
- ps: "$deployPath = $env:APPVEYOR_BUILD_FOLDER + '/deploy'; bash tools/deploy.sh $deployPath"
- ps: "[System.IO.Compression.ZipFile]::CreateFromDirectory($env:APPVEYOR_BUILD_FOLDER + '/deploy', $env:APPVEYOR_BUILD_FOLDER + '/deploy.zip')"
artifacts:
- path: deploy.zip
4 changes: 2 additions & 2 deletions code/_globalvars/lists/flavor_misc.dm
Original file line number Diff line number Diff line change
Expand Up @@ -224,9 +224,9 @@ GLOBAL_LIST_INIT(TAGGERLOCATIONS, list("Disposals",
"Experimentor Lab", "Toxins", "Dormitories", "Virology",
"Xenobiology", "Law Office","Detective's Office"))

GLOBAL_LIST_INIT(station_prefixes, world.file2list("strings/station_prefixes.txt") + "")
GLOBAL_LIST_INIT(station_prefixes, world.file2list("strings/station_prefixes.txt"))

GLOBAL_LIST_INIT(station_names, world.file2list("strings/station_names.txt" + ""))
GLOBAL_LIST_INIT(station_names, world.file2list("strings/station_names.txt"))

GLOBAL_LIST_INIT(station_suffixes, world.file2list("strings/station_suffixes.txt"))

Expand Down
2 changes: 1 addition & 1 deletion code/controllers/subsystem/title.dm
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ SUBSYSTEM_DEF(title)
file_path = "[global.config.directory]/title_screens/images/[pick(title_screens)]"

if(!file_path)
file_path = "icons/default_title.dmi"
file_path = "icons/runtime/default_title.dmi"

ASSERT(fexists(file_path))

Expand Down
2 changes: 1 addition & 1 deletion code/datums/components/omen.dm
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
if(!the_head)
return

playsound(get_turf(our_guy), "sound/effects/tableheadsmash.ogg", 90, TRUE)
playsound(get_turf(our_guy), 'sound/effects/tableheadsmash.ogg', 90, TRUE)
our_guy.visible_message("<span class='danger'>[our_guy] hits [our_guy.p_their()] head really badly falling down!</span>", "<span class='userdanger'>You hit your head really badly falling down!</span>")
the_head.receive_damage(75)
our_guy.adjustOrganLoss(ORGAN_SLOT_BRAIN, 100)
Expand Down
2 changes: 1 addition & 1 deletion code/datums/components/tackle.dm
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,7 @@

///A special case for splatting for handling windows
/datum/component/tackler/proc/splatWindow(mob/living/carbon/user, obj/structure/window/W)
playsound(user, "sound/effects/Glasshit.ogg", 140, TRUE)
playsound(user, 'sound/effects/Glasshit.ogg', 140, TRUE)

if(W.type in list(/obj/structure/window, /obj/structure/window/fulltile, /obj/structure/window/unanchored, /obj/structure/window/fulltile/unanchored)) // boring unreinforced windows
for(var/i = 0, i < speed, i++)
Expand Down
6 changes: 3 additions & 3 deletions code/game/mecha/equipment/weapons/mecha_ammo.dm
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
var/rounds = 0
var/round_term = "round"
var/direct_load //For weapons where we re-load the weapon itself rather than adding to the ammo storage.
var/load_audio = "sound/weapons/gun_magazine_insert_empty_1.ogg"
var/load_audio = 'sound/weapons/gun/general/mag_bullet_insert.ogg'
var/ammo_type

/obj/item/mecha_ammo/proc/update_name()
Expand Down Expand Up @@ -62,7 +62,7 @@
rounds = 6
round_term = "missile"
direct_load = TRUE
load_audio = "sound/weapons/bulletinsert.ogg"
load_audio = 'sound/weapons/gun/general/mag_bullet_insert.ogg'
ammo_type = "missiles_br"

/obj/item/mecha_ammo/missiles_he
Expand All @@ -72,7 +72,7 @@
rounds = 8
round_term = "missile"
direct_load = TRUE
load_audio = "sound/weapons/bulletinsert.ogg"
load_audio = 'sound/weapons/gun/general/mag_bullet_insert.ogg'
ammo_type = "missiles_he"


Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/items/cigs_lighters.dm
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM

/obj/item/match/proc/matchignite()
if(!lit && !burnt)
playsound(src, "sound/items/match_strike.ogg", 15, TRUE)
playsound(src, 'sound/items/match_strike.ogg', 15, TRUE)
lit = TRUE
icon_state = "match_lit"
damtype = "fire"
Expand Down
6 changes: 3 additions & 3 deletions code/game/objects/items/devices/instruments.dm
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@
AddComponent(/datum/component/spooky)

/obj/item/instrument/trumpet/spectral/attack(mob/living/carbon/C, mob/user)
playsound (loc, 'sound/instruments/trombone/En4.mid', 100,1,-1)
playsound (src, 'sound/runtime/instruments/trombone/En4.mid', 100,1,-1)
..()

/obj/item/instrument/saxophone
Expand All @@ -214,7 +214,7 @@
AddComponent(/datum/component/spooky)

/obj/item/instrument/saxophone/spectral/attack(mob/living/carbon/C, mob/user)
playsound (loc, 'sound/instruments/saxophone/En4.mid', 100,1,-1)
playsound (src, 'sound/runtime/instruments/saxophone/En4.mid', 100,1,-1)
..()

/obj/item/instrument/trombone
Expand All @@ -238,7 +238,7 @@
AddComponent(/datum/component/spooky)

/obj/item/instrument/trombone/spectral/attack(mob/living/carbon/C, mob/user)
playsound (loc, 'sound/instruments/trombone/Cn4.mid', 100,1,-1)
playsound (src, 'sound/runtime/instruments/trombone/Cn4.mid', 100,1,-1)
..()

/obj/item/instrument/recorder
Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/items/melee/misc.dm
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@
var/stamina_damage = 55 // Do we deal stamina damage.
var/affect_silicon = FALSE // Does it stun silicons.
var/on_sound // "On" sound, played when switching between able to stun or not.
var/on_stun_sound = "sound/effects/woodhit.ogg" // Default path to sound for when we stun.
var/on_stun_sound = 'sound/effects/woodhit.ogg' // Default path to sound for when we stun.
var/stun_animation = TRUE // Do we animate the "hit" when stunning.
var/on = TRUE // Are we on or off.

Expand Down
22 changes: 14 additions & 8 deletions code/game/objects/items/tcg/tcg.dm
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,13 @@ GLOBAL_LIST_EMPTY(cached_rarity_table)
//Global list of all cards by series, with cards cached by rarity to make those lookups faster
GLOBAL_LIST_EMPTY(cached_cards)

#define DEFAULT_TCG_DMI_ICON 'icons/runtime/tcg/default.dmi'
#define DEFAULT_TCG_DMI "icons/runtime/tcg/default.dmi"

/obj/item/tcgcard
name = "Coder"
desc = "Wow, a mint condition coder card! Better tell the Github all about this!"
icon = 'icons/obj/tcg.dmi'
icon = DEFAULT_TCG_DMI_ICON
icon_state = "runtime"
w_class = WEIGHT_CLASS_TINY
//Unique ID, for use in lookups and storage, used to index the global datum list where the rest of the card's info is stored
Expand Down Expand Up @@ -63,7 +66,7 @@ GLOBAL_LIST_EMPTY(cached_cards)
/obj/item/cardpack
name = "Trading Card Pack: Coder"
desc = "Contains six complete fuckups by the coders. Report this on github please!"
icon = 'icons/obj/tcg.dmi'
icon = DEFAULT_TCG_DMI_ICON
icon_state = "cardback_nt"
w_class = WEIGHT_CLASS_TINY
///The card series to look in
Expand Down Expand Up @@ -92,15 +95,15 @@ GLOBAL_LIST_EMPTY(cached_cards)
/obj/item/cardpack/series_one
name = "Trading Card Pack: Series 1"
desc = "Contains six cards of varying rarity from the 2560 Core Set. Collect them all!"
icon = 'icons/obj/tcg.dmi'
icon = DEFAULT_TCG_DMI_ICON
icon_state = "cardpack_series1"
series = "coreset2020"
contains_coin = 10

/obj/item/cardpack/resin
name = "Trading Card Pack: Resin Frontier Booster Pack"
desc = "Contains six cards of varying rarity from the Resin Frontier set. Collect them all!"
icon = 'icons/obj/tcg_xenos.dmi'
icon = 'icons/runtime/tcg/xenos.dmi'
icon_state = "cardpack_resin"
series = "resinfront"
contains_coin = 0
Expand Down Expand Up @@ -150,7 +153,7 @@ GLOBAL_LIST_EMPTY(cached_cards)
/obj/item/coin/thunderdome
name = "Thunderdome Flipper"
desc = "A Thunderdome TCG flipper, for deciding who gets to go first. Also conveniently acts as a counter, for various purposes."
icon = 'icons/obj/tcg.dmi'
icon = DEFAULT_TCG_DMI_ICON
icon_state = "coin_nanotrasen"
custom_materials = list(/datum/material/plastic = 400)
material_flags = NONE
Expand All @@ -171,7 +174,7 @@ GLOBAL_LIST_EMPTY(cached_cards)
/obj/item/storage/card_binder
name = "card binder"
desc = "The perfect way to keep your collection of cards safe and valuable."
icon = 'icons/obj/tcg.dmi'
icon = DEFAULT_TCG_DMI_ICON
icon_state = "binder"
inhand_icon_state = "album"
lefthand_file = 'icons/mob/inhands/misc/books_lefthand.dmi'
Expand Down Expand Up @@ -230,7 +233,7 @@ GLOBAL_LIST_EMPTY(cached_cards)
var/desc = "Wow, a mint condition coder card! Better tell the Github all about this!"
///This handles any extra rules for the card, i.e. extra attributes, special effects, etc. If you've played any other card game, you know how this works.
var/rules = "There are no rules here. There is no escape. No Recall or Intervention can work in this place."
var/icon = "icons/obj/tcg.dmi"
var/icon = DEFAULT_TCG_DMI
var/icon_state = "template"
///What it costs to summon this card to the battlefield.
var/summoncost = -1
Expand Down Expand Up @@ -312,7 +315,7 @@ GLOBAL_LIST_EMPTY(cached_cards)
var/toAdd = "The card [target.id] in [series] has the following default variables:"
var/shouldAdd = FALSE
for(var/a in (target.vars ^ thing.vars))
if(a == "icon" && target.vars[a] == "icons/obj/tcg.dmi")
if(a == "icon" && target.vars[a] == DEFAULT_TCG_DMI)
continue
if(target.vars[a] == initial(target.vars[a]))
shouldAdd = TRUE
Expand Down Expand Up @@ -370,3 +373,6 @@ GLOBAL_LIST_EMPTY(cached_cards)
GLOB.cached_cards[c.series][c.rarity] += c.id
//Let's actually store the datum here
GLOB.cached_cards[c.series]["ALL"][c.id] = c

#undef DEFAULT_TCG_DMI_ICON
#undef DEFAULT_TCG_DMI
2 changes: 1 addition & 1 deletion code/game/objects/items/toys.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1483,7 +1483,7 @@
name = "Security Officer action figure"
icon_state = "secofficer"
toysay = "I am the law!"
toysound = 'sound/voice/complionator/dredd.ogg'
toysound = 'sound/runtime/complionator/dredd.ogg'

/obj/item/toy/figure/virologist
name = "Virologist action figure"
Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/structures/musician.dm
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
return

// now generate name
var/soundfile = "sound/instruments/[instrumentDir]/[ascii2text(note+64)][acc][oct].[instrumentExt]"
var/soundfile = "sound/runtime/instruments/[instrumentDir]/[ascii2text(note+64)][acc][oct].[instrumentExt]"
soundfile = file(soundfile)
// make sure the note exists
if(!fexists(soundfile))
Expand Down
4 changes: 2 additions & 2 deletions code/game/objects/structures/tables_racks.dm
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@
pushed_mob.apply_damage(40, STAMINA)
if(user.mind?.martial_art.smashes_tables && user.mind?.martial_art.can_use(user))
deconstruct(FALSE)
playsound(pushed_mob, "sound/effects/tableslam.ogg", 90, TRUE)
playsound(pushed_mob, 'sound/effects/tableslam.ogg', 90, TRUE)
pushed_mob.visible_message("<span class='danger'>[user] slams [pushed_mob] onto \the [src]!</span>", \
"<span class='userdanger'>[user] slams you onto \the [src]!</span>")
log_combat(user, pushed_mob, "tabled", null, "onto [src]")
Expand All @@ -147,7 +147,7 @@
take_damage(50)
if(user.mind?.martial_art.smashes_tables && user.mind?.martial_art.can_use(user))
deconstruct(FALSE)
playsound(pushed_mob, "sound/effects/tablelimbsmash.ogg", 90, TRUE)
playsound(pushed_mob, 'sound/effects/bang.ogg', 90, TRUE)
pushed_mob.visible_message("<span class='danger'>[user] smashes [pushed_mob]'s [banged_limb.name] against \the [src]!</span>",
"<span class='userdanger'>[user] smashes your [banged_limb.name] against \the [src]</span>")
log_combat(user, pushed_mob, "head slammed", null, "against [src]")
Expand Down
2 changes: 1 addition & 1 deletion code/game/sound.dm
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@
if("goose")
soundin = pick('sound/creatures/goose1.ogg', 'sound/creatures/goose2.ogg', 'sound/creatures/goose3.ogg', 'sound/creatures/goose4.ogg')
if("warpspeed")
soundin = 'sound/effects/hyperspace_begin.ogg'
soundin = 'sound/runtime/hyperspace/hyperspace_begin.ogg'
if("smcalm")
soundin = pick('sound/machines/sm/accent/normal/1.ogg', 'sound/machines/sm/accent/normal/2.ogg', 'sound/machines/sm/accent/normal/3.ogg', 'sound/machines/sm/accent/normal/4.ogg', 'sound/machines/sm/accent/normal/5.ogg', 'sound/machines/sm/accent/normal/6.ogg', 'sound/machines/sm/accent/normal/7.ogg', 'sound/machines/sm/accent/normal/8.ogg', 'sound/machines/sm/accent/normal/9.ogg', 'sound/machines/sm/accent/normal/10.ogg', 'sound/machines/sm/accent/normal/11.ogg', 'sound/machines/sm/accent/normal/12.ogg', 'sound/machines/sm/accent/normal/13.ogg', 'sound/machines/sm/accent/normal/14.ogg', 'sound/machines/sm/accent/normal/15.ogg', 'sound/machines/sm/accent/normal/16.ogg', 'sound/machines/sm/accent/normal/17.ogg', 'sound/machines/sm/accent/normal/18.ogg', 'sound/machines/sm/accent/normal/19.ogg', 'sound/machines/sm/accent/normal/20.ogg', 'sound/machines/sm/accent/normal/21.ogg', 'sound/machines/sm/accent/normal/22.ogg', 'sound/machines/sm/accent/normal/23.ogg', 'sound/machines/sm/accent/normal/24.ogg', 'sound/machines/sm/accent/normal/25.ogg', 'sound/machines/sm/accent/normal/26.ogg', 'sound/machines/sm/accent/normal/27.ogg', 'sound/machines/sm/accent/normal/28.ogg', 'sound/machines/sm/accent/normal/29.ogg', 'sound/machines/sm/accent/normal/30.ogg', 'sound/machines/sm/accent/normal/31.ogg', 'sound/machines/sm/accent/normal/32.ogg', 'sound/machines/sm/accent/normal/33.ogg')
if("smdelam")
Expand Down
2 changes: 1 addition & 1 deletion code/modules/chatter/chatter.dm
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
chatter_speak_word(A.loc, phomeme, length)

/proc/chatter_speak_word(loc, phomeme, length)
var/path = "sound/chatter/[phomeme]_[length].ogg"
var/path = "sound/runtime/chatter/[phomeme]_[length].ogg"

playsound(loc, path,
vol = 40, vary = 0, extrarange = 3, falloff = FALSE)
Expand Down
4 changes: 2 additions & 2 deletions code/modules/clothing/masks/hailer.dm
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ GLOBAL_LIST_INIT(hailer_phrases, list(
. = FALSE
if (!cooldown)
usr.audible_message("[usr]'s Compli-o-Nator: <font color='red' size='4'><b>[initial(phrase.phrase_text)]</b></font>")
playsound(src.loc, "sound/voice/complionator/[initial(phrase.phrase_sound)].ogg", 100, FALSE, 4)
playsound(src, "sound/runtime/complionator/[initial(phrase.phrase_sound)].ogg", 100, FALSE, 4)
cooldown = TRUE
addtimer(CALLBACK(src, /obj/item/clothing/mask/gas/sechailer/proc/reset_cooldown), PHRASE_COOLDOWN)
. = TRUE
Expand All @@ -188,7 +188,7 @@ GLOBAL_LIST_INIT(hailer_phrases, list(
/obj/item/clothing/mask/whistle/ui_action_click(mob/user, action)
if(cooldown < world.time - 100)
usr.audible_message("<font color='red' size='5'><b>HALT!</b></font>")
playsound(src.loc, "sound/misc/whistle.ogg", 100, FALSE, 4)
playsound(src, 'sound/misc/whistle.ogg', 100, FALSE, 4)
cooldown = world.time

#undef PHRASE_COOLDOWN
Expand Down
Loading

0 comments on commit c89d7b1

Please sign in to comment.