1. Adds a `libdevilution_so` target when tests are enabled. 2. Each test file is now a separate binary target linked against `libdevilutionx_so` (can now run tests in parallel). 3. Tests are now defined in a separate `test/CMakeLists.txt` file. 4. Building the tests is now controlled by the standard `BUILD_TESTING` option (defined by CTest). 5. Tests are now built by default. 6. On CI, test errors are now reported. Also: * `.clang-format`: Enable SortIncludes in tests * `path_test.cpp`: Fix -Wsign-compare
41 lines
1.2 KiB
YAML
41 lines
1.2 KiB
YAML
name: Windows_x86
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
pull_request:
|
|
types: [ opened, synchronize ]
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-20.04
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Create Build Environment
|
|
run: >
|
|
sudo apt update &&
|
|
sudo apt install -y cmake gcc-mingw-w64-i686 g++-mingw-w64-i686 pkg-config-mingw-w64-i686 libz-mingw-w64-dev dpkg-dev wget git sudo smpq &&
|
|
sudo rm /usr/i686-w64-mingw32/lib/libz.dll.a &&
|
|
sudo Packaging/windows/mingw-prep.sh
|
|
|
|
- name: Configure CMake
|
|
shell: bash
|
|
working-directory: ${{github.workspace}}
|
|
run: cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_TESTING=OFF -DCPACK=ON -DCMAKE_TOOLCHAIN_FILE=../CMake/platforms/mingwcc.toolchain.cmake -DDEVILUTIONX_SYSTEM_BZIP2=OFF -DDEVILUTIONX_STATIC_LIBSODIUM=ON -DDISCORD_INTEGRATION=ON
|
|
|
|
- name: Build
|
|
working-directory: ${{github.workspace}}
|
|
shell: bash
|
|
run: cmake --build build -j $(nproc) --target package
|
|
|
|
- name: Upload-Package
|
|
if: ${{ !env.ACT }}
|
|
uses: actions/upload-artifact@v2
|
|
with:
|
|
name: devilutionx_x86.zip
|
|
path: build/devilutionx.zip
|