mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2025-12-24 00:51:26 +00:00
Replacement github actions (#12857)
This commit is contained in:
93
.github/workflows/byond.yml
vendored
Normal file
93
.github/workflows/byond.yml
vendored
Normal file
@@ -0,0 +1,93 @@
|
|||||||
|
name: BYOND tests
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
lint:
|
||||||
|
if: "!contains(github.event.head_commit.message, '[ci skip]')"
|
||||||
|
runs-on: ubuntu-20.04
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- name: Install
|
||||||
|
run: |
|
||||||
|
pip install --user -r ./tools/requirements.txt
|
||||||
|
chmod +x ./scripts/code_check.sh && ./scripts/code_check.sh $PWD
|
||||||
|
bash tools/ci/install_spaceman_dmm.sh dreamchecker
|
||||||
|
- name: Code checks
|
||||||
|
run: |
|
||||||
|
awk -f tools/indentation.awk **/*.dm
|
||||||
|
python3 tools/TagMatcher/tag-matcher.py ../..
|
||||||
|
python3 tools/GenerateChangelog/ss13_genchangelog.py html/changelog.html html/changelogs --dry-run
|
||||||
|
python3 tools/mapmerge2/travis_mapcheck.py
|
||||||
|
echo "6a5ae087fe5bfa66e52e508655e57120 *html/changelogs/example.yml" | md5sum -c -
|
||||||
|
- name: Run dreamchecker
|
||||||
|
run: ~/dreamchecker > ${GITHUB_WORKSPACE}/output-annotations.txt 2>&1
|
||||||
|
- name: Annotate Lints
|
||||||
|
uses: yogstation13/DreamAnnotate@v1
|
||||||
|
if: always()
|
||||||
|
with:
|
||||||
|
outputFile: output-annotations.txt
|
||||||
|
|
||||||
|
unit-test-linux:
|
||||||
|
if: "!contains(github.event.head_commit.message, '[ci skip]')"
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
map: [runtime, aurora, exodus]
|
||||||
|
runs-on: ubuntu-20.04
|
||||||
|
needs: lint
|
||||||
|
services:
|
||||||
|
mariadb:
|
||||||
|
image: mariadb:latest
|
||||||
|
ports:
|
||||||
|
- 3306
|
||||||
|
env:
|
||||||
|
MYSQL_USER: build
|
||||||
|
MYSQL_PASSWORD: build
|
||||||
|
MYSQL_DATABASE: game
|
||||||
|
MYSQL_ROOT_PASSWORD: root
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- name: Install BYOND
|
||||||
|
run: |
|
||||||
|
source .versions.sh
|
||||||
|
sudo dpkg --add-architecture i386
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install -y gcc-multilib libssl1.1:i386
|
||||||
|
bash tools/ci/install_byond.sh
|
||||||
|
source $HOME/BYOND/byond/bin/byondsetup
|
||||||
|
echo "Getting rust_g from https://github.com/Aurorastation/rust-g/releases/download/${RUST_G_VERSION}/librust_g.so"
|
||||||
|
wget "https://github.com/Aurorastation/rust-g/releases/download/${RUST_G_VERSION}/librust_g.so" -O ./librust_g.so
|
||||||
|
chmod +x ./librust_g.so
|
||||||
|
ldd ./librust_g.so
|
||||||
|
- name: Install Flyway
|
||||||
|
run: |
|
||||||
|
source .versions.sh
|
||||||
|
bash scripts/install-flyway.sh
|
||||||
|
- name: Migrate database
|
||||||
|
env:
|
||||||
|
PORT: ${{ job.services.mariadb.ports[3306] }}
|
||||||
|
run: |
|
||||||
|
source .versions.sh
|
||||||
|
$HOME/flyway-$FLYWAY_BUILD/flyway migrate -user=root -password=root -url="jdbc:mariadb://localhost:$PORT/game"
|
||||||
|
- name: Build
|
||||||
|
run: |
|
||||||
|
export LD_LIBRARY_PATH=./:$PWD:$HOME/BYOND/byond/bin:/usr/local/lib:$LD_LIBRARY_PATH
|
||||||
|
scripts/dm.sh -DUNIT_TEST -M${{ matrix.map }} aurorastation.dme
|
||||||
|
grep "0 warnings" build_log.txt
|
||||||
|
- name: Run tests
|
||||||
|
env:
|
||||||
|
PORT: ${{ job.services.mariadb.ports[3306] }}
|
||||||
|
run: |
|
||||||
|
export LD_LIBRARY_PATH=./:$PWD:$HOME/BYOND/byond/bin:/usr/local/lib:$LD_LIBRARY_PATH
|
||||||
|
cp config/example/* config/ && cp config/ut/config-db.txt config/config.txt && cp config/ut/dbconfig.txt config/dbconfig.txt
|
||||||
|
echo "PORT $PORT" >> config/dbconfig.txt
|
||||||
|
$HOME/BYOND/byond/bin/DreamDaemon aurorastation.dmb -invisible -trusted -core 2>&1 | tee log.txt
|
||||||
|
grep "All Unit Tests Passed" log.txt
|
||||||
|
(! grep "runtime error:" log.txt)
|
||||||
|
|
||||||
8
.versions.sh
Normal file
8
.versions.sh
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
export BYOND_MAJOR=514
|
||||||
|
export BYOND_MINOR=1560
|
||||||
|
|
||||||
|
export RUST_G_VERSION=v0.4.2+a3
|
||||||
|
export FLYWAY_BUILD=5.2.4
|
||||||
|
export SPACEMAN_DMM_VERSION=suite-1.6
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
---
|
--
|
||||||
--- Adds the ss13_admins SQL table again.
|
-- Adds the ss13_admins SQL table again.
|
||||||
---
|
--
|
||||||
|
|
||||||
CREATE TABLE `ss13_admins` (
|
CREATE TABLE `ss13_admins` (
|
||||||
`ckey` VARCHAR(50) NOT NULL,
|
`ckey` VARCHAR(50) NOT NULL,
|
||||||
@@ -15,4 +15,4 @@ ALTER TABLE `ss13_player`
|
|||||||
DROP COLUMN `rank`,
|
DROP COLUMN `rank`,
|
||||||
DROP COLUMN `flags`;
|
DROP COLUMN `flags`;
|
||||||
|
|
||||||
DROP TABLE `ss13_admin_log`;
|
DROP TABLE `ss13_admin_log`;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
---
|
--
|
||||||
--- Adds the cargo logging tables
|
-- Adds the cargo logging tables
|
||||||
---
|
--
|
||||||
|
|
||||||
CREATE TABLE `ss13_cargo_orderlog` (
|
CREATE TABLE `ss13_cargo_orderlog` (
|
||||||
`id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
|
`id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
---
|
--
|
||||||
--- Puts autohiss in character setup
|
-- Puts autohiss in character setup
|
||||||
---
|
--
|
||||||
|
|
||||||
ALTER TABLE `ss13_characters`
|
ALTER TABLE `ss13_characters`
|
||||||
ADD COLUMN `autohiss` TINYINT NOT NULL DEFAULT 0 AFTER `accent`;
|
ADD COLUMN `autohiss` TINYINT NOT NULL DEFAULT 0 AFTER `accent`;
|
||||||
|
|||||||
@@ -11,6 +11,8 @@ var/list/robot_custom_icons
|
|||||||
return 1
|
return 1
|
||||||
|
|
||||||
/mob/living/silicon/robot/proc/set_custom_sprite()
|
/mob/living/silicon/robot/proc/set_custom_sprite()
|
||||||
|
if(!(name in robot_custom_icons))
|
||||||
|
return
|
||||||
var/datum/custom_synth/sprite = robot_custom_icons[name]
|
var/datum/custom_synth/sprite = robot_custom_icons[name]
|
||||||
if(istype(sprite) && sprite.synthckey == ckey)
|
if(istype(sprite) && sprite.synthckey == ckey)
|
||||||
custom_sprite = 1
|
custom_sprite = 1
|
||||||
@@ -21,4 +23,4 @@ var/list/robot_custom_icons
|
|||||||
icon_state = "[sprite.synthicon]-Standard"
|
icon_state = "[sprite.synthicon]-Standard"
|
||||||
else
|
else
|
||||||
to_chat(src, SPAN_WARNING("Could not locate [sprite.synthicon]-Standard sprite."))
|
to_chat(src, SPAN_WARNING("Could not locate [sprite.synthicon]-Standard sprite."))
|
||||||
icon = 'icons/mob/robots.dmi'
|
icon = 'icons/mob/robots.dmi'
|
||||||
|
|||||||
@@ -2,10 +2,9 @@
|
|||||||
|
|
||||||
# Server the MySQL database can be found at
|
# Server the MySQL database can be found at
|
||||||
# Examples: localhost, 200.135.5.43, www.mysqldb.com, etc.
|
# Examples: localhost, 200.135.5.43, www.mysqldb.com, etc.
|
||||||
ADDRESS mariadb
|
ADDRESS 127.0.0.1
|
||||||
|
|
||||||
# MySQL server port (default is 3306)
|
# MySQL server port (default is 3306)
|
||||||
PORT 3306
|
|
||||||
|
|
||||||
# Database the population, death, karma, etc. tables may be found in
|
# Database the population, death, karma, etc. tables may be found in
|
||||||
DATABASE game
|
DATABASE game
|
||||||
|
|||||||
@@ -28,6 +28,10 @@ else
|
|||||||
then
|
then
|
||||||
export DM='/usr/share/byond/bin/DreamMaker'
|
export DM='/usr/share/byond/bin/DreamMaker'
|
||||||
return 0
|
return 0
|
||||||
|
elif [[ -a "$HOME/BYOND/byond/bin/DreamMaker" ]]
|
||||||
|
then
|
||||||
|
export DM="$HOME/BYOND/byond/bin/DreamMaker"
|
||||||
|
return 0
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
21
tools/ci/install_byond.sh
Normal file
21
tools/ci/install_byond.sh
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
source .versions.sh
|
||||||
|
|
||||||
|
if [ -d "$HOME/BYOND/byond/bin" ] && grep -Fxq "${BYOND_MAJOR}.${BYOND_MINOR}" $HOME/BYOND/version.txt;
|
||||||
|
then
|
||||||
|
echo "Using cached directory."
|
||||||
|
else
|
||||||
|
echo "Setting up BYOND."
|
||||||
|
rm -rf "$HOME/BYOND"
|
||||||
|
mkdir -p "$HOME/BYOND"
|
||||||
|
cd "$HOME/BYOND"
|
||||||
|
curl "http://www.byond.com/download/build/${BYOND_MAJOR}/${BYOND_MAJOR}.${BYOND_MINOR}_byond_linux.zip" -o byond.zip
|
||||||
|
unzip byond.zip
|
||||||
|
rm byond.zip
|
||||||
|
cd byond
|
||||||
|
make here
|
||||||
|
echo "$BYOND_MAJOR.$BYOND_MINOR" > "$HOME/BYOND/version.txt"
|
||||||
|
cd ~/
|
||||||
|
fi
|
||||||
19
tools/ci/install_spaceman_dmm.sh
Normal file
19
tools/ci/install_spaceman_dmm.sh
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
source .versions.sh
|
||||||
|
|
||||||
|
if [ ! -f ~/$1 ]; then
|
||||||
|
mkdir -p "$HOME/SpacemanDMM"
|
||||||
|
CACHEFILE="$HOME/SpacemanDMM/$1"
|
||||||
|
|
||||||
|
if ! [ -f "$CACHEFILE.version" ] || ! grep -Fxq "$SPACEMAN_DMM_VERSION" "$CACHEFILE.version"; then
|
||||||
|
wget -O "$CACHEFILE" "https://github.com/SpaceManiac/SpacemanDMM/releases/download/$SPACEMAN_DMM_VERSION/$1"
|
||||||
|
chmod +x "$CACHEFILE"
|
||||||
|
echo "$SPACEMAN_DMM_VERSION" >"$CACHEFILE.version"
|
||||||
|
fi
|
||||||
|
|
||||||
|
ln -s "$CACHEFILE" ~/$1
|
||||||
|
fi
|
||||||
|
|
||||||
|
~/$1 --version
|
||||||
Reference in New Issue
Block a user