From 501326d95dcae835750176bff8f03383d5a47891 Mon Sep 17 00:00:00 2001 From: mrdcvlsc Date: Thu, 30 May 2024 22:07:46 +0800 Subject: [PATCH] remove architecture in ci matrix and fix gcc & clang cmake test build * removed architecture in CI since it's not working * fix ctests.yml for windows-clang and windows-gcc where previously it uses msvc compiler even though gcc and clang was specified in cmake variables --- .github/workflows/ctests.yml | 28 ++++++++++++---------------- .github/workflows/tests.yml | 2 -- 2 files changed, 12 insertions(+), 18 deletions(-) diff --git a/.github/workflows/ctests.yml b/.github/workflows/ctests.yml index 32e3798..7229af4 100644 --- a/.github/workflows/ctests.yml +++ b/.github/workflows/ctests.yml @@ -2,43 +2,39 @@ name: ctests on: push: - branches: [ main, ctest-fix ] + branches: [ main ] pull_request: branches: [ main ] jobs: build-others: - name: ${{ matrix.platform.name }} C++${{matrix.config.cxx_version}} ${{matrix.architecture}} + name: ${{ matrix.platform.name }} C++${{matrix.config.cxx_version}} runs-on: ${{ matrix.platform.os }} strategy: fail-fast: false matrix: platform: - - { name: Windows VS2019, ls: dir, os: windows-2019, flags: -DCMAKE_BUILD_TYPE=Debug } - - { name: Windows VS2022, ls: dir, os: windows-2022, flags: -DCMAKE_BUILD_TYPE=Debug } - - { name: Windows Clang, ls: dir, os: windows-2022, flags: -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ } - - { name: Windows GCC, ls: dir, os: windows-2022, flags: -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ } - - { name: Linux Clang, ls: ls, os: ubuntu-latest, flags: -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ } - - { name: Linux GCC, ls: ls, os: ubuntu-latest, flags: -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ } - - { name: MacOS XCode, ls: ls, os: macos-latest, flags: -DCMAKE_BUILD_TYPE=Debug } - - { name: MacOS Clang, ls: ls, os: macos-latest, flags: -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ } + - { name: Windows VS2019, os: windows-2019, flags: -DCMAKE_BUILD_TYPE=Debug } + - { name: Windows VS2022, os: windows-2022, flags: -DCMAKE_BUILD_TYPE=Debug } + - { name: Windows Clang, os: windows-latest, flags: -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ } + - { name: Windows GCC, os: windows-latest, flags: -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ } + - { name: Linux Clang, os: ubuntu-latest, flags: -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ } + - { name: Linux GCC, os: ubuntu-latest, flags: -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ } + - { name: MacOS XCode, os: macos-latest, flags: -DCMAKE_BUILD_TYPE=Debug } + - { name: MacOS Clang, os: macos-latest, flags: -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ } config: - { cxx_version: 20 } - { cxx_version: 23 } - architecture: [x64, x86] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - - name: System Info + - name: Config run: cmake -S tests -B tests ${{matrix.platform.flags}} -DCMAKE_CXX_STANDARD=${{matrix.config.cxx_version}} - name: Build run: cmake --build tests --config Debug - - name: View Test Executables - run: cd tests && ${{matrix.platform.ls}} && cd .. - - name: Tests run: ctest --test-dir tests --build-config Debug --output-on-failure diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index de89b78..a84884e 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -3,8 +3,6 @@ name: tests on: push: branches: [ main ] - pull_request: - branches: [ main ] jobs: aarch64-gcc: