8000 Upgraded CI compilers (#319) · xtensor-stack/xtensor-python@d1c2110 · GitHub
[go: up one dir, main page]

Skip to content
Sign in

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit d1c2110

Browse files
authored
Upgraded CI compilers (#319)
1 parent a7288ce commit d1c2110

File tree

11 files changed

+48
-54
lines changed

11 files changed

+48
-54
lines changed

.github/workflows/linux.yml

Lines changed: 25 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -12,50 +12,42 @@ defaults:
1212
shell: bash -e -l {0}
1313
jobs:
1414
build:
15-
runs-on: ubuntu-latest
15+
runs-on: ubuntu-24.04
1616
name: ${{ matrix.sys.compiler }} ${{ matrix.sys.version } 8000 }
1717
strategy:
1818
fail-fast: false
1919
matrix:
2020
sys:
21-
- {compiler: gcc, version: '9'}
22-
- {compiler: gcc, version: '10'}
2321
- {compiler: gcc, version: '11'}
2422
- {compiler: gcc, version: '12'}
25-
- {compiler: clang, version: '15'}
26-
- {compiler: clang, version: '16'}
23+
- {compiler: gcc, version: '13'}
24+
- {compiler: gcc, version: '14'}
25+
- {compiler: clang, version: '17'}
26+
- {compiler: clang, version: '18'}
27+
- {compiler: clang, version: '19'}
28+
- {compiler: clang, version: '20'}
2729

2830
steps:
31+
- name: Install GCC
32+
if: matrix.sys.compiler == 'gcc'
33+
uses: egor-tensin/setup-gcc@v1
34+
with:
35+
version: ${{matrix.sys.version}}
36+
platform: x64
2937

30-
- name: Setup GCC
31-
if: ${{ matrix.sys.compiler == 'gcc' }}
32-
run: |
33-
GCC_VERSION=${{ matrix.sys.version }}
34-
sudo apt-get update
35-
sudo apt-get --no-install-suggests --no-install-recommends install g++-$GCC_VERSION
36-
CC=gcc-$GCC_VERSION
37-
echo "CC=$CC" >> $GITHUB_ENV
38-
CXX=g++-$GCC_VERSION
39-
echo "CXX=$CXX" >> $GITHUB_ENV
40-
41-
- name: Setup clang
42-
if: ${{ matrix.sys.compiler == 'clang' }}
38+
- name: Install LLVM and Clang
39+
if: matrix.sys.compiler == 'clang'
4340
run: |
44-
LLVM_VERSION=${{ matrix.sys.version }}
45-
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - || exit 1
46-
if [[ $LLVM_VERSION -ge 13 ]]; then
47-
sudo add-apt-repository "deb http://apt.llvm.org/focal/ llvm-toolchain-focal-$LLVM_VERSION main" || exit 1
48-
else
49-
sudo add-apt-repository "deb http://apt.llvm.org/focal/ llvm-toolchain-focal main" || exit 1
50-
fi || exit 1
51-
sudo apt-get update || exit 1
52-
sudo apt-get --no-install-suggests --no-install-recommends install clang-$LLVM_VERSION || exit 1
53-
sudo apt-get --no-install-suggests --no-install-recommends install g++-9 g++-9-multilib || exit 1
54-
sudo ln -s /usr/include/asm-generic /usr/include/asm
55-
CC=clang-$LLVM_VERSION
56-
echo "CC=$CC" >> $GITHUB_ENV
57-
CXX=clang++-$LLVM_VERSION
58-
echo "CXX=$CXX" >> $GITHUB_ENV
41+
wget https://apt.llvm.org/llvm.sh
42+
chmod +x llvm.sh
43+
sudo ./llvm.sh ${{matrix.sys.version}}
44+
sudo apt-get install -y clang-tools-${{matrix.sys.version}}
45+
sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-${{matrix.sys.version}} 200
46+
sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-${{matrix.sys.version}} 200
47+
sudo update-alternatives --install /usr/bin/clang-scan-deps clang-scan-deps /usr/bin/clang-scan-deps-${{matrix.sys.version}} 200
48+
sudo update-alternatives --set clang /usr/bin/clang-${{matrix.sys.version}}
49+
sudo update-alternatives --set clang++ /usr/bin/clang++-${{matrix.sys.version}}
50+
sudo update-alternatives --set clang-scan-deps /usr/bin/clang-scan-deps-${{matrix.sys.version}}
5951
6052
- name: Checkout code
6153
uses: actions/checkout@v3

.github/workflows/osx.yml

Expand all lines: .github/workflows/osx.yml
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,9 @@ jobs:
1818
fail-fast: false
1919
matrix:
2020
os:
21-
- 11
22-
- 12
21+
- 13
22+
- 14
23+
- 15
2324

2425
steps:
2526

CMakeLists.txt

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
# The full license is in the file LICENSE, distributed with this software. #
88
############################################################################
99

10-
cmake_minimum_required(VERSION 3.14)
10+
cmake_minimum_required(VERSION 3.29)
1111
project(xtensor-python)
1212

1313
set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake ${CMAKE_MODULE_PATH})
@@ -46,19 +46,19 @@ else()
4646
message(STATUS "Found xtensor: ${xtensor_INCLUDE_DIRS}/xtensor")
4747
endif()
4848

49-
# Running find_package(PythonInterp) to retrieve the Python version
50-
# which is not exported by Pybind11's cmake.
51-
# Cf. https://github.com/pybind/pybind11/issues/2268
52-
find_package(PythonInterp ${PythonLibsNew_FIND_VERSION} REQUIRED)
49+
find_package(Python COMPONENTS Interpreter REQUIRED)
5350

5451
set(pybind11_REQUIRED_VERSION 2.6.1)
55-
if(TARGET pybind11 OR TARGET pybind11::headers)
56-
# pybind11 has a variable that indicates its version already, so use that
57-
message(STATUS "Found pybind11 v${pybind11_VERSION}")
58-
else()
52+
if (NOT TARGET pybind11::headers)
53+
# Defaults to ON for cmake >= 3.18
54+
# https://github.com/pybind/pybind11/blob/35ff42b56e9d34d9a944266eb25f2c899dbdfed7/CMakeLists.txt#L96
55+
set(PYBIND11_FINDPYTHON OFF)
5956
find_package(pybind11 ${pybind11_REQUIRED_VERSION} REQUIRED)
6057
message(STATUS "Found pybind11: ${pybind11_INCLUDE_DIRS}/pybind11")
61-
endif()
58+
else ()
59+
# pybind11 has a variable that indicates its version already, so use that
60+
message(STATUS "Found pybind11 v${pybind11_VERSION}")
61+
endif ()
6262

6363
# Look for NumPy headers, except if NUMPY_INCLUDE_DIRS is passed,
6464
# which is required under some circumstances (such as wasm, where

cmake/FindNumPy.cmake

Lines changed: 2 additions & 2 deletions
Original file line 10000 numberDiff line numberDiff line change
@@ -40,9 +40,9 @@
4040

4141
# Finding NumPy involves calling the Python interpreter
4242
if(NumPy_FIND_REQUIRED)
43-
find_package(PythonInterp REQUIRED)
43+
find_package(Python COMPONENTS Interpreter REQUIRED)
4444
else()
45-
find_package(PythonInterp)
45+
find_package(Python COMPONENTS Interpreter)
4646
endif()
4747

4848
if(NOT PYTHONINTERP_FOUND)

docs/source/examples/copy_cast/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required(VERSION 3.1..3.19)
1+
cmake_minimum_required(VERSION 3.29)
22

33
project(mymodule)
44

docs/source/examples/readme_example_1/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required(VERSION 3.18..3.20)
1+
cmake_minimum_required(VERSION 3.29)
22

33
project(mymodule)
44

docs/source/examples/sfinae/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required(VERSION 3.18..3.20)
1+
cmake_minimum_required(VERSION 3.29)
22

33
project(mymodule)
44

environment-dev.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,6 @@ dependencies:
1010
- numpy>=2.0
1111
- pybind11>=2.12.0,<3
1212
# Test dependencies
13+
- setuptools
1314
- pytest
1415

test/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
# The full license is in the file LICENSE, distributed with this software. #
88
############################################################################
99

10-
cmake_minimum_required(VERSION 3.1)
10+
cmake_minimum_required(VERSION 3.29)
1111

1212
if (CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR)
1313
project(xtensor-python-test)

test/copyGTest.cmake.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
# The full license is in the file LICENSE, distributed with this software. #
88
############################################################################
99

10-
cmake_minimum_required(VERSION 2.8.2)
10+
cmake_minimum_required(VERSION 3.29)
1111

1212
project(googletest-download NONE)
1313

test/downloadGTest.cmake.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@
77
# The full license is in the file LICENSE, distributed with this software. #
88
############################################################################
99

10-
cmake_minimum_required(VERSION 2.8.2)
10+
cmake_minimum_required(VERSION 3.29)
1111

1212
project(googletest-download NONE)
1313

1414
include(ExternalProject)
1515
ExternalProject_Add(googletest
1616
GIT_REPOSITORY https://github.com/google/googletest.git
17-
GIT_TAG release-1.10.0
17+
GIT_TAG v1.16.0
1818
SOURCE_DIR "${CMAKE_CURRENT_BINARY_DIR}/googletest-src"
1919
BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/googletest-build"
2020
CONFIGURE_COMMAND ""

0 commit comments

Comments
 (0)
0