forked from GeneralPantsuIsBadAtCoding/Azure-Peak
-
Notifications
You must be signed in to change notification settings - Fork 0
87 lines (81 loc) · 2.68 KB
/
ci_suite.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
name: BYOND Build
on:
push:
branches:
- main
pull_request:
branches:
- main
env:
BYOND_MAJOR: 515
BYOND_MINOR: 1636
SPACEMAN_DMM_VERSION: suite-1.9
jobs:
run-linters:
if: ( !contains(github.event.head_commit.message, '[ci skip]') )
name: Run Linters
runs-on: ubuntu-22.04
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup cache
uses: actions/cache@v4
with:
path: ~/SpacemanDMM
key: ${{ runner.os }}-spacemandmm-${{ hashFiles('dependencies.sh') }}
restore-keys: |
${{ runner.os }}-spacemandmm-
- name: Restore Rust cache
uses: actions/cache@v4
with:
path: ~/.cargo
key: ${{ runner.os }}-rust-${{ hashFiles('tools/ci/ci_dependencies.sh')}}
restore-keys: |
${{ runner.os }}-rust-
- name: Install Tools
run: |
pip3 install setuptools
bash tools/ci/install_spaceman_dmm.sh dreamchecker
bash tools/ci/install_ripgrep.sh
tools/bootstrap/python -c ''
- name: Run Linters
run: |
bash tools/ci/check_filedirs.sh roguetown.dme
bash tools/ci/check_changelogs.sh
find . -name "*.php" -print0 | xargs -0 -n1 php -l
# bash tools/ci/check_grep.sh # TODO: fix indentation etc
# tools/bootstrap/python tools/ci/validate_dme.py < roguetown.dme # TODO: fix unincluded files
tools/bootstrap/python -m dmi.test
tools/bootstrap/python -m mapmerge2.dmm_test
~/dreamchecker > ${GITHUB_WORKSPACE}/output-annotations.txt 2>&1
- name: Annotate Lints
uses: yogstation13/DreamAnnotate@v2
if: always()
with:
outputFile: output-annotations.txt
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Install BYOND
run: |
sudo apt-get update -qq
sudo apt-get install -y make gcc unzip
wget http://www.byond.com/download/build/${{ env.BYOND_MAJOR }}/${{ env.BYOND_MAJOR }}.${{ env.BYOND_MINOR }}_byond_linux.zip
unzip ${BYOND_MAJOR}.${BYOND_MINOR}_byond_linux.zip
bash tools/ci/install_byond.sh
- name: Compile BYOND project
run: |
ls -h $HOME/
source $HOME/BYOND/byond/bin/byondsetup
DreamMaker roguetown.dme
- name: Check for errors
id: check-errors
run: |
if grep -q "error" *.log; then
echo "::error ::Compilation failed with errors."
exit 1
else
echo "Compilation succeeded without critical errors."
fi