From a6051c8870c47bf17f6d9dd1f9a888ac25478324 Mon Sep 17 00:00:00 2001 From: Jihadist Date: Sun, 29 Jan 2023 22:34:55 +0300 Subject: [PATCH] Add github ci --- .github/workflows/cmake.yml | 47 +++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 .github/workflows/cmake.yml diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml new file mode 100644 index 0000000..af0e930 --- /dev/null +++ b/.github/workflows/cmake.yml @@ -0,0 +1,47 @@ +name: CMake + +on: + push: + branches: + - master + - main + tags: + - "*" + pull_request: + +env: + # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) + BUILD_TYPE: Release + +jobs: + build-and-test: + + name: ${{ matrix.os }}-Qt-${{ matrix.qt_version }}-shared-${{ matrix.shared }} + runs-on: ${{ matrix.os }} + + + strategy: + fail-fast: false + matrix: + + os: [ubuntu-20.04, ubuntu-22.04, macos-11, macos-12, windows-2019, windows-2022] + qt_version: [5.12.12, 5.15.2, 6.4.0] + shared: [ON, OFF] + + steps: + - name: Checkout Code + uses: actions/checkout@v2 + + - name: Install Qt + uses: jurplel/install-qt-action@v3 + with: + version: ${{ matrix.qt_version }} + cache: 'true' + cache-key-prefix: ${{ runner.os }}-Qt-Cache-${{ matrix.qt_version }} + dir: ${{ github.workspace }}/Qt + + - name: Configure (${{ matrix.configuration }}) + run: cmake -DCMAKE_BUILD_TYPE="${{env.BUILD_TYPE}}" -DBUILD_SHARED_LIBS=${{ matrix.shared }} -B "${{github.workspace}}/build" -S "QtAwesome" + + - name: Build with ${{ matrix.compiler }} + run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}