Skip to content

Specify container

Specify container #23

name: 'ROOT Python wheels'
on:
workflow_dispatch:
inputs:
branch:
description: 'The branch for which the Python wheel has to be generated'
type: string
required: true
default: "experimental-pip-install-root"
push:
branches: experimental-pip-install-root
schedule:
- cron: '01 1 * * *'
jobs:
python_wheel:
runs-on:
- self-hosted
- linux
- x64
env:
WORKDIR: /home/runner/work/root
container:
image: registry.cern.ch/root-ci/ubuntu2404:buildready
options: '--security-opt label=disable --rm'
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ inputs.branch }}
- name: Set up Python
uses: actions/setup-python@v5
- name: Update repositories
run: apt-get update
- name: Install Kerberos utilities
run: apt-get install -y krb5-user
- name: Install XRootD client
run: apt-get -y install xrootd-client
- name: Configure large ccache
if: ${{ matrix.is_special }}
run: |
ccache -o max_size=5G
ccache -p || true
ccache -s || true
- name: Build wheels
uses: pypa/[email protected]
with:
output-dir: ${{ env.WORKDIR }}/wheelhouse
- name: Create PEP503-compliant wheel registry
run: |
python -m pip install --upgrade pip
python -m pip install simple503
simple503 ${{ env.WORKDIR }}/wheelhouse
- name: Upload wheel registry to github
uses: actions/upload-artifact@v4
with:
name: cibw-wheels-test
path: ${{ env.WORKDIR }}/wheelhouse/*
- name: Upload wheel to EOS
env:
RWEBEOS_KT: ${{ secrets.RWEBEOS_KT }}
KT_FILE_NAME: /tmp/decoded.keytab
EOS_PATH: /eos/project/r/root-eos/www/experimental-python-wheels
EOS_ENDPOINT: root://eosproject-r.cern.ch
KRB5CCNAME: /tmp/krb5cc
working-directory: ${{ env.WORKDIR }}
run: |
echo +++ Content
ls
echo +++ Retrieving the secret
echo ${RWEBEOS_KT} | base64 -d > ${KT_FILE_NAME}
echo +++ Creating the token
kinit -p ${{ secrets.KRB5USER }}@${{ secrets.KRB5REALM }} -kt ${KT_FILE_NAME}
echo +++ Running the copy
xrdcp -rf wheelhouse/* ${EOS_ENDPOINT}/${EOS_PATH}/