Skip to content

TEMP: run the workflows on this branch, oldest and newest Python only #1

TEMP: run the workflows on this branch, oldest and newest Python only

TEMP: run the workflows on this branch, oldest and newest Python only #1

Workflow file for this run

# Intel Python CI (gh-ci): builds and tests the conda packages and wheels for Intel's Jenkins, see ci/README.md
name: Intel Python CI
on:
push:
branches: [master, ci/intel-python-ci]
tags: ['*']
pull_request:
permissions:
contents: read
concurrency:
group: intel-ci-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
matrix:
name: Platforms and Python versions
runs-on: ${{ vars.GH_CI_RUNNER || 'ubuntu-latest' }}
timeout-minutes: 10
outputs:
matrix: ${{ steps.declared.outputs.matrix }}
wheel: ${{ steps.declared.outputs.wheel }}
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: "3.14"
- name: Read the declared platforms and Python versions
id: declared
run: |
python ci/matrix.py --event pull_request --github-output matrix
python ci/matrix.py --system wheel --event pull_request --github-output wheel
# The recipe and pyproject.toml declare no macOS, as SYCL has none; Jenkins ignores it anyway.
build:
name: ${{ matrix.name }} Python ${{ matrix.python }}
needs: matrix
runs-on: ${{ matrix.platform == 'windows' && (vars.GH_CI_WINDOWS_RUNNER || 'windows-2022') || matrix.platform == 'macos' && (vars.GH_CI_MACOS_RUNNER || 'macos-26-intel') || (vars.GH_CI_RUNNER || 'ubuntu-latest') }}
timeout-minutes: 150
strategy:
fail-fast: false
matrix: ${{ fromJSON(needs.matrix.outputs.matrix) }}
defaults:
run:
shell: bash -el {0}
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
# The recipe takes its version from git describe.
fetch-depth: 0
# Miniforge 26.9.4-0 fails setup-miniconda's conda init on Windows runners; 26.7.2-0 works.
- uses: conda-incubator/setup-miniconda@be893c923ea9cf1cf7cd510fbdde27c7e18cbdcb # v4.1.0
with:
miniforge-version: 26.7.2-0
activate-environment: ""
conda-remove-defaults: "true"
- name: Install conda-build
run: conda install -y -q -n base --override-channels -c conda-forge conda-build
- name: Build and run the recipe tests
env:
PYTHON_VERSION: ${{ matrix.python }}
run: python ci/build.py --python "$PYTHON_VERSION" --output "$RUNNER_TEMP/output"
- uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
with:
name: dpctl ${{ matrix.name }} Python ${{ matrix.python }}
path: ${{ runner.temp }}/output/*.conda
if-no-files-found: error
# Jenkins downloads them within minutes of the run; tags keep them 30 days.
retention-days: ${{ startsWith(github.ref, 'refs/tags/') && 30 || 3 }}
test:
name: Test ${{ matrix.name }} Python ${{ matrix.python }}
needs: [matrix, build]
runs-on: ${{ matrix.platform == 'windows' && (vars.GH_CI_WINDOWS_RUNNER || 'windows-2022') || matrix.platform == 'macos' && (vars.GH_CI_MACOS_RUNNER || 'macos-26-intel') || (vars.GH_CI_RUNNER || 'ubuntu-latest') }}
timeout-minutes: 60
strategy:
fail-fast: false
matrix: ${{ fromJSON(needs.matrix.outputs.matrix) }}
defaults:
run:
shell: bash -el {0}
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
with:
name: dpctl ${{ matrix.name }} Python ${{ matrix.python }}
path: ${{ runner.temp }}/artifacts
- uses: conda-incubator/setup-miniconda@be893c923ea9cf1cf7cd510fbdde27c7e18cbdcb # v4.1.0
with:
miniforge-version: 26.7.2-0
activate-environment: ""
conda-remove-defaults: "true"
- name: Install the package and run ci/test.py
env:
PYTHON_VERSION: ${{ matrix.python }}
EVENT: ${{ startsWith(github.ref, 'refs/tags/') && 'tag' || github.event_name == 'pull_request' && 'pr' || 'push' }}
COMMIT: ${{ github.event.pull_request.head.sha || github.sha }}
run: >-
python ci/hooks.py --python "$PYTHON_VERSION" --artifacts "$RUNNER_TEMP/artifacts"
--work "$RUNNER_TEMP/hooks" --event "$EVENT" --commit "$COMMIT"
build-wheel:
name: ${{ matrix.name }} Wheels Python ${{ matrix.python }}
needs: matrix
runs-on: ${{ matrix.platform == 'windows' && (vars.GH_CI_WINDOWS_RUNNER || 'windows-2022') || matrix.platform == 'macos' && (vars.GH_CI_MACOS_RUNNER || 'macos-26-intel') || (vars.GH_CI_RUNNER || 'ubuntu-latest') }}
timeout-minutes: 150
strategy:
fail-fast: false
matrix: ${{ fromJSON(needs.matrix.outputs.wheel) }}
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
# versioneer takes the version from git describe.
fetch-depth: 0
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: "3.14"
- name: Install cibuildwheel
run: python -m pip install --no-input cibuildwheel==4.3.5
- name: Build the wheel
env:
PYTHON_VERSION: ${{ matrix.python }}
run: python ci/build.py --system wheel --python "$PYTHON_VERSION" --output "$RUNNER_TEMP/output"
- uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
with:
name: dpctl ${{ matrix.name }} Wheels Python ${{ matrix.python }}
path: ${{ runner.temp }}/output/*.whl
if-no-files-found: error
retention-days: ${{ startsWith(github.ref, 'refs/tags/') && 30 || 3 }}
test-wheel:
name: Test ${{ matrix.name }} Wheels Python ${{ matrix.python }}
needs: [matrix, build-wheel]
runs-on: ${{ matrix.platform == 'windows' && (vars.GH_CI_WINDOWS_RUNNER || 'windows-2022') || matrix.platform == 'macos' && (vars.GH_CI_MACOS_RUNNER || 'macos-26-intel') || (vars.GH_CI_RUNNER || 'ubuntu-latest') }}
timeout-minutes: 60
strategy:
fail-fast: false
matrix: ${{ fromJSON(needs.matrix.outputs.wheel) }}
defaults:
run:
shell: bash -el {0}
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
with:
name: dpctl ${{ matrix.name }} Wheels Python ${{ matrix.python }}
path: ${{ runner.temp }}/artifacts
- uses: conda-incubator/setup-miniconda@be893c923ea9cf1cf7cd510fbdde27c7e18cbdcb # v4.1.0
with:
miniforge-version: 26.7.2-0
activate-environment: ""
conda-remove-defaults: "true"
- name: Install the wheel and run ci/test.py
env:
PYTHON_VERSION: ${{ matrix.python }}
EVENT: ${{ startsWith(github.ref, 'refs/tags/') && 'tag' || github.event_name == 'pull_request' && 'pr' || 'push' }}
COMMIT: ${{ github.event.pull_request.head.sha || github.sha }}
run: >-
python ci/hooks.py --kind wheel --python "$PYTHON_VERSION" --artifacts "$RUNNER_TEMP/artifacts"
--work "$RUNNER_TEMP/hooks" --event "$EVENT" --commit "$COMMIT"
# The dev channel on anaconda.org, which docs and the nightly run-tests-from-dppy-bits.yaml read.
upload:
name: Upload to anaconda.org
needs: [test, test-wheel]
if: |
github.repository == 'IntelPython/dpctl' &&
github.event_name == 'push' &&
(github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/'))
runs-on: ${{ vars.GH_CI_RUNNER || 'ubuntu-latest' }}
timeout-minutes: 20
defaults:
run:
shell: bash
steps:
- uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
with:
pattern: dpctl *
merge-multiple: true
path: ${{ runner.temp }}/packages
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: "3.14"
- name: Install anaconda-client
run: python -m pip install --no-input anaconda-client
- name: Upload the conda packages and the wheels
env:
ANACONDA_TOKEN: ${{ secrets.ANACONDA_TOKEN }}
PACKAGES: ${{ runner.temp }}/packages
run: |
cd "$PACKAGES"
conda_packages=(dpctl-*.conda)
version=${conda_packages[0]#dpctl-}
version=${version%%-*}
anaconda --token "$ANACONDA_TOKEN" upload --user dppy --label dev dpctl-*.conda
anaconda --token "$ANACONDA_TOKEN" upload --user dppy --label dev dpctl-*.whl --version "$version"
cleanup:
name: Clean up anaconda.org
needs: upload
if: |
github.repository == 'IntelPython/dpctl' &&
github.event_name == 'push' &&
(github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/'))
runs-on: ${{ vars.GH_CI_RUNNER || 'ubuntu-latest' }}
timeout-minutes: 30
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
repository: IntelPython/devops-tools
fetch-depth: 0
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: "3.11"
- name: Install anaconda-client
run: python -m pip install --no-input anaconda-client
- name: Remove the old dev packages
env:
ANACONDA_TOKEN: ${{ secrets.ANACONDA_TOKEN }}
run: python scripts/cleanup-old-packages.py --verbose --force --token "$ANACONDA_TOKEN" --package dppy/dpctl --label dev