diff --git a/.github/workflows/build-docs.yml b/.github/workflows/build-docs.yml index 4831132..88ccc29 100644 --- a/.github/workflows/build-docs.yml +++ b/.github/workflows/build-docs.yml @@ -16,7 +16,7 @@ jobs: pull-requests: write steps: - name: Cancel Previous Runs - uses: styfle/cancel-workflow-action@0.12.1 + uses: styfle/cancel-workflow-action@85880fa0301c86cca9da44039ee3bb12d3bedbfa # 0.12.1 with: access_token: ${{ github.token }} - name: Add Intel repository @@ -33,9 +33,9 @@ jobs: sudo apt-get install intel-oneapi-compiler-dpcpp-cpp intel-oneapi-mkl-devel - name: Setup Python if: ${{ !github.event.pull_request || github.event.action != 'closed' }} - uses: actions/setup-python@v5 + uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0 with: - python-version: "3.12" + python-version: "3.14" architecture: x64 - name: Install sphinx dependencies if: ${{ !github.event.pull_request || github.event.action != 'closed' }} @@ -43,7 +43,7 @@ jobs: run: | pip install numpy cython setuptools">=77" scikit-build cmake sphinx sphinx_rtd_theme furo pydot graphviz sphinxcontrib-programoutput sphinxcontrib-googleanalytics sphinx_design - name: Checkout repo - uses: actions/checkout@v4.1.1 + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 with: fetch-depth: 0 persist-credentials: false @@ -61,7 +61,7 @@ jobs: git clean -dfx - name: Save built docs as an artifact if: ${{ github.event.pull_request && github.event.action != 'closed'}} - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0 with: name: ${{ env.PACKAGE_NAME }} rendered documentation path: ~/rendered_docs diff --git a/.github/workflows/build-with-clang.yml b/.github/workflows/build-with-clang.yml index 98c06a3..0ce5703 100644 --- a/.github/workflows/build-with-clang.yml +++ b/.github/workflows/build-with-clang.yml @@ -12,7 +12,7 @@ jobs: strategy: matrix: - python: ["3.10", "3.11", "3.12", "3.13"] + python: ["3.10", "3.11", "3.12", "3.13", "3.14"] numpy_version: ["numpy'>=2'"] env: ONEAPI_ROOT: /opt/intel/oneapi @@ -23,7 +23,7 @@ jobs: steps: - name: Cancel Previous Runs - uses: styfle/cancel-workflow-action@0.12.1 + uses: styfle/cancel-workflow-action@85880fa0301c86cca9da44039ee3bb12d3bedbfa # 0.12.1 with: access_token: ${{ github.token }} @@ -42,13 +42,13 @@ jobs: sudo apt-get install intel-oneapi-mkl-devel - name: Setup Python - uses: actions/setup-python@v5 + uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0 with: python-version: ${{ matrix.python }} architecture: x64 - name: Checkout repo - uses: actions/checkout@v4 + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 with: fetch-depth: 0 diff --git a/.github/workflows/conda-package-cf.yml b/.github/workflows/conda-package-cf.yml index 8849209..0856f28 100644 --- a/.github/workflows/conda-package-cf.yml +++ b/.github/workflows/conda-package-cf.yml @@ -28,16 +28,25 @@ jobs: numpy: "2.3" - python: "3.13" numpy: "2.3" + - python: "3.14" + numpy: "2.3" + steps: - - uses: actions/checkout@v4 + - name: Cancel Previous Runs + uses: styfle/cancel-workflow-action@85880fa0301c86cca9da44039ee3bb12d3bedbfa # 0.12.1 + with: + access_token: ${{ github.token }} + + - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 with: fetch-depth: 0 - name: Set pkgs_dirs run: | echo "pkgs_dirs: [~/.conda/pkgs]" >> ~/.condarc + - name: Cache conda packages - uses: actions/cache@v4 + uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0 env: CACHE_NUMBER: 0 # Increase to reset cache with: @@ -50,8 +59,15 @@ jobs: - name: Add conda to system path run: echo $CONDA/bin >> $GITHUB_PATH + - name: Install conda-build run: conda install conda-build + + - name: Store conda paths as envs + shell: bash -el {0} + run: | + echo "CONDA_BLD=/usr/share/miniconda/conda-bld/linux-64/" >> $GITHUB_ENV + - name: Build conda package run: | CHANNELS="-c conda-forge --override-channels" @@ -63,11 +79,12 @@ jobs: $VERSIONS \ $CHANNELS \ conda-recipe-cf + - name: Upload artifact - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0 with: name: ${{ env.PACKAGE_NAME }} ${{ runner.os }} Python ${{ matrix.python }} - path: /usr/share/miniconda/conda-bld/linux-64/${{ env.PACKAGE_NAME }}-*.conda + path: ${{ env.CONDA_BLD }}${{ env.PACKAGE_NAME }}-*.conda build_windows: runs-on: windows-latest @@ -83,20 +100,29 @@ jobs: numpy: "2.3" - python: "3.13" numpy: "2.3" - env: - conda-bld: C:\Miniconda\conda-bld\win-64\ + - python: "3.14" + numpy: "2.3" + steps: - - uses: actions/checkout@v4 + - name: Cancel Previous Runs + uses: styfle/cancel-workflow-action@85880fa0301c86cca9da44039ee3bb12d3bedbfa # 0.12.1 + with: + access_token: ${{ github.token }} + + - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 with: fetch-depth: 0 - - uses: conda-incubator/setup-miniconda@v3 + + - uses: conda-incubator/setup-miniconda@835234971496cad1653abb28a638a281cf32541f # v3.2.0 with: - conda-remove-defaults: true - auto-activate-base: true - activate-environment: "" + miniforge-version: latest + use-mamba: 'true' + conda-remove-defaults: 'true' + activate-environment: 'build' + python-version: '3.13' # no python 3.14 support by conda-build - name: Cache conda packages - uses: actions/cache@v4 + uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0 env: CACHE_NUMBER: 3 # Increase to reset cache with: @@ -106,20 +132,27 @@ jobs: restore-keys: | ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-python-${{ matrix.python }}- ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}- + - name: Install conda-build run: conda install conda-build - - name: Setup MSVC - uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1.13.0 + + - name: Store conda paths as envs + shell: bash -el {0} + run: | + echo "CONDA_BLD=$CONDA_PREFIX\\conda-bld\\win-64\\" >> $GITHUB_ENV + - name: Build conda package run: conda build --no-test --python ${{ matrix.python }} --numpy ${{ matrix.numpy }} -c conda-forge --override-channels conda-recipe-cf + - name: Upload artifact - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0 with: name: ${{ env.PACKAGE_NAME }} ${{ runner.os }} Python ${{ matrix.python }} - path: ${{ env.conda-bld }}${{ env.PACKAGE_NAME }}-*.conda + path: ${{ env.CONDA_BLD }}${{ env.PACKAGE_NAME }}-*.conda test_linux: needs: build_linux + runs-on: ubuntu-latest strategy: @@ -133,19 +166,24 @@ jobs: numpy: "2.3" - python: "3.13" numpy: "2.3" + - python: "3.14" + numpy: "2.3" env: CHANNELS: -c conda-forge --override-channels steps: - name: Download artifact - uses: actions/download-artifact@v4 + uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0 with: name: ${{ env.PACKAGE_NAME }} ${{ runner.os }} Python ${{ matrix.python }} + - name: Add conda to system path run: echo $CONDA/bin >> $GITHUB_PATH + - name: Install conda-build run: conda install conda-build + - name: Create conda channel run: | mkdir -p $GITHUB_WORKSPACE/channel/linux-64 @@ -155,6 +193,7 @@ jobs: # Test channel conda search $PACKAGE_NAME -c $GITHUB_WORKSPACE/channel --override-channels --info --json > $GITHUB_WORKSPACE/ver.json cat ver.json + - name: Collect dependencies run: | . $CONDA/etc/profile.d/conda.sh @@ -162,11 +201,13 @@ jobs: export PACKAGE_VERSION=$(python -c "${VER_SCRIPT1} ${VER_SCRIPT2}") conda create -n ${{ env.TEST_ENV_NAME }} $PACKAGE_NAME=${PACKAGE_VERSION} python=${{ matrix.python }} numpy=${{ matrix.numpy }} $CHANNELS --only-deps --dry-run > lockfile cat lockfile + - name: Set pkgs_dirs run: | echo "pkgs_dirs: [~/.conda/pkgs]" >> ~/.condarc + - name: Cache conda packages - uses: actions/cache@v4 + uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0 env: CACHE_NUMBER: 0 # Increase to reset cache with: @@ -183,8 +224,11 @@ jobs: CHANNELS="-c $GITHUB_WORKSPACE/channel ${{ env.CHANNELS }}" export PACKAGE_VERSION=$(python -c "${VER_SCRIPT1} ${VER_SCRIPT2}") conda create -n ${{ env.TEST_ENV_NAME }} $PACKAGE_NAME=${PACKAGE_VERSION} pytest python=${{ matrix.python }} numpy=${{ matrix.numpy }} $CHANNELS + conda activate ${{ env.TEST_ENV_NAME }} + # Test installed packages conda list + - name: Run tests run: | . $CONDA/etc/profile.d/conda.sh @@ -193,6 +237,7 @@ jobs: test_windows: needs: build_windows + runs-on: windows-latest strategy: @@ -206,31 +251,39 @@ jobs: numpy: "2.3" - python: "3.13" numpy: "2.3" + - python: "3.14" + numpy: "2.3" env: CHANNELS: -c conda-forge --override-channels steps: - name: Download artifact - uses: actions/download-artifact@v4 + uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0 with: name: ${{ env.PACKAGE_NAME }} ${{ runner.os }} Python ${{ matrix.python }} - - uses: conda-incubator/setup-miniconda@v3 + + - uses: conda-incubator/setup-miniconda@835234971496cad1653abb28a638a281cf32541f # v3.2.0 with: - conda-remove-defaults: true - auto-activate-base: true - activate-environment: "" - - name: Install conda-build - # Needed to be able to run conda index - run: conda install conda-build + miniforge-version: latest + use-mamba: 'true' + conda-remove-defaults: 'true' + activate-environment: 'test' + python-version: '3.13' # no python 3.14 support by conda-index + + - name: Install conda-index + run: conda install conda-index + - name: Create conda channel run: | mkdir ${{ env.GITHUB_WORKSPACE }}\channel\win-64 move ${{ env.PACKAGE_NAME }}-*.conda ${{ env.GITHUB_WORKSPACE }}\channel\win-64 - conda index ${{ env.GITHUB_WORKSPACE }}/channel + python -m conda_index ${{ env.GITHUB_WORKSPACE }}/channel + # Test channel conda search ${{ env.PACKAGE_NAME }} -c ${{ env.GITHUB_WORKSPACE }}/channel --override-channels --info --json > ${{ env.GITHUB_WORKSPACE }}\ver.json more ${{ env.GITHUB_WORKSPACE }}\ver.json + - name: Collect dependencies shell: cmd run: | @@ -242,8 +295,9 @@ jobs: ) conda create -n ${{ env.TEST_ENV_NAME }} ${{ env.PACKAGE_NAME }}=%PACKAGE_VERSION% python=${{ matrix.python }} numpy=${{ matrix.numpy }} -c ${{ env.GITHUB_WORKSPACE }}/channel ${{ env.CHANNELS }} --only-deps --dry-run > lockfile more lockfile + - name: Cache conda packages - uses: actions/cache@v4 + uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0 env: CACHE_NUMBER: 3 # Increase to reset cache with: @@ -253,6 +307,7 @@ jobs: restore-keys: | ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-python-${{ matrix.python }}- ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}- + - name: Install mkl_random shell: cmd run: | @@ -263,8 +318,11 @@ jobs: SET PACKAGE_VERSION=%%F ) conda create -n ${{ env.TEST_ENV_NAME }} ${{ env.PACKAGE_NAME }}=%PACKAGE_VERSION% pytest python=${{ matrix.python }} numpy=${{ matrix.numpy }} -c ${{ env.GITHUB_WORKSPACE }}/channel ${{ env.CHANNELS }} + conda activate -n ${{ env.TEST_ENV_NAME }} + # Test installed packages conda list + - name: Run tests run: | conda activate -n ${{ env.TEST_ENV_NAME }} diff --git a/.github/workflows/conda-package.yml b/.github/workflows/conda-package.yml index c1384d7..ec65b33 100644 --- a/.github/workflows/conda-package.yml +++ b/.github/workflows/conda-package.yml @@ -20,7 +20,7 @@ jobs: strategy: matrix: - python: ["3.10", "3.11", "3.12", "3.13"] + python: ["3.10", "3.11", "3.12", "3.13"] # no python 3.14 support by numpy-base is relased steps: - name: Cancel Previous Runs @@ -28,7 +28,7 @@ jobs: with: access_token: ${{ github.token }} - - uses: actions/checkout@v4 + - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 with: fetch-depth: 0 @@ -37,7 +37,7 @@ jobs: echo "pkgs_dirs: [~/.conda/pkgs]" >> ~/.condarc - name: Cache conda packages - uses: actions/cache@v4 + uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0 env: CACHE_NUMBER: 0 # Increase to reset cache with: @@ -82,7 +82,7 @@ jobs: strategy: matrix: - python: ["3.10", "3.11", "3.12", "3.13"] + python: ["3.10", "3.11", "3.12", "3.13"] # no python 3.14 support by numpy-base is relased steps: - name: Cancel Previous Runs @@ -90,7 +90,7 @@ jobs: with: access_token: ${{ github.token }} - - uses: actions/checkout@v4 + - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 with: fetch-depth: 0 @@ -103,7 +103,7 @@ jobs: python-version: '3.13' # no python 3.14 support by conda-build - name: Cache conda packages - uses: actions/cache@v4 + uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0 env: CACHE_NUMBER: 3 # Increase to reset cache with: @@ -126,7 +126,7 @@ jobs: run: conda build --no-test --python ${{ matrix.python }} -c https://software.repos.intel.com/python/conda -c conda-forge --override-channels conda-recipe - name: Upload artifact - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0 with: name: ${{ env.PACKAGE_NAME }} ${{ runner.os }} Python ${{ matrix.python }} path: ${{ env.CONDA_BLD }}${{ env.PACKAGE_NAME }}-*.conda @@ -134,7 +134,7 @@ jobs: test_linux: needs: build_linux - runs-on: ubuntu-latest + runs-on: ubuntu-latest strategy: matrix: @@ -153,7 +153,7 @@ jobs: steps: - name: Download artifact - uses: actions/download-artifact@v4 + uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0 with: name: ${{ env.PACKAGE_NAME }} ${{ runner.os }} Python ${{ matrix.python }} @@ -186,7 +186,7 @@ jobs: echo "pkgs_dirs: [~/.conda/pkgs]" >> ~/.condarc - name: Cache conda packages - uses: actions/cache@v4 + uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0 env: CACHE_NUMBER: 0 # Increase to reset cache with: @@ -217,7 +217,7 @@ jobs: test_windows: needs: build_windows - runs-on: windows-latest + runs-on: windows-latest strategy: matrix: @@ -236,7 +236,7 @@ jobs: steps: - name: Download artifact - uses: actions/download-artifact@v4 + uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0 with: name: ${{ env.PACKAGE_NAME }} ${{ runner.os }} Python ${{ matrix.python }} @@ -274,7 +274,7 @@ jobs: more lockfile - name: Cache conda packages - uses: actions/cache@v4 + uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0 env: CACHE_NUMBER: 3 # Increase to reset cache with: