Skip to content

redo GHA

redo GHA #108

Workflow file for this run

name: epicscorelibs

Check failure on line 1 in .github/workflows/build.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/build.yml

Invalid workflow file

(Line: 270, Col: 13): Unrecognized named-value: 'secrets'. Located at position 1 within expression: secrets.PYPI_USERNAME && github.event_name=='push' && github.ref=='refs/heads/master'
on: [push, pull_request, workflow_dispatch]
defaults:
run:
shell: bash
jobs:
manylinux:
name: ML ${{ matrix.py }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
# see compat matrix: https://github.com/pypa/manylinux
- ml: manylinux1_x86_64
py: cp27-cp27m
cy: "Cython<3.0"
skip: true
- ml: manylinux2010_x86_64
py: cp37-cp37m
skip: true
- ml: manylinux2014_x86_64
py: cp38-cp38
- ml: manylinux2014_x86_64
py: cp39-cp39
- ml: manylinux2014_x86_64
py: cp310-cp310
- ml: manylinux2014_x86_64
py: cp311-cp311
- ml: manylinux2014_x86_64
py: cp312-cp312
- ml: manylinux2014_x86_64
py: cp313-cp313
- ml: manylinux2014_x86_64
py: cp313-cp313t
- ml: manylinux_2_28
py: cp314-cp314
- ml: manylinux_2_28
py: cp314-cp314t
src: true
steps:
- uses: actions/checkout@v6
with:
submodules: recursive
- name: Detect pre-release
run: python ./gha-set-pre.py
- name: Build
run: |
# emit script to be executed in container.
cat <<EOF > runit.sh
#!/bin/sh
set -e -x
ls /opt/python/
/opt/python/${{ matrix.py }}/bin/python --version
export PATH="/opt/python/${{ matrix.py }}/bin:\$PATH"
export SETUPTOOLS_DSO_PLAT_NAME="${{ matrix.ml }}"
cd /io
pip install -U pip
# pre-download for later steps
pip download $PRE -d output \
--only-binary numpy \
--only-binary Cython \
"${{ matrix.cy || 'Cython' }}" \
setuptools_dso wheel numpy ply nose2
# create source tar
pip install --no-index -f ./output setuptools_dso
python setup.py sdist -d ./output
ls -lh output
# build wheel from source tar
pip wheel -w ./output --no-index -f ./output epicscorelibs
ls -lh output
# install wheel for testing
pip install --no-index -f ./output epicscorelibs nose2
# switch away from root when running test to avoid inclusion in PYTHONPATH
cd output
python -m nose2 -v epicscorelibs
EOF
# end of script. Now execute in container
chmod +x runit.sh
mkdir output
podman run --rm \
-v `pwd`:/io \
quay.io/pypa/${{ matrix.ml }} \
/io/runit.sh
- name: Result
run: ls -lhtr output
- name: Save wheels
if: ${{ ! matrix.skip }}
uses: actions/upload-artifact@v6
with:
retention-days: 1
name: whl-${{ matrix.py }}-${{ matrix.ml }}
path: output/epicscorelibs*.whl
- name: Save source
if: ${{ matrix.src }}
uses: actions/upload-artifact@v6
with:
retention-days: 1
name: whl-source
path: output/epicscorelibs*.gz
native:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: windows-latest
py: "3.8"
arch: win_amd64
# windows + 3.9 omitted due to numpy bug "invalid preprocessor command 'warning'"
- os: windows-latest
py: "3.10"
arch: win_amd64
- os: windows-latest
py: "3.11"
arch: win_amd64
- os: windows-latest
py: "3.12"
arch: win_amd64
- os: windows-latest
py: "3.13"
arch: win_amd64
- os: windows-latest
py: "3.14"
arch: win_amd64
- os: macos-latest
py: "3.8"
arch: macosx_11_0_universal2
- os: macos-latest
py: "3.9"
arch: macosx_11_0_universal2
- os: macos-latest
py: "3.10"
arch: macosx_11_0_universal2
- os: macos-latest
py: "3.11"
arch: macosx_11_0_universal2
- os: macos-latest
py: "3.12"
arch: macosx_11_0_universal2
- os: macos-latest
py: "3.13"
arch: macosx_11_0_universal2
- os: macos-latest
py: "3.14"
arch: macosx_11_0_universal2
steps:
- uses: actions/checkout@v6
with:
submodules: recursive
- uses: actions/setup-python@v6
with:
python-version: ${{ matrix.py }}
- name: Prepare
run: python -m pip install -U pip virtualenv
- name: PIP Debug
run: pip debug -v
- name: Detect pre-release
run: python ./gha-set-pre.py
- name: Build
run: |
set -x -e
python -m pip install -U pip
pip download $PRE -d output \
--only-binary numpy \
--only-binary Cython \
Cython setuptools_dso wheel numpy ply nose2
export SETUPTOOLS_DSO_PLAT_NAME=${{ matrix.arch }}
pip install --no-index -f ./output setuptools_dso
python setup.py sdist -d ./output
ls -lh output
# build wheel from source tar
pip wheel -w ./output --no-index -f ./output epicscorelibs
ls -lh output
# install wheel for testing
pip install --no-index -f ./output epicscorelibs nose2
# switch away from root when running test to avoid inclusion in PYTHONPATH
cd output
python -m nose2 -v epicscorelibs
- run: ls -lhtr output
- name: Save wheels
if: ${{ ! matrix.skip }}
uses: actions/upload-artifact@v6
with:
retention-days: 1
name: whl-${{ matrix.py }}-${{ matrix.os }}
path: output/epicscorelibs*.whl
combine:
runs-on: ubuntu-latest
needs: [manylinux, native]
steps:
- name: Download
uses: actions/download-artifact@v7
with:
merge-multiple: true
- run: ls -lhtr
- uses: actions/setup-python@v6
with:
python-version: 3.11
- name: Setup
run: |
pip install -U pip twine
python -m twine -h
- name: Check
run: twine check epicscorelibs*.gz epicscorelibs*.whl
- name: Upload wheels
if: secrets.PYPI_USERNAME && github.event_name=='push' && github.ref=='refs/heads/master'
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: twine upload --skip-existing epicscorelibs*.gz epicscorelibs*.whl