Split actions according to platform. #2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Windows | |
on: | |
push: | |
branches: ["main", "devel"] | |
pull_request: | |
branches: ["main"] | |
env: | |
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) | |
BUILD_TYPE: Debug | |
jobs: | |
windows-msys2: | |
runs-on: windows-2022 | |
defaults: | |
run: | |
shell: msys2 {0} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: msys2/setup-msys2@v2 | |
with: | |
msystem: clang64 | |
release: true | |
install: mingw-w64-clang-x86_64-clang make unzip mingw-w64-clang-x86_64-cmake mingw-w64-clang-x86_64-boost mingw-w64-clang-x86_64-crypto++ libcurl mingw-w64-clang-x86_64-ninja mingw-w64-clang-x86_64-python | |
- name: Workspace Path Fixup | |
run: echo "WSPACE=$(cygpath '${{github.workspace}}')" >> $GITHUB_ENV | |
- name: Configure CMake | |
run: cmake -B ${{env.WSPACE}}/build/clang_${{env.BUILD_TYPE}} -G"Ninja" -DNUI_ENABLE_TESTS=on -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DNUI_BUILD_EXAMPLES=off -DCMAKE_CXX_EXTENSIONS=on -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang -DCMAKE_LINKER=lld -DCMAKE_CXX_STANDARD=20 | |
- name: Build | |
run: cmake --build ${{env.WSPACE}}/build/clang_${{env.BUILD_TYPE}} --config ${{env.BUILD_TYPE}} | |
- name: Test | |
working-directory: ${{github.workspace}}/build/clang_${{env.BUILD_TYPE}} | |
run: ./tests/nui-tests.exe |