forked from ParadiseSS13/Paradise
-
Notifications
You must be signed in to change notification settings - Fork 0
131 lines (126 loc) · 3.83 KB
/
ci.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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
name: CI
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
run_linters:
name: Run Linters
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- name: Setup Cache
uses: actions/cache@v3
with:
path: $HOME/SpacemanDMM
key: ${{ runner.os }}-spacemandmm
- name: Install Tools
run: |
bash tools/ci/install_build_deps.sh
bash tools/ci/install_dreamchecker.sh
- uses: actions/setup-python@v4
with:
python-version: '3.10'
cache: 'pip'
- run: pip install -r tools/requirements.txt
- name: Run Linters
run: |
tools/ci/check_json.sh
tools/ci/build_tgui.sh
python tools/ci/check_grep2.py
python tools/ci/check_line_endings.py
python tools/ci/check_file_names.py
python tools/ci/unticked_files.py ${GITHUB_WORKSPACE}
python tools/ci/illegal_dme_files.py ${GITHUB_WORKSPACE}
python -m tools.maplint.source --github
~/dreamchecker > ${GITHUB_WORKSPACE}/output-annotations.txt 2>&1
- name: Annotate Lints
uses: yogstation13/DreamAnnotate@v2
if: always()
with:
outputFile: output-annotations.txt
odlint:
name: Lint with OpenDream
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- name: Setup OD
run: |
bash tools/ci/setup_od.sh
- name: Run OD
run: |
bash tools/ci/run_od.sh
compile_all_maps:
name: Compile All Maps
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- name: Setup Cache
uses: actions/cache@v3
with:
path: $HOME/BYOND
key: ${{ runner.os }}-byond
- name: Compile All Maps
run: |
tools/ci/install_byond.sh
source $HOME/BYOND/byond/bin/byondsetup
tools/ci/generate_maplist.sh
tools/ci/dm.sh -DCIMAP paradise.dme
unit_tests_and_sql:
name: Unit Tests + SQL Validation
runs-on: ubuntu-20.04
strategy:
fail-fast: false # Let all map tests run to completion
matrix:
maptype: ['/datum/map/cyberiad', '/datum/map/delta', '/datum/map/metastation', '/datum/map/cerestation']
byondtype: ['STABLE', 'BETA']
services:
mariadb:
image: mariadb:latest
env:
MYSQL_ROOT_PASSWORD: root
ports:
- 3306
options: --health-cmd "mariadb-admin ping" --health-interval 10s --health-timeout 5s --health-retries 10
steps:
- uses: actions/checkout@v4
- name: Setup Cache
uses: actions/cache@v3
with:
path: $HOME/BYOND
key: ${{ runner.os }}-byond
- name: Setup & Validate DB
run: |
sudo systemctl start mysql
python3 tools/ci/generate_sql_scripts.py
tools/ci/validate_sql.sh
- name: Install RUST_G Deps
run: |
sudo dpkg --add-architecture i386
sudo apt update || true
sudo apt install libssl1.1:i386
ldd librust_g.so
- name: Start Redis
uses: supercharge/[email protected]
with:
redis-version: 6
- name: Compile & Run Unit Tests
run: |
tools/ci/install_byond.sh '${{ matrix.byondtype }}'
source $HOME/BYOND/byond/bin/byondsetup
tools/ci/dm.sh -DCIBUILDING paradise.dme
echo '${{ matrix.maptype }}' > data/next_map.txt
tools/ci/run_server.sh
windows_dll_tests:
name: Windows RUSTG Validation
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: '3.8.2' # Script was made for 3.8.2
architecture: 'x86' # This MUST be x86
- run: python tools/ci/validate_rustg_windows.py