ci: use ninja, try fix ci

Signed-off-by: Yuhang Zhao <2546789017@qq.com>
This commit is contained in:
Yuhang Zhao 2022-10-18 10:28:01 +08:00
parent fe81fb80bd
commit 5ec3eaf88e
1 changed files with 8 additions and 10 deletions

View File

@ -25,19 +25,12 @@ jobs:
- platform: windows-latest - platform: windows-latest
CC: cl CC: cl
CXX: cl CXX: cl
make: nmake
- platform: ubuntu-latest - platform: ubuntu-latest
CC: gcc CC: gcc
CXX: g++ CXX: g++
make: make
- platform: macos-latest - platform: macos-latest
CC: clang CC: clang
CXX: clang++ CXX: clang++
make: make
- build-type: Debug
build_type_flag: -DCMAKE_BUILD_TYPE=Debug
- build-type: Release
build_type_flag: -DCMAKE_BUILD_TYPE=Release
- library-type: shared - library-type: shared
lib_type_flag: -DFRAMELESSHELPER_BUILD_STATIC=OFF lib_type_flag: -DFRAMELESSHELPER_BUILD_STATIC=OFF
- library-type: static - library-type: static
@ -55,6 +48,11 @@ jobs:
version: ${{ matrix.qt-version }} version: ${{ matrix.qt-version }}
cache: true cache: true
- name: Set up Ninja
uses: seanmiddleditch/gha-setup-ninja@v3
with:
version: 1.11.1 # Current latest version.
- name: Set up MSVC environment - name: Set up MSVC environment
if: ${{ matrix.platform == 'windows-latest' }} if: ${{ matrix.platform == 'windows-latest' }}
uses: ilammy/msvc-dev-cmd@v1 uses: ilammy/msvc-dev-cmd@v1
@ -68,6 +66,6 @@ jobs:
run: | run: |
mkdir ci-test-build mkdir ci-test-build
cd ci-test-build cd ci-test-build
cmake -DCMAKE_C_COMPILER=${{ matrix.CC }} -DCMAKE_CXX_COMPILER=${{ matrix.CXX }} -DCMAKE_INSTALL_PREFIX=../ci-test-install -DFRAMELESSHELPER_EXAMPLES_DEPLOYQT=OFF ${{ matrix.build_type_flag }} ${{ matrix.lib_type_flag }} .. cmake -DCMAKE_C_COMPILER=${{ matrix.CC }} -DCMAKE_CXX_COMPILER=${{ matrix.CXX }} -DCMAKE_INSTALL_PREFIX=../ci-test-install -DCMAKE_BUILD_TYPE=${{ matrix.build-type }} -DFRAMELESSHELPER_EXAMPLES_DEPLOYQT=OFF ${{ matrix.lib_type_flag }} -GNinja ..
cmake --build . cmake --build . --target all --config ${{ matrix.build-type }} --parallel
cmake --install . cmake --install . --config ${{ matrix.build-type }}