Revert "chore: update ci actions" #144
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: build | |
on: | |
push: | |
branches: | |
- "main" | |
- "feature/**" | |
- "bugfix/**" | |
paths-ignore: | |
- "README.md" | |
- "README-zh.md" | |
- "LICENSE" | |
pull_request: | |
branches: | |
- "main" | |
- "feature/**" | |
- "bugfix/**" | |
paths-ignore: | |
- "README.md" | |
- "README-zh.md" | |
- "LICENSE" | |
jobs: | |
linux-build: | |
runs-on: ubuntu-latest | |
strategy: | |
# Set fail-fast to false to ensure that feedback is delivered for all matrix combinations. | |
# Consider changing this to true when your workflow is stable. | |
fail-fast: false | |
steps: | |
- name: Checkout Source code | |
uses: actions/checkout@v4 | |
# with: | |
# submodules: true | |
- name: Install Qt | |
uses: jurplel/install-qt-action@v4 | |
with: | |
cache: true | |
cache-key-prefix: 'Qt' | |
version: '6.7.0' | |
- name: Configure CMake | |
# Configure CMake in a 'build' subdirectory. | |
# `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make. | |
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type | |
run: > | |
cmake -B ${{github.workspace}}/build -DBUILD_TEST=ON | |
- name: Build | |
# Build your program with the given configuration. | |
# Note that --config is needed because the default Windows generator is a multi-config generator (Visual Studio generator). | |
run: cmake --build ${{github.workspace}}/build | |
- name: Test | |
working-directory: ${{github.workspace}}/build | |
# Execute tests defined by the CMake configuration. | |
# Note that --build-config is needed because the default Windows generator is a multi-config generator (Visual Studio generator). | |
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail | |
run: ctest | |
windows-build: | |
runs-on: windows-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
qt_version: [6.7.0] | |
build_type: [Release] | |
steps: | |
- uses: actions/checkout@v4 | |
# with: | |
# submodules: true | |
- name: Install Qt | |
uses: jurplel/install-qt-action@v4 | |
with: | |
version: ${{ matrix.qt_version }} | |
cache: true | |
cache-key-prefix: 'Qt' | |
- name: Configure CMake | |
# Configure CMake in a 'build' subdirectory. | |
# `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make. | |
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type | |
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} | |
- name: Build | |
# Build your program with the given configuration. | |
# Note that --config is needed because the default Windows generator is a multi-config generator (Visual Studio generator). | |
run: cmake --build ${{github.workspace}}/build --config ${{ matrix.build_type }} | |
- name: Test | |
working-directory: ${{github.workspace}}/build | |
# Execute tests defined by the CMake configuration. | |
# Note that --build-config is needed because the default Windows generator is a multi-config generator (Visual Studio generator). | |
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail | |
run: ctest --build-config ${{ matrix.build_type }} | |
macos-build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
# macos-latest M1 arm architecture. macos-13 intel architecture | |
os: [macos-latest, macos-13] | |
qt_version: [5.15.2, 6.7.0] | |
include: | |
- os: macos-latest | |
qt_version: 6.7.0 | |
- os: macos-13 | |
qt_version: 5.15.2 | |
exclude: | |
- os: macos-latest | |
qt_version: 5.15.2 | |
- os: macos-13 | |
qt_version: 6.7.0 | |
steps: | |
- uses: actions/checkout@v4 | |
# with: | |
# submodules: true | |
- name: Install Qt | |
uses: jurplel/install-qt-action@v4 | |
with: | |
version: ${{ matrix.qt_version }} | |
cache: true | |
cache-key-prefix: 'Qt' | |
- name: Configure CMake | |
run: cmake -B ${{github.workspace}}/build | |
- name: Build | |
run: cmake --build ${{github.workspace}}/build | |
- name: Test | |
working-directory: ${{github.workspace}}/build | |
run: ctest |