mirror of
https://github.com/nillerusr/source-engine.git
synced 2025-02-06 12:14:17 +00:00
88 lines
2.3 KiB
YAML
88 lines
2.3 KiB
YAML
name: Tests
|
|
|
|
on: [push, pull_request]
|
|
env:
|
|
WAF_FLAGS: -T release --no-warns --prefix=build_tests -lt --sanitize=address,undefined
|
|
|
|
jobs:
|
|
tests-linux:
|
|
strategy:
|
|
matrix:
|
|
os: [ubuntu-latest, ubuntu-20.04]
|
|
bits: ['', '--64bits']
|
|
android: ['']
|
|
runs-on: ${{ matrix.os }}
|
|
env:
|
|
DEPS: libbz2-dev
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
with:
|
|
submodules: recursive
|
|
|
|
- name: Install common dependencies
|
|
run: sudo apt-get update && sudo apt-get install -y g++-multilib gcc-multilib
|
|
- name: Install 32bit dependencies
|
|
if: ${{ matrix.bits == '' && !matrix.android }}
|
|
run: |
|
|
sudo dpkg --add-architecture i386
|
|
sudo apt-get update
|
|
sudo apt-get install aptitude
|
|
sudo aptitude install -y $(echo $DEPS | sed -r 's/[a-z0-9_\-]+/&:i386/g')
|
|
- name: Install 64bit dependencies
|
|
if: ${{ matrix.bits != '' }}
|
|
run: |
|
|
sudo apt-get install -y $DEPS
|
|
|
|
- if: ${{ matrix.bits == '' && !matrix.android }}
|
|
name: Set PKG_CONFIG_PATH
|
|
run: echo "PKG_CONFIG_PATH=/usr/lib/i386-linux-gnu/pkgconfig" >> $GITHUB_ENV
|
|
|
|
- name: Configure
|
|
run: ./waf configure ${{ matrix.bits }} $WAF_FLAGS
|
|
- name: Build ${{ matrix.os }}
|
|
run: ./waf install
|
|
- name: Run tests
|
|
run: |
|
|
cd build_tests
|
|
LD_LIBRARY_PATH=bin/ ./unittest
|
|
|
|
tests-macos:
|
|
runs-on: macos-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
with:
|
|
submodules: recursive
|
|
|
|
- name: Configure
|
|
run: ./waf configure --64bits $WAF_FLAGS
|
|
- name: Build macos-amd64
|
|
run: ./waf install
|
|
- name: Run tests
|
|
run: |
|
|
cd build_tests
|
|
DYLD_LIBRARY_PATH=bin/ ./unittest
|
|
|
|
tests-windows:
|
|
strategy:
|
|
matrix:
|
|
os: [windows-2019]
|
|
bits: ['', '--64bits']
|
|
runs-on: ${{ matrix.os }}
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
with:
|
|
submodules: recursive
|
|
|
|
- name: Configure
|
|
run: ./waf configure ${{ matrix.bits }} ${{ env.WAF_FLAGS }}
|
|
|
|
- name: Build ${{ matrix.os }}
|
|
run: ./waf install
|
|
- name: Run tests
|
|
run: |
|
|
cd build_tests
|
|
$env:Path = "bin";
|
|
./unittest.exe
|
|
|