Skip to content

Commit

Permalink
Minor auxmos update (#21053)
Browse files Browse the repository at this point in the history
* hmm

* this?

* this?

* that?

* latest

* this fixes it?

* hmm

* eeee

* Revert "eeee"

This reverts commit bb7853e.

* Revert "hmm"

This reverts commit 387edcf.

* do that

* fix the binary

* lebin

* hmmhmm

* arghhh

* how bout this

* hmm?

* again

* update this

* update shit

* compat

* bump it correctly
  • Loading branch information
jupyterkat authored Dec 29, 2023
1 parent 3e8e679 commit b4074e9
Show file tree
Hide file tree
Showing 10 changed files with 89 additions and 83 deletions.
50 changes: 28 additions & 22 deletions .github/workflows/turdis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2

- name: Cache SpacemanDMM
uses: actions/cache@v1
with:
Expand All @@ -27,7 +27,7 @@ jobs:

- name: Setup Python
uses: actions/setup-python@v2

- name: Setup Rust
uses: hecrj/[email protected]

Expand All @@ -50,25 +50,25 @@ jobs:
id: linter
run: |
~/dreamchecker > ${GITHUB_WORKSPACE}/output-annotations.txt 2>&1
- name: Annotate Linter
uses: yogstation13/DreamAnnotate@v2
if: always()
with:
with:
outputFile: output-annotations.txt

compile:
name: Compile All Maps
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2

- name: Install Dependencies
run: |
sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt install libstdc++6:i386
- name: Restore Cache BYOND
uses: actions/cache@v1
with:
Expand All @@ -84,7 +84,7 @@ jobs:
echo "/home/runner/BYOND/byond/bin" >> $GITHUB_PATH
echo "LD_LIBRARY_PATH=/home/runner/BYOND/byond/bin:$LD_LIBRARY_PATH" >> $GITHUB_ENV
echo "MANPATH=/home/runner/BYOND/byond/man:$MANPATH" >> $GITHUB_ENV
- name: Compile All Maps
run: |
tools/build/build --ci dm -DCIBUILDING -DCITESTING -DALL_MAPS
Expand Down Expand Up @@ -113,30 +113,36 @@ jobs:
map: ${{ fromJSON(needs.find_all_maps.outputs.maps).paths }}
services:
mariadb:
image: mariadb
ports:
- 3306:3306
env:
MARIADB_ALLOW_EMPTY_ROOT_PASSWORD: yes
image: mariadb
ports:
- 3306:3306
env:
MARIADB_ALLOW_EMPTY_ROOT_PASSWORD: yes
concurrency:
group: ci-${{ github.ref }}-${{ matrix.map }}
cancel-in-progress: true
steps:
- uses: actions/checkout@v2

- name: Install Dependencies
run: |
sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt install libstdc++6:i386 gcc-multilib g++-7 g++-7-multilib zlib1g:i386 libssl1.1 libssl1.1:i386
- name: Restore Cache BYOND
uses: actions/cache@v1
with:
path: ~/BYOND
key: ${{ runner.os }}-byond-${{ hashFiles('Dockerfile')}}
restore-keys: ${{ runner.os }}-byond


- name: Restore Cache Auxmos
uses: actions/cache@v1
with:
path: ~/.byond
key: auxmos-${{ hashFiles('dependencies.sh')}}

- name: Restore Yarn Cache
uses: actions/cache@v2
with:
Expand All @@ -152,26 +158,27 @@ jobs:
echo "MANPATH=/home/runner/BYOND/byond/man:$MANPATH" >> $GITHUB_ENV
cd $GITHUB_WORKSPACE
tools/travis/install_rust_g.sh
#tools/travis/install_extools.sh
sudo chmod 777 tools/travis/install_extools.sh
tools/travis/install_extools.sh
mysql -u root -h 127.0.0.1 -e 'CREATE DATABASE tg_travis;'
mysql -u root -h 127.0.0.1 tg_travis < SQL/tgstation_schema.sql
- name: Compile
run: |
tools/build/build --ci dm -DCIBUILDING
tools/travis/dm.sh -DTRAVISBUILDING -DANSICOLORS yogstation.dme || travis_terminate 1
- name: Prepare Artifacts
run: |
mkdir artifacts
cp yogstation.dmb artifacts
cp yogstation.rsc artifacts
- name: Upload Artifacts
uses: actions/upload-artifact@v1
with:
with:
name: DMB + RSC ${{matrix.map}}
path: ${{github.workspace}}/artifacts

- name: Run Tests
run: |
tools/travis/run_server.sh ${{ matrix.map }}
Expand All @@ -188,4 +195,3 @@ jobs:
contains(needs.*.result, 'failure')
|| contains(needs.*.result, 'cancelled')
}}
Binary file modified auxmos.dll
Binary file not shown.
Binary file modified auxmos.pdb
Binary file not shown.
63 changes: 35 additions & 28 deletions code/__DEFINES/bindings.dm
Original file line number Diff line number Diff line change
@@ -1,17 +1,49 @@
#define AUXMOS (__detect_auxmos())
//THIS FILE IS AUTOMATICALLY GENERATED BY AUXMOS, PLEASE DO NOT TOUCH IT
//PROC DEFINITIONS MAY MOVE AROUND, THIS IS NORMAL

