v1.5.1 #153
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build&Upload | |
on: | |
workflow_dispatch: | |
release: | |
types: [published] | |
jobs: | |
build_sdist: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
name: Install Python | |
with: | |
python-version: '3.11' | |
- name: Install dependencies | |
run: | | |
pip install --upgrade pip wheel setuptools build | |
- name: Build sdist | |
run: | | |
python -m build --sdist --outdir ./dist | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: WHEEL | |
path: dist/*.tar.gz | |
retention-days: 30 | |
build_wheels_linux_x86_64: | |
name: Build wheels linux x86_64 | |
runs-on: ubuntu-latest | |
container: ${{matrix.container}} | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- python: /opt/python/cp38-cp38/bin/python | |
container: ghcr.io/openjij/openjij-builder-minimum-manylinux_2_28_x86_64:latest | |
- python: /opt/python/cp39-cp39/bin/python | |
container: ghcr.io/openjij/openjij-builder-minimum-manylinux_2_28_x86_64:latest | |
- python: /opt/python/cp310-cp310/bin/python | |
container: ghcr.io/openjij/openjij-builder-minimum-manylinux_2_28_x86_64:latest | |
- python: /opt/python/cp311-cp311/bin/python | |
container: ghcr.io/openjij/openjij-builder-minimum-manylinux_2_28_x86_64:latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Get Python Version | |
shell: bash | |
run: | | |
set -eux | |
ls /opt/python | |
${{matrix.python}} --version > python_version.txt | |
cat python_version.txt | |
- name: Pip-Tools | |
shell: bash | |
run: | | |
set -eux | |
${{matrix.python}} -m pip install pip-tools | |
${{matrix.python}} -m piptools compile setup.cfg | |
${{matrix.python}} -m piptools compile build-requirements.in | |
- uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cache/pip | |
/var/cache/dnf/ | |
key: ${{ runner.os }}-intel-${{ hashFiles('python_version.txt') }}-${{ hashFiles('requirements.txt') }}-${{ hashFiles('build-requirements.txt') }} | |
restore-keys: | | |
${{ runner.os }}-intel-${{ hashFiles('python_version.txt') }}-${{ hashFiles('requirements.txt') }}-${{ hashFiles('build-requirements.txt') }} | |
${{ runner.os }}-intel-${{ hashFiles('python_version.txt') }}-${{ hashFiles('requirements.txt') }} | |
${{ runner.os }}-intel-${{ hashFiles('python_version.txt') }} | |
${{ runner.os }}-intel- | |
- name: Install Dependencies | |
shell: bash | |
run: | | |
set -eux | |
${{matrix.python}} -m piptools sync requirements.txt build-requirements.txt | |
- name: Build | |
run: | | |
set -x | |
echo "::group::Set Intel oneAPI" | |
mkdir -p /tmp/tmp | |
touch /tmp/tmp/config.txt | |
echo "" >> /tmp/tmp/config.txt | |
source /opt/intel/oneapi/compiler/latest/env/vars.sh | |
source /opt/intel/oneapi/mkl/latest/env/vars.sh | |
source /opt/intel/oneapi/setvars.sh --force --config="/tmp/tmp/config.txt" | |
du -a /opt/intel/oneapi/compiler/latest/linux/bin | |
echo "::endgroup::" | |
echo "::group::BUILD" | |
export CIBUILDWHEEL=1 | |
export CC=icx | |
export CXX=icpx | |
export FC=ifx | |
export CFLAGS='-march=haswell -mtune=skylake' | |
export CXXFLAGS='-march=haswell -mtune=skylake' | |
export FFLAGS='-march=haswell -mtune=skylake' | |
${{matrix.python}} -m build --wheel --outdir ./dist | |
echo "::endgroup::" | |
#. /opt/intel/oneapi/setvars.sh --force --config="config.txt" | |
# export FC=ifx | |
- name: Show Files | |
id: wheel | |
shell: bash | |
run: | | |
set -x | |
source /opt/intel/oneapi/setvars.sh --force --config="/tmp/tmp/config.txt" | |
${{matrix.python}} -m auditwheel -h | |
${{matrix.python}} -m auditwheel show -h | |
${{matrix.python}} -m auditwheel repair -h | |
du -ah ./dist | |
cd dist | |
for f in *.whl; do ${{matrix.python}} -m auditwheel show $f; done | |
for f in *.whl; do ${{matrix.python}} -m auditwheel repair -w ../wheelhouse $f; done | |
cd ../wheelhouse | |
du -ah ./ | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: WHEEL | |
path: ./wheelhouse/*.whl | |
retention-days: 30 | |
build_wheels_linux_x86_64_old: | |
name: Build wheels linux x86_64 Old | |
runs-on: ubuntu-latest | |
container: ${{matrix.container}} | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- python: /opt/python/cp38-cp38/bin/python | |
container: ghcr.io/openjij/openjij-builder-minimum-manylinux2014_x86_64:latest | |
- python: /opt/python/cp39-cp39/bin/python | |
container: ghcr.io/openjij/openjij-builder-minimum-manylinux2014_x86_64:latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Get Python Version | |
shell: bash | |
run: | | |
set -eux | |
ls /opt/python | |
${{matrix.python}} --version > python_version.txt | |
cat python_version.txt | |
- name: Pip-Tools | |
shell: bash | |
run: | | |
set -eux | |
${{matrix.python}} -m pip install pip-tools | |
${{matrix.python}} -m piptools compile setup.cfg | |
${{matrix.python}} -m piptools compile build-requirements.in | |
- uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cache/pip | |
/var/cache/yum/ | |
key: ${{ runner.os }}-intel-${{ hashFiles('python_version.txt') }}-${{ hashFiles('requirements.txt') }}-${{ hashFiles('build-requirements.txt') }} | |
restore-keys: | | |
${{ runner.os }}-intel-${{ hashFiles('python_version.txt') }}-${{ hashFiles('requirements.txt') }}-${{ hashFiles('build-requirements.txt') }} | |
${{ runner.os }}-intel-${{ hashFiles('python_version.txt') }}-${{ hashFiles('requirements.txt') }} | |
${{ runner.os }}-intel-${{ hashFiles('python_version.txt') }} | |
${{ runner.os }}-intel- | |
- name: Install Dependencies | |
shell: bash | |
run: | | |
set -eux | |
${{matrix.python}} -m piptools sync requirements.txt build-requirements.txt | |
- name: Build | |
run: | | |
set -x | |
echo "::group::Set Intel oneAPI" | |
mkdir -p /tmp/tmp | |
touch /tmp/tmp/config.txt | |
echo "" >> /tmp/tmp/config.txt | |
source /opt/intel/oneapi/compiler/latest/env/vars.sh | |
source /opt/intel/oneapi/mkl/latest/env/vars.sh | |
source /opt/intel/oneapi/setvars.sh --force --config="/tmp/tmp/config.txt" | |
du -a /opt/intel/oneapi/compiler/latest/linux/bin | |
echo "::endgroup::" | |
echo "::group::BUILD" | |
export CIBUILDWHEEL=1 | |
export CC=icx | |
export CXX=icpx | |
export FC=ifx | |
export CFLAGS='-march=haswell -mtune=skylake' | |
export CXXFLAGS='-march=haswell -mtune=skylake' | |
export FFLAGS='-march=haswell -mtune=skylake' | |
${{matrix.python}} -m build --wheel --outdir ./dist | |
echo "::endgroup::" | |
#. /opt/intel/oneapi/setvars.sh --force --config="config.txt" | |
# export FC=ifx | |
- name: Show Files | |
id: wheel | |
shell: bash | |
run: | | |
set -x | |
source /opt/intel/oneapi/setvars.sh --force --config="/tmp/tmp/config.txt" | |
${{matrix.python}} -m auditwheel -h | |
${{matrix.python}} -m auditwheel show -h | |
${{matrix.python}} -m auditwheel repair -h | |
du -ah ./dist | |
cd dist | |
for f in *.whl; do ${{matrix.python}} -m auditwheel show $f; done | |
for f in *.whl; do ${{matrix.python}} -m auditwheel repair -w ../wheelhouse $f; done | |
cd ../wheelhouse | |
du -ah ./ | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: WHEEL | |
path: ./wheelhouse/*.whl | |
retention-days: 30 | |
build_wheels_linux_aarch64: | |
name: Build wheels linux aarch64 ${{matrix.CIBW_BUILD}} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- os: ubuntu-latest | |
arch: aarch64 | |
CIBW_BUILD: cp38-manylinux_aarch64 | |
- os: ubuntu-latest | |
arch: aarch64 | |
CIBW_BUILD: cp39-manylinux_aarch64 | |
- os: ubuntu-latest | |
arch: aarch64 | |
CIBW_BUILD: cp310-manylinux_aarch64 | |
- os: ubuntu-latest | |
arch: aarch64 | |
CIBW_BUILD: cp311-manylinux_aarch64 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up QEME | |
uses: docker/setup-qemu-action@v2 | |
with: | |
platforms: all | |
- name: Set up Docker Buildx | |
id: buildx | |
uses: docker/setup-buildx-action@v2 | |
with: | |
install: true | |
- name: Build wheels on ${{matrix.arch}} | |
uses: pypa/cibuildwheel@v2.15.0 | |
env: | |
CIBW_BUILD: ${{matrix.CIBW_BUILD}} | |
CIBW_ENVIRONMENT: "" | |
CIBW_PLATFORM: linux | |
CIBW_ARCHS: ${{matrix.arch}} | |
CIBW_BEFORE_ALL_LINUX: > | |
dnf config-manager --set-enabled powertools && | |
dnf makecache --refresh && | |
dnf -y --enablerepo=powertools install openblas-static && | |
dnf -y --enablerepo=powertools install lapack-static && | |
dnf -y install gcc-toolset-11 && | |
dnf -y --enablerepo=powertools install eigen3-devel | |
CIBW_BEFORE_BUILD_LINUX: > | |
source scl_source enable gcc-toolset-11 && | |
pip install pybind11 cmake ninja | |
CIBW_PROJECT_REQUIRES_PYTHON: ">=3.8" | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: WHEEL | |
path: ./wheelhouse/*.whl | |
retention-days: 30 | |
build_wheels_macos: | |
name: Build wheels macos ${{ matrix.arch }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- os: macos-latest | |
arch: x86_64 | |
CIBW_PLATFORM: macos | |
CIBW_ENVIRONMENT: "MACOSX_DEPLOYMENT_TARGET='12.0'" | |
- os: macos-latest | |
arch: x86_64 | |
CIBW_PLATFORM: macos | |
CIBW_ENVIRONMENT: "MACOSX_DEPLOYMENT_TARGET='11.0' CFLAGS='-mtune=skylake' CXXFLAGS='-mtune=skylake'" | |
- os: macos-latest | |
arch: x86_64 | |
CIBW_PLATFORM: macos | |
CIBW_ENVIRONMENT: "MACOSX_DEPLOYMENT_TARGET='10.16' CFLAGS='-mtune=skylake' CXXFLAGS='-mtune=skylake'" | |
- os: macos-latest | |
arch: arm64 | |
CIBW_PLATFORM: macos | |
CIBW_ENVIRONMENT: "MACOSX_DEPLOYMENT_TARGET='12.0'" | |
- os: macos-latest | |
arch: arm64 | |
CIBW_PLATFORM: macos | |
CIBW_ENVIRONMENT: "MACOSX_DEPLOYMENT_TARGET='11.0'" | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install Dependency | |
shell: bash | |
run: | | |
set -eux | |
brew install eigen nlohmann-json | |
- name: Build wheels on ${{ matrix.CIBW_PLATFORM }} ${{matrix.arch}} | |
uses: pypa/cibuildwheel@v2.15.0 | |
env: | |
CIBW_ENVIRONMENT: ${{ matrix.CIBW_ENVIRONMENT }} | |
CIBW_PLATFORM: ${{ matrix.CIBW_PLATFORM }} | |
CIBW_ARCHS: ${{matrix.arch}} | |
CIBW_PROJECT_REQUIRES_PYTHON: ">=3.8" | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: WHEEL | |
path: ./wheelhouse/*.whl | |
retention-days: 30 | |
build_wheels_windows: | |
name: Build wheels windows ${{ matrix.arch }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- os: windows-latest | |
arch: AMD64 | |
CIBW_PLATFORM: windows | |
CIBW_ENVIRONMENT: "CFLAGS='-march=haswell -mtune=skylake' CXXFLAGS='-march=haswell -mtune=skylake' CMAKE_TOOLCHAIN_FILE='C:/vcpkg/scripts/buildsystems/vcpkg.cmake'" | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Add msbuild to PATH | |
if: ${{ matrix.os == 'windows-latest'}} | |
uses: microsoft/setup-msbuild@v1.3.1 | |
- name: Prepare Cache | |
if: ${{ matrix.os == 'windows-latest'}} | |
shell: bash | |
run: | | |
set -eux | |
ls C:/vcpkg | |
MSBuild.exe -version > msbuild_version.txt | |
cat msbuild_version.txt | |
- name: Cache vcpkg | |
uses: actions/cache@v3 | |
if: ${{ matrix.os == 'windows-latest'}} | |
with: | |
path: | | |
C:/Users/runneradmin/AppData/Local/vcpkg/archives | |
key: ${{ matrix.os }}-vcpkg-${{ hashFiles('msbuild_version.txt') }} | |
restore-keys: | | |
${{ matrix.os }}-vcpkg-${{ hashFiles('msbuild_version.txt') }} | |
${{ matrix.os }}-vcpkg | |
- name: Install Dependency | |
shell: bash | |
run: | | |
set -eux | |
vcpkg update | |
vcpkg --triplet x64-windows-static install eigen3 | |
vcpkg --triplet x64-windows install eigen3 | |
vcpkg --triplet x64-windows-static install nlohmann-json | |
vcpkg --triplet x64-windows install nlohmann-json | |
vcpkg integrate install | |
- name: Build wheels on ${{ matrix.CIBW_PLATFORM }} ${{matrix.arch}} | |
uses: pypa/cibuildwheel@v2.15.0 | |
env: | |
CIBW_ENVIRONMENT: ${{ matrix.CIBW_ENVIRONMENT }} | |
CIBW_PLATFORM: ${{ matrix.CIBW_PLATFORM }} | |
CIBW_ARCHS: ${{matrix.arch}} | |
CIBW_PROJECT_REQUIRES_PYTHON: ">=3.8" | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: WHEEL | |
path: ./wheelhouse/*.whl | |
retention-days: 30 | |
upload_pypi: | |
needs: [build_wheels_linux_x86_64, build_wheels_linux_x86_64_old, build_wheels_linux_aarch64, build_wheels_macos, build_wheels_windows, build_sdist] | |
runs-on: ubuntu-latest | |
if: ${{github.event_name == 'release'}} | |
steps: | |
- uses: actions/download-artifact@v3 | |
with: | |
name: WHEEL | |
path: ./dist | |
- uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
user: ${{ secrets.PYPI_USERNAME }} | |
password: ${{ secrets.PYPI_PASSWORD }} | |
packages_dir: ./dist | |
verify_metadata: true | |
skip_existing: false | |
verbose: true |