Skip to content

oneDAL-nightly

oneDAL-nightly #6

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: oneDAL-nightly
on:
schedule:
- cron: '5 21 * * *'
workflow_dispatch:
env:
OTHER_REPO: "oneapi-src/oneDAL"
WF_NAME: "Nightly-build"
permissions:
contents: read
jobs:
collect_artifacts:
name: Collect Artifacts
if: github.repository == 'intel/scikit-learn-intelex'
runs-on: ubuntu-latest
timeout-minutes: 120
steps:
- name: Get run ID of "Nightly-build" workflow
id: get-run-id
run: |
RUN_ID=`gh run --repo ${OTHER_REPO} list --workflow "${WF_NAME}" --json databaseId --jq .[0].databaseId`
echo "Detected latest run id of ${RUN_ID} for workflow ${WF_NAME}"
echo "run-id=${RUN_ID}" >> "$GITHUB_OUTPUT"
env:
GH_TOKEN: ${{ secrets.INTEL_DAAL_PAT }}
- name: Qualify "Nightly-build" workflow
run: |
STATUS=`gh run --repo ${OTHER_REPO} view ${{ steps.get-run-id.outputs.run-id }} --json status --exit-status --jq .status`
echo "Status of run: ${STATUS}"
# if latest nightly build is currently running, wait for it to complete and reacquire status
if [[ $STATUS == "queued" ]] || [[ $STATUS == "in_progress" ]]; then
gh run --repo ${OTHER_REPO} watch ${{ steps.get-run-id.outputs.run-id }} -i 300
STATUS=`gh run --repo ${OTHER_REPO} view ${{ steps.get-run-id.outputs.run-id }} --json status --exit-status --jq .status`
fi
T_R=`gh run --repo ${OTHER_REPO} view ${{ steps.get-run-id.outputs.run-id }} --json startedAt --exit-status --jq .startedAt`
# if the previous run is successful but older than 25 hours set an exit code
if [[ $STATUS == "completed" ]]; then exit $((($(date '+%s') - $(date -d ${T_R} '+%s'))/90000)); fi
env:
GH_TOKEN: ${{ secrets.INTEL_DAAL_PAT }}
- name: Download Artifacts
run: |
gh run --repo ${OTHER_REPO} download ${{ steps.get-run-id.outputs.run-id }}
ls -la
env:
GH_TOKEN: ${{ secrets.INTEL_DAAL_PAT }}
- name: Archive Linux build
uses: actions/upload-artifact@v4
with:
name: __release_lnx
path: ./__release_lnx
- name: Archive Windows build
uses: actions/upload-artifact@v4
with:
name: __release_win
path: ./__release_win
- name: Archive DPC++
uses: actions/upload-artifact@v4
with:
name: icx_compiler
path: ./icx_compiler/icx.zip
- name: Archive Intel OpenCL CPU runtime
uses: actions/upload-artifact@v4
with:
name: opencl_rt_installer
path: ./opencl_rt_installer/opencl_rt.msi