Skip to content
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
10 changes: 5 additions & 5 deletions .github/workflows/build-and-test-callable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ on:
python-version:
description: 'Python version'
type: string
default: '3.10'
default: '3.11'
mfem-branch:
description: 'MFEM branch to checkout'
type: string
Expand Down Expand Up @@ -90,10 +90,10 @@ jobs:
# -------------------------------------------------------------------------------------------------
- name: Install core dependencies via requirements.txt
run: |
pip install -U setuptools>=79.0.1
pip install -U numpy>=2.0.0
pip install -U cmake>=4.0.0
pip install -U swig>=4.4
pip install -U "setuptools>=80.0.1"
pip install -U "numpy>=2.4.1"
pip install -U "cmake>=4.0.0"
pip install -U "swig>=4.5"

#- name: Install chrpath on ubuntu
# if: inputs.os == 'ubuntu-latest'
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/build-and-test-dispatch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
fail-fast: false
matrix:
mfem-branch: [master, default] # 'default' uses a specific commit hash defined in setup.py:repos_sha
python-version: ['3.10', '3.11', '3.12', '3.13', '3.14']
python-version: ['3.11', '3.12', '3.13', '3.14']
parallel: [false]
name: test-linux | ${{ matrix.mfem-branch }} | ${{ matrix.python-version }} | ${{ matrix.parallel && 'parallel' || 'serial' }}
uses: ./.github/workflows/build-and-test-callable.yml
Expand All @@ -46,7 +46,7 @@ jobs:
fail-fast: false
matrix:
mfem-branch: [master, default] # 'default' uses a specific commit hash defined in setup.py:repos_sha
python-version: ['3.10', '3.11', '3.12', '3.13', '3.14']
python-version: ['3.11', '3.12', '3.13', '3.14']
parallel: [true]
name: test-linux | ${{ matrix.mfem-branch }} | ${{ matrix.python-version }} | ${{ matrix.parallel && 'parallel' || 'serial' }}
uses: ./.github/workflows/build-and-test-callable.yml
Expand All @@ -71,7 +71,7 @@ jobs:
with:
os: ubuntu-latest
mfem-branch: ${{ matrix.mfem-branch }}
python-version: '3.10'
python-version: '3.11'
parallel: ${{ matrix.parallel }}

# -------------------------------------------------------------------------------------------------
Expand Down
95 changes: 95 additions & 0 deletions .github/workflows/build-binary-callable.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
name: Build Linux binary release

on:
workflow_call:
inputs:
repository-url:
description: PyPI or TestPyPI upload endpoint.
type: string
required: true
secrets:
upload-token:
required: true

permissions:
contents: read

