From 6c6345ce1bf87ee4f1357aff8a46ca6f900d7c46 Mon Sep 17 00:00:00 2001 From: serge-sans-paille Date: Mon, 14 Oct 2024 17:40:17 +0200 Subject: [PATCH] Validate CI integration Closes #538 --- .github/cmake-test/CMakeLists.txt | 7 +++++++ .github/cmake-test/main.cpp | 5 +++++ .github/workflows/cmake.yml | 28 ++++++++++++++++++++++++++++ 3 files changed, 40 insertions(+) create mode 100644 .github/cmake-test/CMakeLists.txt create mode 100644 .github/cmake-test/main.cpp create mode 100644 .github/workflows/cmake.yml diff --git a/.github/cmake-test/CMakeLists.txt b/.github/cmake-test/CMakeLists.txt new file mode 100644 index 000000000..660880dbf --- /dev/null +++ b/.github/cmake-test/CMakeLists.txt @@ -0,0 +1,7 @@ +cmake_minimum_required(VERSION 3.19) +project(test VERSION 0.0.1) + +find_package(xsimd REQUIRED) + +add_executable(test main.cpp) +target_link_libraries(test PUBLIC xsimd) diff --git a/.github/cmake-test/main.cpp b/.github/cmake-test/main.cpp new file mode 100644 index 000000000..2327656de --- /dev/null +++ b/.github/cmake-test/main.cpp @@ -0,0 +1,5 @@ +#include "xsimd/xsimd.hpp" + +int main() { + return 0; +} diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml new file mode 100644 index 000000000..ee9f52311 --- /dev/null +++ b/.github/workflows/cmake.yml @@ -0,0 +1,28 @@ +name: Cmake integration +on: [push, pull_request] +concurrency: + group: ${{ github.workflow }}-${{ github.job }}-${{ github.ref }} + cancel-in-progress: true +defaults: + run: + shell: bash -l {0} +jobs: + build: + runs-on: ubuntu-20.04 + steps: + - name: Checkout xsimd + uses: actions/checkout@v3 + - name: Configure build + run: | + mkdir _build && cd _build + cmake .. -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_PREFIX=_install + -G Ninja + - name: Build + run: ninja -C _build install + - name: Check install + run: | + mkdir _install_build && cd _install_build + cp ${{ github.workspace }}/.github/cmake-test/* . + cmake . -DCMAKE_PREFIX_PATH=../_build/install/lib64/cmake/xsimd +