Skip to content

Commit

Permalink
maybe???
Browse files Browse the repository at this point in the history
  • Loading branch information
johndoe2013 committed Jun 17, 2024
1 parent 370f7c6 commit 6eb3128
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/run_unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ jobs:
sudo apt update || true
sudo apt install -o APT::Immediate-Configure=false zlib1g-dev:i386 libssl-dev:i386
bash tools/ci/install_rust_g.sh
- name: Install auxlua
- name: Install auxtools
run: |
bash tools/ci/install_auxlua.sh
bash tools/ci/install_auxtools.sh
- name: Configure version
run: |
echo "BYOND_MAJOR=${{ inputs.major }}" >> $GITHUB_ENV
Expand Down
1 change: 1 addition & 0 deletions code/__HELPERS/auxtools.dm
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/// Macro for getting the auxtools library file
#define AUXLIB(name) (world.system_type == MS_WINDOWS ? "[#name].dll" : __detect_auxtools(#name))
#define AUXLUA AUXLIB(auxlua)
#define AUXTOOLS AUXLIB(debug_server)

/proc/__detect_auxtools(library)
if(IsAdminAdvancedProcCall())
Expand Down
2 changes: 1 addition & 1 deletion code/__HELPERS/auxtools_api.dm
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ GLOBAL_PROTECT(auxtools_initialized)
CRASH("auxcov not loaded")

/world/Del()
AUXTOOLS_FULL_SHUTDOWN(AUXLUA)
AUXTOOLS_FULL_SHUTDOWN(AUXTOOLS)
var/debug_server = world.GetConfig("env", "AUXTOOLS_DEBUG_DLL")
if (debug_server)
LIBCALL(debug_server, "auxtools_shutdown")()
Expand Down
2 changes: 1 addition & 1 deletion code/game/world.dm
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ GLOBAL_LIST_INIT(reboot_sfx, file2list("config/reboot_sfx.txt"))

/world/proc/init_coverage()
#ifdef CODE_COVERAGE
AUXTOOLS_CHECK_NO_CONFIG(AUXLUA)
AUXTOOLS_CHECK_NO_CONFIG(AUXTOOLS)
start_code_coverage("code_coverage.xml")
#else
return
Expand Down
3 changes: 3 additions & 0 deletions dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,6 @@ export AUXLUA_REPO=tgstation/auxlua

#auxlua git tag
export AUXLUA_VERSION=1.4.4

export AUXTOOLS_REPO=willox/auxtools
export AUXTOOLS_VERSION=2.3.3
23 changes: 23 additions & 0 deletions tools/ci/install_auxtools.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/usr/bin/env bash
set -euo pipefail

source dependencies.sh

mkdir -p ~/.byond/bin
# We need to compile this for linux ourselves (:
sudo apt-get install gcc-multilib
curl https://sh.rustup.rs -sSfo rustup-init.sh
chmod +x rustup-init.sh
./rustup-init.sh
curl "https://github.com/$AUXTOOLS_REPO/archive/refs/tags/v$AUXTOOLS_VERSION.zip" -o libauxtools.zip
unzip libauxtools.zip
rm libauxtools.zip
cd libauxtools
rustup target add i686-unknown-linux-gnu
sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install build-essential g++-multilib libc6-i386 libstdc++6:i386
export PKG_CONFIG_ALLOW_CROSS=1
cargo build --release --target i686-unknown-linux-gnu
chmod +x ~/.byond/bin/libauxtools/target/i686-unknown-linux-gnu/release/libauxtools.so
ldd ~/.byond/bin/libauxtools/target/i686-unknown-linux-gnu/release/libauxtools.so

0 comments on commit 6eb3128

Please sign in to comment.