From 4309fbf2f2ff8719343c4969262adb5f8e0dc87a Mon Sep 17 00:00:00 2001 From: Dan Paulat Date: Wed, 25 Jan 2023 00:12:13 -0600 Subject: [PATCH] Initial CI workflow --- .github/workflows/ci.yml | 71 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..a2acb72a --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,71 @@ +name: CI + +on: + workflow_dispatch: + push: + branches: + - 'master' + - 'develop' + - 'feature/**' + pull_request: + branches: + - 'master' + - 'develop' + +concurrency: + # Cancel in-progress jobs for the same pull request + group: ${{ github.head_ref || github.run_id }} + cancel-in-progress: true + +jobs: + build: + strategy: + matrix: + include: + - name: win64_msvc2022 + os: windows-2022 + build_type: Release + compiler: msvc + msvc_arch: x64 + msvc_toolset: 14.34 + msvc_version: 2022 + qt_version: 6.4.2 + qt_arch: win64_msvc2019_64 + qt_tools: '' + runs-on: ${{ matrix.os }} + + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + path: scwx + submodules: recursive + + - name: Install Qt + uses: jurplel/install-qt-action@v3 + with: + version: ${{ matrix.qt_version }} + arch: ${{ matrix.qt_arch }} + tools: ${{ matrix.qt_tools }} + + - name: Setup MSVC + if: matrix.compiler == 'msvc' + uses: ilammy/msvc-dev-cmd@v1 + with: + arch: ${{ matrix.msvc_arch }} + toolset: ${{ matrix.msvc_toolset }} + vsversion: ${{ matrix.msvc_version }} + + - name: Build Supercell Wx + run: | + mkdir build + cd build + cmake ../scwx/ \ + -G Ninja \ + -DCMAKE_BUILD_TYPE="${{ matrix.build_type }}" \ + -DCMAKE_INSTALL_PREFIX="../install" + ninja supercell-wx wxtest + + - name: Test Supercell Wx + working-directory: ${{ github.workspace }}/build + run: ctest -C ${{ matrix.build_type }}