/* This comment bypasses grep checks */ /var/__auxmos

/proc/__detect_auxmos()
if (world.system_type == UNIX)
return "libauxmos"
return __auxmos = "libauxmos"
else
return "auxmos"
return __auxmos = "auxmos"

#define AUXMOS (__auxmos || __detect_auxmos())

/proc/__auxmos_shutdown()
return call_ext(AUXMOS, "byond:auxmos_shutdown_ffi")()

/datum/controller/subsystem/air/proc/process_excited_groups_auxtools(remaining)
return call_ext(AUXMOS, "byond:groups_hook_ffi")(src, remaining)

/datum/controller/subsystem/air/proc/process_turfs_auxtools(remaining)
return call_ext(AUXMOS, "byond:process_turf_hook_ffi")(src, remaining)

/datum/controller/subsystem/air/proc/finish_turf_processing_auxtools(time_remaining)
return call_ext(AUXMOS, "byond:finish_process_turfs_ffi")(time_remaining)

/datum/controller/subsystem/air/proc/thread_running()
return call_ext(AUXMOS, "byond:thread_running_hook_ffi")()

/turf/proc/__update_auxtools_turf_adjacency_info()
return call_ext(AUXMOS, "byond:hook_infos_ffi")(src)

/turf/proc/update_air_ref(flag)
return call_ext(AUXMOS, "byond:hook_register_turf_ffi")(src, flag)

/proc/finalize_gas_refs()
return call_ext(AUXMOS, "byond:finalize_gas_refs_ffi")()

/datum/controller/subsystem/air/proc/auxtools_update_reactions()
return call_ext(AUXMOS, "byond:update_reactions_ffi")()

/proc/auxtools_atmos_init(gas_data)
return call_ext(AUXMOS, "byond:hook_init_ffi")(gas_data)

/proc/_auxtools_register_gas(gas)
return call_ext(AUXMOS, "byond:hook_register_gas_ffi")(gas)

/datum/gas_mixture/proc/__auxtools_parse_gas_string(string)
return call_ext(AUXMOS, "byond:parse_gas_string_ffi")(src, string)

Expand Down Expand Up @@ -154,29 +186,4 @@
/datum/controller/subsystem/air/proc/process_turf_equalize_auxtools(remaining)
return call_ext(AUXMOS, "byond:equalize_hook_ffi")(src, remaining)

/datum/controller/subsystem/air/proc/process_excited_groups_auxtools(remaining)
return call_ext(AUXMOS, "byond:groups_hook_ffi")(src, remaining)

/proc/finalize_gas_refs()
return call_ext(AUXMOS, "byond:finalize_gas_refs_ffi")()

/datum/controller/subsystem/air/proc/auxtools_update_reactions()
return call_ext(AUXMOS, "byond:update_reactions_ffi")()

/proc/auxtools_atmos_init(gas_data)
return call_ext(AUXMOS, "byond:hook_init_ffi")(gas_data)

/proc/_auxtools_register_gas(gas)
return call_ext(AUXMOS, "byond:hook_register_gas_ffi")(gas)

/proc/__auxmos_shutdown()
return call_ext(AUXMOS, "byond:auxmos_shutdown_ffi")()

/datum/controller/subsystem/air/proc/process_turfs_auxtools(remaining)
return call_ext(AUXMOS, "byond:process_turf_hook_ffi")(src, remaining)

/datum/controller/subsystem/air/proc/finish_turf_processing_auxtools(time_remaining)
return call_ext(AUXMOS, "byond:finish_process_turfs_ffi")(time_remaining)

/datum/controller/subsystem/air/proc/thread_running()
return call_ext(AUXMOS, "byond:thread_running_hook_ffi")()
8 changes: 4 additions & 4 deletions code/__byond_version_compat.dm
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@

//Update this whenever you need to take advantage of more recent byond features
#define MIN_COMPILER_VERSION 515
#define MIN_COMPILER_BUILD 1620
#define MIN_COMPILER_BUILD 1621
#if (DM_VERSION < MIN_COMPILER_VERSION || DM_BUILD < MIN_COMPILER_BUILD) && !defined(SPACEMAN_DMM)
//Don't forget to update this part
#error Your version of BYOND is too out-of-date to compile this project. Go to https://secure.byond.com/download and update.
#error You need version 515.1620 or higher
#error You need version 515.1621 or higher
#endif

