Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding CMake Presets #1536

Open
wants to merge 18 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .github/workflows/intel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ jobs:
fail-fast: false
matrix:
config:
- {compiler: "dpcpp", build_type: "Release", name: "intel/dpcpp/release/shared", mixed: "ON"}
- {compiler: "icpx", build_type: "Release", name: "intel/icpx/release/shared", mixed: "OFF"}
name: ${{ matrix.config.name }}
- { preset: "ci/sycl/dpcpp/nompi/release/singlemode" }
- { preset: "ci/sycl/icpx/nompi/release/singlemode/nomixed" }
name: ${{ matrix.config.preset }}
runs-on: [gpu_intel]

steps:
Expand All @@ -36,8 +36,8 @@ jobs:
module load intel-oneapi-compilers intel-oneapi-dpl intel-oneapi-mkl intel-oneapi-tbb cmake
mkdir build
cd build
cmake .. -DCMAKE_INSTALL_PREFIX=install_ginkgo -DCMAKE_CXX_FLAGS="-Wpedantic -ffp-model=precise" -DCMAKE_CXX_COMPILER=${{ matrix.config.compiler }} -DCMAKE_BUILD_TYPE=${{ matrix.config.build_type }} -DGINKGO_MIXED_PRECISION=${{ matrix.config.mixed }} -DGINKGO_BUILD_CUDA=OFF -DGINKGO_BUILD_HIP=OFF -DGINKGO_BUILD_MPI=OFF -DGINKGO_DPCPP_SINGLE_MODE=ON
make -j8
cmake -S .. -B . --preset ${{ matrix.config.preset }} -DCMAKE_INSTALL_PREFIX=install_ginkgo
cmake --build . -j8
ONEAPI_DEVICE_SELECTOR=level_zero:gpu ctest -j10 --output-on-failure

- name: install
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/osx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ jobs:
fail-fast: false
matrix:
config:
- {shared: "ON", build_type: "Debug", name: "omp/debug/shared", "mixed": "OFF"}
- {shared: "OFF", build_type: "Release", name: "omp/release/static", "mixed": "ON"}
name: ${{ matrix.config.name }}
- { preset: "ci/omp/clang/nompi/debug/nomixed" }
- { preset: "ci/omp/clang/nompi/release/static" }
name: ${{ matrix.config.preset }}
runs-on: [macos-latest]

steps:
Expand All @@ -42,7 +42,7 @@ jobs:

- name: info
run: |
g++ -v
clang++ -v
cmake --version

- name: Debug over SSH (tmate)
Expand All @@ -55,12 +55,12 @@ jobs:
mkdir install
export INSTALL_PREFIX=`pwd`/install
cd build
cmake .. -DCMAKE_PREFIX_PATH=/opt/homebrew/opt/libomp/ -DCMAKE_CXX_FLAGS=-Wpedantic -DBUILD_SHARED_LIBS=${{ matrix.config.shared }} -DCMAKE_INSTALL_PREFIX=${INSTALL_PREFIX} -DCMAKE_BUILD_TYPE=${{ matrix.config.build_type }} -DGINKGO_MIXED_PRECISION=${{ matrix.config.mixed }}
make -j8
cmake -S .. -B . --preset ${{ matrix.config.preset }} -DCMAKE_PREFIX_PATH=/opt/homebrew/opt/libomp/ -DCMAKE_INSTALL_PREFIX=${INSTALL_PREFIX}
cmake --build . -j8
ctest -j10 --output-on-failure

- name: install
run: |
cd build
make install
make test_install
cmake --install .
cmake --build . --target test_install
6 changes: 3 additions & 3 deletions .github/workflows/windows-mingw.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ jobs:
fail-fast: false
matrix:
config:
- {shared: "OFF", build_type: "Release", name: "omp/release/static", cflags: ""}
name: mingw/${{ matrix.config.name }}
- { preset: "ci/omp/mingwgcc/nompi/release/static" }
name: ${{ matrix.config.preset }}
runs-on: [windows-latest]
steps:
- name: Checkout the latest code (shallow clone)
Expand All @@ -50,7 +50,7 @@ jobs:
set PATH=C:\ProgramData\chocolatey\lib\mingw\tools\install\mingw64\bin;%PATH%
mkdir build
cd build
cmake -G "MinGW Makefiles" -DBUILD_SHARED_LIBS=${{ matrix.config.shared }} -DCMAKE_BUILD_TYPE=${{ matrix.config.build_type }} -DCMAKE_CXX_FLAGS=${{ matrix.config.cflags }} ..
cmake -S .. -B . --preset ${{ matrix.config.preset }}
cmake --build . -j4
shell: cmd

Expand Down
9 changes: 6 additions & 3 deletions .github/workflows/windows-msvc-cuda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,13 @@ jobs:
fail-fast: false
matrix:
config:
- {version: "latest", name: "cuda-latest/release/shared", "mixed": "ON"}
name: msvc/${{ matrix.config.name }} (only compile)
- {version: "latest", preset: "ci/cuda/msvc/nompi/release"}
name: ${{ matrix.config.preset }} (only compile)
runs-on: [windows-2019]

env:
CUDA_ARCH: "60"

steps:
- name: Checkout the latest code (shallow clone)
uses: actions/checkout@v4
Expand All @@ -58,5 +61,5 @@ jobs:
refreshenv
mkdir build
cd build
cmake -DGINKGO_BUILD_CUDA=ON -DGINKGO_BUILD_OMP=OFF -DGINKGO_MIXED_PRECISION=${{ matrix.config.mixed }} -DGINKGO_CUDA_ARCHITECTURES=60 ..
cmake -S .. -B . --preset ${{ matrix.config.preset }}
cmake --build . -j4 --config Release
16 changes: 8 additions & 8 deletions .github/workflows/windows-msvc-ref.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ jobs:
config:
# Debug shared exceeds symbol limit
# - {shared: "ON", build_type: "Debug", name: "reference/debug/shared"}
- {shared: "OFF", build_type: "Release", name: "reference/release/static"}
- {shared: "ON", build_type: "Release", name: "reference/release/shared"}
- { preset: "ci/ref/msvc/nompi/release/static" }
- { preset: "ci/ref/msvc/nompi/release" }
# Debug static needs too much storage
# - {shared: "OFF", build_type: "Debug", name: "reference/debug/static"}
name: msvc/${{ matrix.config.name }}
name: ${{ matrix.config.preset }}
runs-on: [windows-latest]
steps:
- name: Checkout the latest code (shallow clone)
Expand All @@ -50,13 +50,13 @@ jobs:
run: |
mkdir build
cd build
cmake -DBUILD_SHARED_LIBS=${{ matrix.config.shared }} -DCMAKE_CXX_FLAGS_DEBUG='/MDd /Zi /Ob1 /O1 /Od /RTC1' -DGINKGO_BUILD_CUDA=OFF -DGINKGO_BUILD_OMP=OFF ..
cmake --build . -j4 --config ${{ matrix.config.build_type }}
ctest . -C ${{ matrix.config.build_type }} --output-on-failure
cmake -S .. -B . --preset ${{ matrix.config.preset }}
cmake --build . -j4
ctest . --output-on-failure

- name: install
run: |
$env:PATH="$env:PATH;C:\Program Files (x86)\Ginkgo\bin"
cd build
cmake --install . --config ${{ matrix.config.build_type }}
cmake --build . --target test_install --config ${{ matrix.config.build_type }}
cmake --install .
cmake --build . --target test_install
Loading
Loading