-
Notifications
You must be signed in to change notification settings - Fork 1
55 lines (47 loc) · 1.37 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
name: Unit Tests on ubuntu
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build-and-test:
runs-on: ubuntu-20.04
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
submodules: true
- name: Install Packages
uses: awalsh128/cache-apt-pkgs-action@latest
with:
packages: build-essential autoconf automake bison telnet \
libmysqlclient-dev libpcre3-dev libpq-dev libsqlite3-dev \
libssl-dev libtool libz-dev libgtest-dev libjemalloc-dev
version: 1.0
- name: Cache Driver
uses: actions/cache@v4
id: cache
with:
path: build
key: ${{ hashFiles('**/driver/src') }}
- name: Build Driver
if: steps.cache.outputs.cache-hit != 'true'
run: ./build.sh
shell: bash
timeout-minutes: 10
- name: Modify Config for Local Test Run
run: |
# Replace absolute path with relative path
sed -i 's|/home/mud/game/lib|./lib|g' lib/secure/etc/nightmare-residuum.config
# Disable external_port_2
sed -i 's|^external_port_2|# external_port_2|' lib/secure/etc/nightmare-residuum.config
shell: bash
timeout-minutes: 1
- name: Run Tests
run: |
./build/bin/driver lib/secure/etc/nightmare-residuum.config -ftest
shell: bash
timeout-minutes: 1