//If you update these values, update the message in the #error
#define MAX_BYOND_MAJOR 515
#define MAX_BYOND_MINOR 1620
#define MAX_BYOND_MINOR 1621

// You can define IGNORE_MAX_BYOND_VERSION to bypass the max version check.
// Note: This will likely break the game, especially any extools/auxtools linkage. Only use if you know what you're doing!
Expand All @@ -25,7 +25,7 @@

#if ((DM_VERSION > MAX_BYOND_MAJOR) || (DM_BUILD > MAX_BYOND_MINOR)) && !defined(IGNORE_MAX_BYOND_VERSION)
// Not updating until we fully move to 515
#error Your version of BYOND is too new to compile this project. Download version 515.1620 at www.byond.com/download/build/515/515.1620_byond.exe
#error Your version of BYOND is too new to compile this project. Download version 515.1621 at www.byond.com/download/build/515/515.1621_byond.exe
#endif

// 515 split call for external libraries into call_ext
Expand Down
12 changes: 0 additions & 12 deletions code/controllers/subsystem/air.dm
Original file line number Diff line number Diff line change
Expand Up @@ -68,18 +68,6 @@ SUBSYSTEM_DEF(air)

var/list/paused_z_levels //Paused z-levels will not add turfs to active

//hack
/proc/get_overlays()
return GLOB.gas_data.overlays

//hack
/proc/get_hpds()
return SSair.high_pressure_delta

//hack
/proc/get_reactions()
return SSair.gas_reactions

/datum/controller/subsystem/air/stat_entry(msg)
msg += "C:{"
msg += "HP:[round(cost_highpressure,1)]|"
Expand Down
4 changes: 2 additions & 2 deletions dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

# byond version
export BYOND_MAJOR=515
export BYOND_MINOR=1620
export BYOND_MINOR=1621

#rust_g git tag
export RUST_G_VERSION=1.2.0-yogs1
Expand All @@ -21,4 +21,4 @@ export SPACEMAN_DMM_VERSION=suite-1.8
export PYTHON_VERSION=3.9.0

# Auxmos git tag
export AUXMOS_VERSION=434ed4ca7a0bf072f9861bd6e54552af8fb9e27f
export AUXMOS_VERSION=7854a9e0170189b5293018286de91521c2054026
Binary file removed libauxmos.so
Binary file not shown.
2 changes: 1 addition & 1 deletion tools/tgs4_scripts/PreCompile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ fi

echo "Deploying auxmos..."
git checkout "$AUXMOS_VERSION"
env PKG_CONFIG_ALLOW_CROSS=1 ~/.cargo/bin/cargo rustc --release --target=i686-unknown-linux-gnu --features all_reaction_hooks,katmos -- -C target-cpu=native
env PKG_CONFIG_ALLOW_CROSS=1 ~/.cargo/bin/cargo rustc --release --target=i686-unknown-linux-gnu --features katmos -- -C target-cpu=native
mv -f target/i686-unknown-linux-gnu/release/libauxmos.so "$1/libauxmos.so"
cd ..

Expand Down
33 changes: 19 additions & 14 deletions tools/travis/install_extools.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,23 @@

set -euo pipefail

echo "Installing Extools dependencies"
mkdir ../extools
cd ../extools
gh repo clone yogstation13/extools
rm -r build
mkdir build
cd build
cmake ../byond-extools
cmake --build .
chmod 755 libbyond-extools.so
source dependencies.sh

mkdir -p ~/.byond/bin
cp libbyond-extools.so ~/.byond/bin/libbyond-extools.so
ldd ~/.byond/bin/libbyond-extools.so
echo "Finished installing Extools"
if [ -f "$HOME/.byond/bin/libauxmos.so" ] && grep -Fxq "${AUXMOS_VERSION}" $HOME/.byond/bin/auxmos-version.txt;
then
echo "Using cached directory."
else
echo "Installing Auxmos"
git clone https://github.com/Putnam3145/auxmos
cd ./auxmos
rustup target add i686-unknown-linux-gnu
cargo build --target i686-unknown-linux-gnu --features katmos --release
chmod 755 ./target/i686-unknown-linux-gnu/release/libauxmos.so

mkdir -p ~/.byond/bin
cp ./target/i686-unknown-linux-gnu/release/libauxmos.so ~/.byond/bin/libauxmos.so
echo "$AUXMOS_VERSION" > "$HOME/.byond/bin/auxmos-version.txt"
ldd ~/.byond/bin/libauxmos.so
echo "Finished installing Auxmos"
cd ..
fi

0 comments on commit b4074e9

Please sign in to comment.