88 lines
2.3 KiB
YAML
Raw Normal View History

2022-08-17 11:22:05 +03:00
name: Tests
2022-12-16 19:47:53 +03:00
on: [push, pull_request]
2023-05-14 11:49:14 +03:00
env:
WAF_FLAGS: -T release --no-warns --prefix=build_tests -lt --sanitize=address,undefined
2022-08-17 11:22:05 +03:00
jobs:
2023-05-14 11:49:14 +03:00
tests-linux:
strategy:
matrix:
os: [ubuntu-latest, ubuntu-20.04]
bits: ['', '--64bits']
android: ['']
runs-on: ${{ matrix.os }}
env:
DEPS: libbz2-dev
2022-08-17 11:22:05 +03:00
steps:
2023-05-14 11:49:14 +03:00
- uses: actions/checkout@v3
with:
submodules: recursive
2022-08-17 11:22:05 +03:00
2023-05-14 11:49:14 +03:00
- 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
2022-08-17 11:22:05 +03:00
2023-05-14 11:49:14 +03:00
- 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
2022-08-17 11:22:05 +03:00
2023-05-14 11:49:14 +03:00
tests-macos:
runs-on: macos-latest
steps:
2023-05-14 11:49:14 +03:00
- uses: actions/checkout@v3
with:
submodules: recursive
2023-05-14 11:49:14 +03:00
- 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
2022-08-17 11:22:05 +03:00
2023-05-14 11:49:14 +03:00
tests-windows:
strategy:
matrix:
os: [windows-2019]
bits: ['', '--64bits']
runs-on: ${{ matrix.os }}
2022-08-17 11:22:05 +03:00
steps:
2023-05-14 11:49:14 +03:00
- 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