Adding compatibility with NumPy 2.x #27
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build and test | |
| on: | |
| pull_request: | |
| workflow_dispatch: | |
| jobs: | |
| build_with_cmake: | |
| name: CMake | |
| strategy: | |
| matrix: | |
| os: | |
| - ubuntu-latest | |
| compiler: | |
| - {cc: gcc, cxx: g++} | |
| - {cc: clang, cxx: clang++} | |
| #include: | |
| #- os: macos-latest | |
| # compiler: {cc: clang, cxx: clang++} | |
| #- os: windows-latest | |
| # compiler: {cc: cl, cxx: cl} | |
| runs-on: ${{ matrix.os }} | |
| env: | |
| BUILD_TYPE: Debug | |
| defaults: | |
| run: | |
| shell: bash -el {0} | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.12' | |
| - name: Install NumPy | |
| run: | | |
| pip install numpy | |
| - name: Configure and build with CMake | |
| uses: threeal/cmake-action@v2 | |
| with: | |
| source-dir: ${{ github.workspace }} | |
| build-dir: "${{ github.workspace }}/build" | |
| c-compiler: ${{ matrix.compiler.cc }} | |
| cxx-compiler: ${{ matrix.compiler.cxx }} | |
| options: | | |
| CMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} | |
| run-build: true | |
| build-args: --config ${{ env.BUILD_TYPE }} | |
| build_with_pip: | |
| name: pip | |
| strategy: | |
| matrix: | |
| os: | |
| - ubuntu-latest | |
| - ubuntu-22.04 | |
| #- macos-latest | |
| #- windows-latest | |
| python-version: | |
| - '3.14' | |
| runs-on: ${{ matrix.os }} | |
| defaults: | |
| run: | |
| shell: bash -el {0} | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Upgrade pip | |
| if: matrix.os == 'ubuntu-22.04' | |
| run: python -m pip install --upgrade pip packaging | |
| - name: Install with pip | |
| run: pip install . -v | |
| - name: Test installation | |
| run: python -c "import xmippLib" | |