From 9edb519416dc64cb66dc66e48d950aa303d1d3c0 Mon Sep 17 00:00:00 2001 From: fintarin Date: Fri, 5 Apr 2024 12:33:50 +0400 Subject: [PATCH] Debug variants in build workflow --- .github/workflows/build.yml | 129 ++++++++++++++++++++++++++++++++---- 1 file changed, 115 insertions(+), 14 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 87f579e3f..c38020424 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -10,9 +10,6 @@ defaults: run: shell: bash -env: - BUILD_TYPE: Release - jobs: build: name: Build @@ -21,20 +18,124 @@ jobs: strategy: matrix: config: - - { name: Ubuntu GCC, os: ubuntu-latest, cc: gcc, cxx: g++ } - - { name: Ubuntu Clang, os: ubuntu-latest, cc: clang, cxx: clang++ } - # TODO: remove version specifiers after macOS-latest upgrades to version 13 - - { name: macOS GCC, os: macOS-13, cc: gcc, cxx: g++ } - - { name: macOS Clang, os: macOS-13, cc: clang, cxx: clang++ } - - { name: Windows GCC, os: windows-latest, cc: gcc, cxx: g++ } - - { name: Windows Clang, os: windows-latest, cc: clang, cxx: clang++ } - - { name: Windows MSVC, os: windows-latest, cc: msvc, cxx: msvc } + - { + name: Ubuntu GCC Release, + os: ubuntu-latest, + cc: gcc, + cxx: g++, + build-type: Release, + shared: ON, + } + - { + name: Ubuntu GCC Debug, + os: ubuntu-latest, + cc: gcc, + cxx: g++, + build-type: Debug, + shared: OFF, + } + - { + name: Ubuntu Clang Release, + os: ubuntu-latest, + cc: clang, + cxx: clang++, + build-type: Release, + shared: ON, + } + - { + name: Ubuntu Clang Debug, + os: ubuntu-latest, + cc: clang, + cxx: clang++, + build-type: Debug, + shared: OFF, + } + - { + name: macOS GCC Release, + os: macos-latest, + cc: gcc, + cxx: g++, + build-type: Release, + shared: ON, + } + - { + name: macOS GCC Debug, + os: macos-latest, + cc: gcc, + cxx: g++, + build-type: Debug, + shared: OFF, + } + - { + name: macOS Clang Release, + os: macos-latest, + cc: clang, + cxx: clang++, + build-type: Release, + shared: ON, + } + - { + name: macOS Clang Debug, + os: macos-latest, + cc: clang, + cxx: clang++, + build-type: Debug, + shared: OFF, + } + - { + name: Windows GCC Release, + os: windows-latest, + cc: gcc, + cxx: g++, + build-type: Release, + shared: ON, + } + - { + name: Windows GCC Debug, + os: windows-latest, + cc: gcc, + cxx: g++, + build-type: Debug, + shared: OFF, + } + - { + name: Windows Clang Release, + os: windows-latest, + cc: clang, + cxx: clang++, + build-type: Release, + shared: ON, + } + - { + name: Windows Clang Debug, + os: windows-latest, + cc: clang, + cxx: clang++, + build-type: Debug, + shared: OFF, + } + - { + name: Windows MSVC Release, + os: windows-latest, + cc: msvc, + cxx: msvc, + build-type: Release, + shared: ON, + } + - { + name: Windows MSVC Debug, + os: windows-latest, + cc: msvc, + cxx: msvc, + build-type: Debug, + shared: OFF, + } steps: - name: Checkout uses: actions/checkout@v3 with: - submodules: 'true' + submodules: "true" # TODO: remove this step after the default Clang is updated to version 16 - name: Install LLVM and Clang @@ -51,14 +152,14 @@ jobs: sudo apt-get install libgmp-dev libmpfr-dev - name: Install GMP and MPFR on macOS - if: matrix.config.os == 'macOS-13' # TODO: macOS-latest + if: matrix.config.os == 'macos-latest' run: | brew update brew install gmp mpfr - name: Configure CMake working-directory: ${{github.workspace}} - run: cmake -Bbuild -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -Dfintamath_build_tests=ON -Dfintamath_build_shared=ON -Dfintamath_warnings_as_errors=ON + run: cmake -Bbuild -DCMAKE_BUILD_TYPE=${{matrix.config.build-type}} -Dfintamath_build_shared=${{matrix.config.shared}} -Dfintamath_build_tests=ON -Dfintamath_warnings_as_errors=ON env: CC: ${{matrix.config.cc}} CXX: ${{matrix.config.cxx}}