diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test-linux.yml similarity index 87% rename from .github/workflows/build-test.yml rename to .github/workflows/build-test-linux.yml index 28e3f5d25..3d4ca6030 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test-linux.yml @@ -1,6 +1,10 @@ -name: CMake +name: Build and run tests on Linux -on: push +on: + push: + branches: [master] + pull_request: + workflow_dispatch: env: BUILD_TYPE: Release @@ -9,7 +13,7 @@ jobs: build: runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Install dependencies run: > diff --git a/.github/workflows/build-test-windows.yml b/.github/workflows/build-test-windows.yml new file mode 100644 index 000000000..318c5e1ca --- /dev/null +++ b/.github/workflows/build-test-windows.yml @@ -0,0 +1,32 @@ +name: Build and run tests on Windows + +on: + workflow_dispatch: + +jobs: + build: + runs-on: windows-2022 + steps: + - uses: actions/checkout@v4 + + - name: Install dependencies + run: |- + vcpkg install --triplet x64-windows ` + boost-algorithm boost-endian boost-format boost-functional boost-program-options ` + glm sdl2 glew openal-soft libmad ffmpeg wxwidgets gtest + + - name: Generate solution + run: |- + mkdir build + cmake -S . -B build ` + -G "Visual Studio 17 2022" -A x64 ` + -DCMAKE_BUILD_TYPE=Release ` + -DCMAKE_TOOLCHAIN_FILE=$VCPKG_INSTALLATION_ROOT\scripts\buildsystems\vcpkg.cmake + + - name: Build solution + working-directory: ${{github.workspace}}/build + run: cmake --build . + + - name: Run tests + working-directory: ${{github.workspace}}/build + run: ctest -V