jobs:
make_sdist:
runs-on: ubuntu-latest
container: quay.io/pypa/manylinux_2_28_x86_64
steps:
- name: build_sdist
env:
TWINE_REPOSITORY_URL: ${{ inputs.repository-url }}
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.upload-token }}
TWINE_NON_INTERACTIVE: '1'
run: |
git clone https://github.com/mfem/PyMFEM.git
cd PyMFEM
REF=$(echo ${GITHUB_REF#refs/heads/})
echo "!!!!!: "$REF
git checkout $REF
export PATH=/opt/python/cp311-cp311/bin:$PATH

pip install setuptools
pip install -U packaging
pip3 install wheel six auditwheel twine
pip3 install "urllib3==1.26.6" # use older version to avoid OpenSSL vesion issue

rm -rf dist/*
python3 setup.py sdist
ls -l dist/
python3 -m twine upload --verbose dist/*
make_binary_3_11_12_13_14:
needs: make_sdist
strategy:
matrix:
pythonpath: ["cp311-cp311", "cp312-cp312", "cp313-cp313", "cp314-cp314"]

runs-on: ubuntu-latest
container: quay.io/pypa/manylinux_2_28_x86_64
steps:
- name: build package
env:
TWINE_REPOSITORY_URL: ${{ inputs.repository-url }}
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.upload-token }}
TWINE_NON_INTERACTIVE: '1'
run: |
echo It runs in the container instead of the VM.
git clone https://github.com/mfem/PyMFEM.git
cd PyMFEM
REF=$(echo ${GITHUB_REF#refs/heads/})
echo "!!!!!!: "$REF
git checkout $REF
ls -l /opt/python/
export PATH=/opt/python/${{ matrix.pythonpath }}/bin:$PATH

dnf install -y zlib-devel
pip3 install --upgrade pip setuptools packaging
pip3 wheel ./ --verbose --no-deps
pip3 install auditwheel twine
pip3 install "urllib3==1.26.6" # use older version to avoid OpenSSL vesion issue

CWD=$PWD

mkdir dist

# build wheel and check it
python3 -m pip wheel ./ --verbose --no-deps
pip3 install *.whl
cd test
python run_examples.py -serial -verbose -ex ex1
cd ..

rm -rf dist/*
export LD_LIBRARY_PATH=${CWD}/external/mfem/cmbuild_ser/:$LD_LIBRARY_PATH

auditwheel repair *.whl
rm -rf dist/*
mv wheelhouse/* dist/

ls -l dist/
python3 -m twine upload --verbose dist/*
18 changes: 17 additions & 1 deletion .github/workflows/build-macbinary-callable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,14 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ['3.10', '3.11', '3.12', '3.13', '3.14']
python-version: ['3.11', '3.12', '3.13', '3.14']
env:
MACOSX_DEPLOYMENT_TARGET: '14.0'
CMAKE_OSX_DEPLOYMENT_TARGET: '14.0'
CMAKE_OSX_ARCHITECTURES: arm64
ARCHFLAGS: '-arch arm64'
# Match wheel metadata to the ARM-only build, including with universal2 Python.
_PYTHON_HOST_PLATFORM: macosx-14.0-arm64
CC: clang
CXX: clang++
steps:
Expand All @@ -45,6 +47,7 @@ jobs:
run: |
test "$(uname -m)" = arm64
python -c "import platform; assert platform.machine() == 'arm64'"
python -c "import sysconfig; print('Wheel build platform:', sysconfig.get_platform())"
clang --version

- name: Install wheel tools
Expand All @@ -55,6 +58,19 @@ jobs:
set -o pipefail
python -m pip wheel . --verbose --no-deps --wheel-dir raw-wheels 2>&1 | tee build-macos.log

- name: Check raw wheel platform tag
run: |
python - <<'PY'
from pathlib import Path
from packaging.utils import parse_wheel_filename

wheels = list(Path('raw-wheels').glob('*.whl'))
assert len(wheels) == 1, wheels
print('Raw wheel:', wheels[0].name)
_, _, _, tags = parse_wheel_filename(wheels[0].name)
assert all(tag.platform == 'macosx_14_0_arm64' for tag in tags), tags
PY

- name: Repair wheel dependencies
run: |
delocate-wheel --verbose --require-archs arm64 --wheel-dir wheelhouse raw-wheels/*.whl
Expand Down
94 changes: 9 additions & 85 deletions .github/workflows/release_binary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,91 +2,15 @@ name: release_binary

on:
push:
#branches: [ action_test ]
tags: ["v*"]

jobs:
make_sdist:
runs-on: ubuntu-latest
container: quay.io/pypa/manylinux2014_x86_64
steps:
- name: build_sdist
run: |
echo This job does not specify a container.
echo It runs directly on the virtual machine.
#
git clone https://github.com/mfem/PyMFEM.git
cd PyMFEM
#
REF=$(echo ${GITHUB_REF#refs/heads/})
echo "!!!!!: "$REF
git checkout $REF
#
export PATH=/opt/python/cp39-cp39/bin:$PATH

pip install setuptools
pip install -U packaging
pip3 install wheel six auditwheel twine
pip3 install urllib3==1.26.6 # use older version to avoid OpenSSL vesion issue
pip3 install numpy==1.21.6
#if [ -f requirements.txt ]; then
# pip3 install -r requirements.txt
#fi

rm -rf dist/*
python3 setup.py sdist
ls -l dist/
#python3 -m twine upload --repository-url https://test.pypi.org/legacy/ --password ${{ secrets.TEST_PYPI_TOKEN }} --username __token__ --verbose dist/*
python3 -m twine upload --password ${{ secrets.PYPI_TOKEN }} --username __token__ --verbose dist/*
make_binary_3_10_11_12_13_14:
needs: make_sdist
strategy:
matrix:
pythonpath: ["cp310-cp310", "cp311-cp311", "cp312-cp312", "cp313-cp313", "cp314-cp314"]

runs-on: ubuntu-latest
container: quay.io/pypa/manylinux2014_x86_64
#container: node:10.16-jessie
steps:
- name: build package
run: |
echo It runs in the container instead of the VM.
#
git clone https://github.com/mfem/PyMFEM.git
cd PyMFEM
#
REF=$(echo ${GITHUB_REF#refs/heads/})
echo "!!!!!!: "$REF
git checkout $REF
#
ls -l /opt/python/
export PATH=/opt/python/${{ matrix.pythonpath }}/bin:$PATH

pip install setuptools
pip install -U packaging
pip3 install auditwheel twine
pip3 install urllib3==1.26.6 # use older version to avoid OpenSSL vesion issue

CWD=$PWD
yum install -y zlib-devel
#yum install -y chrpath
permissions:
contents: read

mkdir dist

# build wheel and check it
python3 -m pip wheel ./ --verbose --no-deps
pip3 install *.whl
cd test
python run_examples.py -serial -verbose -ex ex1
cd ..

rm -rf dist/*
export LD_LIBRARY_PATH=${CWD}/external/mfem/cmbuild_ser/:$LD_LIBRARY_PATH

auditwheel repair *.whl
rm -rf dist/*
mv wheelhouse/* dist/

ls -l dist/
#python3 -m twine upload --repository-url https://test.pypi.org/legacy/ --password ${{ secrets.TEST_PYPI_TOKEN }} --username __token__ --verbose dist/*
python3 -m twine upload --password ${{ secrets.PYPI_TOKEN }} --username __token__ --verbose dist/*
jobs:
linux-release:
uses: ./.github/workflows/build-binary-callable.yml
with:
repository-url: https://upload.pypi.org/legacy/
secrets:
upload-token: ${{ secrets.PYPI_TOKEN }}
93 changes: 9 additions & 84 deletions .github/workflows/testrelease_binary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,90 +2,15 @@ name: testrelease_binary

on:
push:
#branches: [ action_test ]
tags: ["test_*"]

jobs:
make_sdist:
runs-on: ubuntu-latest
container: quay.io/pypa/manylinux2014_x86_64
steps:
- name: build_sdist
run: |
echo This job does not specify a container.
echo It runs directly on the virtual machine.
#
git clone https://github.com/mfem/PyMFEM.git
cd PyMFEM
#
REF=$(echo ${GITHUB_REF#refs/heads/})
echo "!!!!!: "$REF
git checkout $REF
#
export PATH=/opt/python/cp39-cp39/bin:$PATH

pip install setuptools
pip install -U packaging
pip3 install wheel six auditwheel twine
pip3 install urllib3==1.26.6 # use older version to avoid OpenSSL vesion issue
pip3 install numpy==1.21.6
#if [ -f requirements.txt ]; then
# pip3 install -r requirements.txt
#fi

rm -rf dist/*
python3 setup.py sdist
ls -l dist/
python3 -m twine upload --repository-url https://test.pypi.org/legacy/ --password ${{ secrets.TEST_PYPI_TOKEN }} --username __token__ --verbose dist/*
make_binary_3_10_11_12_13_14:
needs: make_sdist
strategy:
matrix:
pythonpath: ["cp310-cp310", "cp311-cp311", "cp312-cp312", "cp313-cp313", "cp314-cp314"]

runs-on: ubuntu-latest
container: quay.io/pypa/manylinux2014_x86_64
#container: node:10.16-jessie
steps:
- name: build package
run: |
echo It runs in the container instead of the VM.
#
git clone https://github.com/mfem/PyMFEM.git
cd PyMFEM
#
REF=$(echo ${GITHUB_REF#refs/heads/})
echo "!!!!!!: "$REF
git checkout $REF
#
ls -l /opt/python/
export PATH=/opt/python/${{ matrix.pythonpath }}/bin:$PATH

pip install setuptools
pip install -U packaging
pip3 install auditwheel twine
pip3 install urllib3==1.26.6 # use older version to avoid OpenSSL vesion issue

CWD=$PWD
yum install -y zlib-devel
#yum install -y chrpath
permissions:
contents: read

mkdir dist

# build wheel and check it
python3 -m pip wheel ./ --verbose --no-deps
pip3 install *.whl
cd test
python run_examples.py -serial -verbose -ex ex1
cd ..

rm -rf dist/*
export LD_LIBRARY_PATH=${CWD}/external/mfem/cmbuild_ser/:$LD_LIBRARY_PATH

auditwheel repair *.whl
rm -rf dist/*
mv wheelhouse/* dist/

ls -l dist/
python3 -m twine upload --repository-url https://test.pypi.org/legacy/ --password ${{ secrets.TEST_PYPI_TOKEN }} --username __token__ --verbose dist/*
#python3 -m twine upload --password ${{ secrets.PYPI_TOKEN }} --username __token__ --verbose dist/*
jobs:
linux-release:
uses: ./.github/workflows/build-binary-callable.yml
with:
repository-url: https://test.pypi.org/legacy/
secrets:
upload-token: ${{ secrets.TEST_PYPI_TOKEN }}
Loading
Loading