-
Notifications
You must be signed in to change notification settings - Fork 61
135 lines (126 loc) · 3.75 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
132
133
134
135
name: CI
on:
pull_request:
branches:
- master
env:
BASENAME: "vorestation"
jobs:
file_tests:
name: Run Linters
runs-on: ubuntu-22.04 # YW EDIT: 20.04 to 22.04
steps:
- uses: actions/checkout@v4
- name: Ensure +x on CI directory
run: |
chmod -R +x ./tools/ci
- name: Install Tools
run: |
bash tools/ci/install_build_deps.sh
- name: Restore Yarn cache
if: "${{ contains(github.event.pull_request.labels.*.name, 'Type: TGUI Bundle') }}"
uses: actions/cache@v4
with:
path: tgui/.yarn/cache
key: ${{ runner.os }}-yarn-${{ secrets.CACHE_PURGE_KEY }}-${{ hashFiles('tgui/yarn.lock') }}
restore-keys: |
${{ runner.os }}-build-${{ secrets.CACHE_PURGE_KEY }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Run Tests
run: |
tools/ci/validate_files.sh
tools/ci/build_tgui.sh
dreamchecker:
name: DreamChecker
runs-on: ubuntu-22.04 # YW EDIT: 20.04 to 22.04
steps:
- uses: actions/checkout@v4
- name: Cache SpacemanDMM
uses: actions/cache@v4
with:
path: ~/SpacemanDMM
key: ${{ runner.os }}-dreamchecker-${{ hashFiles('dependencies.sh')}}
restore-keys: ${{ runner.os }}-dreamchecker
- name: Install Dependencies
run: |
tools/ci/install_spaceman_dmm.sh dreamchecker
- name: Run Linter
id: linter
run: |
~/dreamchecker > ${GITHUB_WORKSPACE}/output-annotations.txt 2>&1
- name: Annotate Linter
uses: yogstation13/DreamAnnotate@v2
if: always()
with:
outputFile: output-annotations.txt
unit_tests:
# YW EDIT start
#strategy:
# matrix:
# map: ['tether', 'stellar_delight', 'groundbase']
# name: Integration Tests (${{ matrix.map }})
# YW EDIT: end
name: Integration Tests
# needs: ['file_tests', 'dreamchecker']
runs-on: ubuntu-22.04 # YW EDIT: 20.04 to 22.04
steps:
- uses: actions/checkout@v4
- name: Ensure +x on CI directory
run: |
chmod -R +x ./tools/ci
- name: Setup Cache
uses: actions/cache@v4
with:
path: $HOME/BYOND
key: ${{ runner.os }}-byond
- name: Install RUST_G Dependencies
run: |
sudo dpkg --add-architecture i386
sudo apt update || true
sudo apt install zlib1g-dev:i386 libssl-dev:i386
ldd librust_g.so
- name: Unit Tests
run: |
tools/ci/install_byond.sh
tools/ci/compile_and_run.sh
env:
TEST_DEFINE: "UNIT_TEST"
TEST_FILE: "code/_unit_tests.dm"
# YW EDIT: start
#MAP: ${{ matrix.map }}
#REPLACE: true
# YW EDIT: end
RUN: "1"
- name: Compile POIs
run: |
tools/ci/install_byond.sh
tools/ci/compile_and_run.sh
env:
TEST_DEFINE: "MAP_TEST"
TEST_FILE: "code/_map_tests.dm"
# YW EDIT: start
#MAP: ${{ matrix.map }}
#REPLACE: false
# YW EDIT: end
RUN: "0"
- name: Compile away missions
run: |
tools/ci/install_byond.sh
tools/ci/compile_and_run.sh
env:
TEST_DEFINE: "AWAY_MISSION_TEST"
TEST_FILE: "code/_away_mission_tests.dm"
# YW EDIT: start
#MAP: ${{ matrix.map }}
#REPLACE: false
# YW EDIT: end
RUN: "0"
tests_successful:
name: Integration Tests
needs: ['file_tests', 'dreamchecker', 'unit_tests']
runs-on: ubuntu-22.04 # YW EDIT: 20.04 to 22.04
steps:
- name: Report Success
run: |
echo "Jobs Successful!"