Skip to content

[force ci]

[force ci] #860

Workflow file for this run

name: build
on: [push, pull_request]
jobs:
generate_python_markdown_readme:
name: generate README.md for python package
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- package: PyTAT
- package: tnsp_bridge
- package: lazy_graph
- package: tetragono
- package: tetraku
- package: PyScalapack
steps:
- name: checkout
uses: actions/checkout@v3
- name: install emacs
run: sudo apt-get install -y emacs
- name: export to markdown
run: emacs ${{matrix.package}}/README.org --batch -f org-md-export-to-markdown --kill
- name: upload to artifact
uses: actions/upload-artifact@v3
with:
name: README-of-${{matrix.package}}
path: ${{matrix.package}}/README.md
build_pytat_wheels:
name: build PyTAT wheels
runs-on: ${{ matrix.os }}
needs: [generate_python_markdown_readme]
strategy:
fail-fast: false
matrix:
include:
- os: windows-latest
python: 310
platform_id: win_amd64
win_arch: x64_windows
- os: windows-latest
python: 310
platform_id: win_arm64
win_arch: arm64_windows
steps:
- name: checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: recovery tag information
run: git fetch --tags --force
- name: get pybind11
uses: actions/checkout@v3
with:
repository: pybind/pybind11
path: pybind11
- name: setup python
uses: actions/setup-python@v4
with:
python-version: "3.x"
- name: install cibuildwheel
run: python -m pip install cibuildwheel
- name: download artifacts for PyTAT
uses: actions/download-artifact@v3
with:
name: README-of-PyTAT
path: PyTAT
- name: build wheel for PyTAT
env:
CIBW_TEST_REQUIRES: pytest
CIBW_TEST_COMMAND: pytest {project}/PyTAT/tests
CIBW_TEST_SKIP: "*-macosx_arm64 *-win_arm64"
CIBW_BUILD: cp${{ matrix.python }}-${{ matrix.platform_id }}
CIBW_ARCHS: all
CIBW_BEFORE_ALL_LINUX: yum install -y openblas-devel || apk add openblas-dev
CIBW_BEFORE_ALL_WINDOWS: vcpkg install openblas:${{ matrix.win_arch }} && choco install -y ninja
CIBW_BEFORE_ALL_MACOS: ""
CIBW_ENVIRONMENT_LINUX: MAKEFLAGS=--parallel=2
CIBW_ENVIRONMENT_WINDOWS: MAKEFLAGS=--parallel=2 CMAKEFLAGS="-GNinja|-DCMAKE_CXX_COMPILER=clang++|-DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake|-DCMAKE_CXX_COMPILER_TARGET=arm64-windows"
CIBW_ENVIRONMENT_MACOS: MAKEFLAGS=--parallel=3 CMAKEFLAGS="-DCMAKE_OSX_ARCHITECTURES=${{ matrix.mac_arch }}"
CIBW_REPAIR_WHEEL_COMMAND_WINDOWS: cmd /c python -m pip install delvewheel && python -m delvewheel repair --wheel-dir {dest_dir} {wheel} --add-path bin
CIBW_BUILD_VERBOSITY: 1
run: python -m cibuildwheel PyTAT --output-dir dist
- name: upload artifact
uses: actions/upload-artifact@v3
with:
path: dist/*.whl