Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build WMCore services and publish them to pypy, usinig to tag pushes #11318

Merged
merged 1 commit into from
Oct 7, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions .github/workflows/pypy_build_publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# This workflow will build and upload WMCore core services to the production PYPY
# based on tag releases

on:
push:
tags:
- '*'

jobs:
build_and_publish_services:
strategy:
matrix:
target: [wmagent, wmagent-devtools, wmcore, reqmon, reqmgr2, global-workqueue, acdcserver, reqmgr2ms-unmerged,
reqmgr2ms-output, reqmgr2ms-rulecleaner, reqmgr2ms-transferor, reqmgr2ms-monitor]
uses: ./.github/workflows/pypy_build_publish_template.yaml
with:
wmcore_component: ${{ matrix.target }}
secrets:
pypy_token: ${{ secrets.PYPY_PRODUCTION }}
38 changes: 38 additions & 0 deletions .github/workflows/pypy_build_publish_template.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Reusable workflow to setup a specific WMCore component for pip

on:
workflow_call:
inputs:
wmcore_component:
required: true
type: string
secrets:
pypy_token:
required: true

jobs:
build_and_publish_from_template:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup python 3.8
uses: actions/setup-python@v3
with:
python-version: "3.8"
- name: Upgrade pip3
run: |
python3 -m pip install --upgrade pip
- name: Update the setup script template with package name
run: |
sed "s/PACKAGE_TO_BUILD/${{ inputs.wmcore_component }}/" setup_template.py > setup.py
- name: Create requirements file
run: |
cp requirements.txt requirements.wmcore.txt
awk "/(${{ inputs.wmcore_component }}$)|(${{ inputs.wmcore_component }},)/ {print \$1}" requirements.wmcore.txt > requirements.txt
- name: Build sdist
run: python setup.py clean sdist
- name: Publish component
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.pypy_token }}
amaltaro marked this conversation as resolved.
Show resolved Hide resolved