From d324a7f516a8a096fc1ed1705fc62bdcacb30cf5 Mon Sep 17 00:00:00 2001 From: mattip Date: Tue, 12 Mar 2024 10:13:03 +0200 Subject: [PATCH] resync with upstream --- .github/workflows/nanobind.yml | 48 +++++++++++++++++----------------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/.github/workflows/nanobind.yml b/.github/workflows/nanobind.yml index 2b99ecc..6e62251 100644 --- a/.github/workflows/nanobind.yml +++ b/.github/workflows/nanobind.yml @@ -16,10 +16,6 @@ on: # │ │ │ │ │ - cron: "0 2 * * 0" -env: - PIP_ONLY_BINARY: numpy - FORCE_COLOR: 3 - PYTEST_TIMEOUT: 300 jobs: # This is the "main" test suite, which tests a large number of different @@ -28,41 +24,45 @@ jobs: strategy: fail-fast: false matrix: - runs-on: [ubuntu-latest, windows-2022, macos-latest] - python: - - 'pypy-3.10-nightly' - - 'pypy-3.9-nightly' + os: ['ubuntu-latest', 'windows-2022', 'macos-latest'] + python: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13.0-alpha.3', 'pypy3.9-v7.3.15', 'pypy3.10-v7.3.15'] - - name: "nanobind ${{ matrix.python }} • ${{ matrix.runs-on }} x64 ${{ matrix.args }}" - runs-on: ${{ matrix.runs-on }} + name: "Python ${{ matrix.python }} / ${{ matrix.os }}" + runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v4.1.1 + - uses: actions/checkout@v4 with: repository: wjakob/nanobind - submodules: recursive + submodules: true - name: Setup Python ${{ matrix.python }} - uses: actions/setup-python@v5.0.0 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python }} + cache: 'pip' + + - name: Install the latest CMake + uses: lukka/get-cmake@latest - - name: Update CMake - uses: jwlawson/actions-setup-cmake@v1.13 + - name: Install Eigen + if: matrix.os == 'ubuntu-latest' + run: sudo apt-get -y install libeigen3-dev - - name: Install dependencies - run: python -m pip install pytest typing-extensions + - name: Install PyTest + run: | + python -m pip install pytest pytest-github-actions-annotate-failures typing_extensions - - name: Setup annotations on Linux - if: runner.os == 'Linux' - run: python -m pip install pytest-github-actions-annotate-failures + - name: Install NumPy + if: ${{ !startsWith(matrix.python, 'pypy') && !contains(matrix.python, 'alpha') }} + run: | + python -m pip install numpy scipy - - name: Configure ${{ matrix.args }} + - name: Configure run: > - cmake -S . -B build ${{ matrix.args }} + cmake -S . -B build -DNB_TEST_STABLE_ABI=ON -DNB_TEST_SHARED_BUILD="$(python3 -c 'import sys; print(int(sys.version_info.minor>=11))')" - - name: Build + - name: Build C++ run: cmake --build build -j 2 - name: Run tests