Skip to content

Commit

Permalink
Merge pull request #232 from JohanMabille/upgrade_xeus
Browse files Browse the repository at this point in the history
Upgrade xeus
  • Loading branch information
JohanMabille committed Oct 17, 2022
2 parents a0fac36 + b186aeb commit 957484d
Show file tree
Hide file tree
Showing 12 changed files with 359 additions and 410 deletions.
47 changes: 0 additions & 47 deletions .appveyor.yml

This file was deleted.

17 changes: 0 additions & 17 deletions .azure-pipelines/azure-pipelines-linux.yml

This file was deleted.

26 changes: 0 additions & 26 deletions .azure-pipelines/azure-pipelines-osx.yml

This file was deleted.

36 changes: 0 additions & 36 deletions .azure-pipelines/unix-build.yml

This file was deleted.

129 changes: 129 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
name: CI
on:
workflow_dispatch:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
unix:

runs-on: ${{ matrix.os }}

strategy:
fail-fast: false
matrix:
os: [ubuntu-18.04, ubuntu-20.04, macos-10.15, macos-11]

steps:
- uses: actions/checkout@v2
- name: Get number of CPU cores
uses: SimenB/github-actions-cpu-cores@v1

- name: install mamba
uses: mamba-org/provision-with-micromamba@main
with:
environment-file: environment-dev.yml
environment-name: xwidgets

- name: install cxx compiler
shell: bash -l {0}
run: |
$HOME/micromamba-bin/micromamba install cxx-compiler libuuid -c conda-forge -y
- name: cmake configure
shell: bash -l {0}
run: |
mkdir -p build
cd build
cmake .. \
-DXWIDGETS_BUILD_TESTS=ON \
-DCMAKE_PREFIX_PATH=$CONDA_PREFIX \
-DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX
- name: build
shell: bash -l {0}
run: |
cd build
make -j 2
# make -j ${{ steps.cpu-cores.outputs.count }}
- name: Test xwidgets
uses: nick-invision/retry@v2
with:
timeout_minutes: 4
max_attempts: 4
shell: bash
command: |
cd build/test
ctest --output-on-failure
- name: install xwidgets
shell: bash -l {0}
run: |
cd build
make install
win:

runs-on: ${{ matrix.os }}

strategy:
fail-fast: false
matrix:
os: [ windows-2019, windows-2022 ]

steps:
- uses: actions/checkout@v2

- name: install mamba
uses: mamba-org/provision-with-micromamba@main
with:
environment-file: environment-dev.yml
environment-name: xwidgets

- name: micromamba shell hook
shell: powershell
run: |
micromamba shell hook -s cmd.exe -p C:\Users\runneradmin\micromamba-root
- name: Make build directory
run: mkdir build

- name: cmake configure
shell: cmd
run: |
call C:\Users\runneradmin\micromamba-root\condabin\micromamba.bat activate xwidgets
cmake .. ^
-G Ninja ^
-DCMAKE_BUILD_TYPE=Release ^
-DXWDIGETS_BUILD_TESTS=ON ^
-DDEPENDENCY_SEARCH_PREFIX="%CONDA_PREFIX%\Library" ^
-DCMAKE_PREFIX_PATH="%CONDA_PREFIX%\Library" ^
-DCMAKE_INSTALL_PREFIX="%CONDA_PREFIX%"
working-directory: build

- name: build
shell: cmd
run: |
call C:\Users\runneradmin\micromamba-root\condabin\micromamba.bat activate xwidgets
set CL=/MP
ninja install
working-directory: build

- name: ctest
uses: nick-invision/retry@v2
with:
timeout_minutes: 4
max_attempts: 4
shell: cmd
command: |
call C:\Users\runneradmin\micromamba-root\condabin\micromamba.bat activate xwidgets
set PATH=%CONDA_PREFIX%;%CONDA_PREFIX%\\Scripts;%CONDA_PREFIX%\\Library;%CONDA_PREFIX%\\Library\\bin;%PATH%
cd build
ctest --output-on-failure
16 changes: 5 additions & 11 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -56,15 +56,14 @@ message(STATUS "xwidgets binary version: v${XWIDGETS_BINARY_VERSION}")
# Build options
# =============

option(DISABLE_ARCH_NATIVE "disable -march=native flag" OFF)
option(XWIDGETS_BUILD_SHARED_LIBS "Build xwidgets shared library." ON)
option(XWIDGETS_BUILD_STATIC_LIBS "Build xwidgets static library (default if BUILD_SHARED_LIBS is OFF)." ON)

# Dependencies
# ============

find_package(xtl 0.7.0 REQUIRED)
find_package(xeus 1.0.0 REQUIRED)
find_package(xeus 3.0.0 REQUIRED)
find_package(xproperty 0.11.0 REQUIRED)

# Source files
Expand Down Expand Up @@ -214,9 +213,6 @@ macro(xwidgets_create_target target_name linkage output_name)

if (CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR CMAKE_CXX_COMPILER_ID MATCHES "GNU" OR CMAKE_CXX_COMPILER_ID MATCHES "Intel")
target_compile_options(${target_name} PUBLIC -Wunused-parameter -Wextra -Wreorder)
if (NOT DISABLE_ARCH_NATIVE)
target_compile_options(${target_name} PUBLIC -march=native)
endif()

message(STATUS "CMAKE_CXX_FLAGS: ${CMAKE_CXX_FLAGS}")
endif()
Expand Down Expand Up @@ -260,14 +256,12 @@ endif()
# Tests
# =====

OPTION(BUILD_TESTS "xwidgets test suite" OFF)
OPTION(DOWNLOAD_GTEST "build gtest from downloaded sources" OFF)
OPTION(XWIDGETS_BUILD_TESTS "xwidgets test suite" OFF)

if(DOWNLOAD_GTEST OR GTEST_SRC_DIR)
set(BUILD_TESTS ON)
endif()
include(CTest)

if(BUILD_TESTS)
if(XWIDGETS_BUILD_TESTS)
set(BUILD_TESTING ON)
add_subdirectory(test)
endif()

Expand Down
7 changes: 0 additions & 7 deletions azure-pipelines.yml

This file was deleted.

4 changes: 3 additions & 1 deletion environment-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ dependencies:
# Build dependencies
- cmake
# Host dependencies
- xeus=2.0.0
- xeus-zmq=1.0.0
- cppzmq
- xproperty=0.11.0
- nlohmann_json=3.9.1
# Test dependencies
- doctest >= 2.4.6

0 comments on commit 957484d

Please sign in to comment.