Skip to content

Fixes for sklearn 1.7 pre-release support (#2451) (#2527) #17

Fixes for sklearn 1.7 pre-release support (#2451) (#2527)

Fixes for sklearn 1.7 pre-release support (#2451) (#2527) #17

Workflow file for this run

#===============================================================================
# Copyright 2024 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#===============================================================================
name: Docs Release
on:
push:
tags:
- '[0-9][0-9][0-9][0-9]\.[0-9][0-9]?\.[0-9]' # Trigger on tag pushes
workflow_dispatch:
inputs:
doc_version:
description: 'Tag version (e.g. 2024.10.0)'
required: true
permissions: read-all
jobs:
build-docs:
runs-on: ubuntu-24.04
permissions:
contents: write
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
env:
TEMP_DOC_FOLDER: /tmp/_site
steps:
- name: Checkout Repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0 # Ensures all tags are fetched
- name: Set Up Python
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
with:
python-version: "3.11"
- name: Install System Dependencies
run: sudo apt-get update && sudo apt-get install -y clang-format pandoc
- name: Extract Tag Version
run: |
if [ -n "${{ github.event.inputs.doc_version }}" ]; then
export DOC_VERSION="${{ github.event.inputs.doc_version }}"
echo "Manual dispatch detected with version: $DOC_VERSION"
else
export DOC_VERSION="${GITHUB_REF#refs/tags/}"
echo "Tag trigger detected with version: $DOC_VERSION"
fi
# Error out if cannot find version
if [ -z "$DOC_VERSION" ]; then
echo "::error: Failed to determine documentation version."
exit 1
fi
export SHORT_DOC_VERSION=$(echo "$DOC_VERSION" | awk -F'.' '{print $1"."$2}')
# export env var in other files
echo "DOC_VERSION=$DOC_VERSION" >> $GITHUB_ENV
echo "SHORT_DOC_VERSION=$SHORT_DOC_VERSION" >> $GITHUB_ENV
- name: Checkout release branch
run: |
if git checkout $DOC_VERSION 2>/dev/null; then
echo "Successfully checked out tag $DOC_VERSION."
else
echo "::error:: Tag $DOC_VERSION does not exist."
exit 1
fi
git branch
- name: Install Python Dependencies
run: |
pip install daal-devel impi-devel
pip install -r dependencies-dev
pip install -r requirements-doc.txt
- name: Build daal4py/sklearnex
run: |
export DALROOT=$(dirname $(dirname $(which python)))
export LD_LIBRARY_PATH=$(dirname $(dirname $(which python)))/lib:$LD_LIBRARY_PATH
./conda-recipe/build.sh
- name: Build scikit-learn-intelex Documentation
run: |
export LD_LIBRARY_PATH=$(dirname $(dirname $(which python)))/lib:$LD_LIBRARY_PATH
cd doc
./build-doc.sh --gh-pages
- name: Setup Pages
uses: actions/configure-pages@983d7736d9b0ae728b81ab479565c72886d7745b # v5.0.0
- name: Prepare Documentation for Deployment
run: |
chmod +x .github/scripts/doc_release.sh
./.github/scripts/doc_release.sh
- name: Upload artifact for GitHub Pages
uses: actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa # v3.0.1
with:
path: ${{ env.TEMP_DOC_FOLDER }}
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4.0.5