-
Notifications
You must be signed in to change notification settings - Fork 1
65 lines (56 loc) · 1.73 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
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: Install Packages
run: |
sudo apt update
sudo apt install -y build-essential autoconf automake bison libmysqlclient-dev libpcre3-dev libpq-dev libsqlite3-dev libssl-dev libtool libz-dev telnet libgtest-dev libjemalloc-dev
timeout-minutes: 5
- 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: Replace Absolute Path with Relative Path
uses: jacobtomlinson/gha-find-replace@v3
with:
find: "/home/mud/game/lib"
replace: "./lib"
include: "lib/secure/etc/nightmare-residuum.config"
- name: Disable external_port_2
uses: jacobtomlinson/gha-find-replace@v3
with:
find: "external_port_2"
replace: "# external_port_2"
include: "lib/secure/etc/nightmare-residuum.config"
- name: Run Tests
run: |
./build/bin/driver lib/secure/etc/nightmare-residuum.config -ftest
shell: bash
timeout-minutes: 1