source-engine/.github/workflows/tests.yml
tupoy-ya dba14e2dc1 fix(CI): replace --64bits with --32bits
fix(Build): Add missing mapbase functions.
2024-12-30 20:40:24 +05:00

82 lines
2.2 KiB
YAML

name: Tests
on: [push, pull_request]
env:
WAF_FLAGS: -T release --disable-warns --prefix=build_tests --tests --sanitize=address,undefined
jobs:
tests-linux:
strategy:
matrix:
os: [ubuntu-latest, ubuntu-20.04]
bits: ['', '--32bits']
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')
echo "PKG_CONFIG_PATH=/usr/lib/i386-linux-gnu/pkgconfig" >> $GITHUB_ENV
- name: Install 64bit dependencies
if: ${{ matrix.bits != '' }}
run: |
sudo apt-get install -y $DEPS
- 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 $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: ['', '--32bits']
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