forked from cmss13-devs/cmss13
-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (45 loc) · 1.43 KB
/
run_unit_tests.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
# This is a reusable workflow to run unit tests on a single map.
# This is run for every single map in ci_suite.yml. You might want to edit that instead.
name: Run Unit Tests
on:
workflow_call:
inputs:
map:
required: true
type: string
major:
required: false
type: string
minor:
required: false
type: string
jobs:
run_unit_tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Restore BYOND cache
uses: actions/cache@v3
with:
path: ~/BYOND
key: ${{ runner.os }}-byond-${{ secrets.CACHE_PURGE_KEY }}
- name: Install rust-g
run: |
sudo dpkg --add-architecture i386
sudo apt update || true
sudo apt install -o APT::Immediate-Configure=false zlib1g-dev:i386 libssl-dev:i386
bash tools/ci/install_rust_g.sh
- name: Configure version
run: |
echo "BYOND_MAJOR=${{ inputs.major }}" >> $GITHUB_ENV
echo "BYOND_MINOR=${{ inputs.minor }}" >> $GITHUB_ENV
if: ${{ inputs.major }}
- name: Compile Tests
run: |
bash tools/ci/install_byond.sh
source $HOME/BYOND/byond/bin/byondsetup
tools/build/build --ci dm -DCIBUILDING -DANSICOLORS -Werror
- name: Run Tests
run: |
source $HOME/BYOND/byond/bin/byondsetup
bash tools/ci/run_server.sh ${{ inputs.map }}