Skip to content

Commit

Permalink
chore: Update test-meson workflow to install gfortran and gnu-sed
Browse files Browse the repository at this point in the history
  • Loading branch information
sunt05 committed May 15, 2024
1 parent 03c6727 commit 987875d
Show file tree
Hide file tree
Showing 2 changed files with 89 additions and 89 deletions.
22 changes: 11 additions & 11 deletions .github/workflows/test-meson.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,21 +65,21 @@ jobs:
meson setup build
meson compile -C build
# - name: Build wheels
# uses: pypa/[email protected]
# env:
# # SETUPTOOLS_USE_DISTUTILS: stdlib
# CC: gcc
# CXX: g++
# with:
# package-dir: ./src/supy
# output-dir: wheelhouse
# config-file: ./src/supy/pyproject.toml
- name: Build wheels
uses: pypa/[email protected]
env:
# SETUPTOOLS_USE_DISTUTILS: stdlib
CC: gcc
CXX: g++
with:
# package-dir: ./src/supy
output-dir: wheelhouse
# config-file: ./src/supy/pyproject.toml

# - name: Setup tmate session for debugging
# if: failure()
# uses: mxschmitt/action-tmate@v3
# timeout-minutes: 15
# timeout-minutes: 5

# - name: upload wheels
# uses: actions/upload-artifact@v3
Expand Down
156 changes: 78 additions & 78 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ requires = [
"f90wrap==0.2.14",
"setuptools>60",
"oldest-supported-numpy",
"setuptools-git-versioning",
"setuptools_scm[toml]>=6.2,<8",
# "setuptools-git-versioning",
# "setuptools_scm[toml]>=6.2,<8",
"meson-python>=0.12.0",
]

Expand Down Expand Up @@ -72,79 +72,79 @@ suews-run = "supy.cmd.SUEWS:SUEWS"
suews-convert = "supy.cmd.table_converter:convert_table_cmd"


[tool.setuptools_scm]
write_to = "src/supy/_version_scm.py"
root = "."
local_scheme = "no-local-version"


[tool.cibuildwheel]
# skip 32-bit and pypy builds
skip = ["*-win32", "*-manylinux_i686", "pp*", '*-musllinux*']
# build-frontend = "pip"
before-build = ["git describe --tags --always --dirty"]

# Increase pip debugging output
build-verbosity = 0

test-requires = "pytest"

# only test on python 3.9
# test-skip = [
# # "*win*",
# # "*manylinux*",
# # "cp38*-*",
# # "cp31*-*",
# ]

[tool.cibuildwheel.linux]
# Install system library
before-build = [
"yum install -y glibc-static",
"python3 -m pip install f90wrap oldest-supported-numpy",
"make -C '{package}' clean",
"make -C '{package}' driver",
"echo $ARCHFLAGS",
"file '{package}'/supy/_supy_driver*.so",
"echo '===> numpy version:', $(python3 -c 'import numpy; print(numpy.__version__)')",
"echo '===> gfortran version:', $(gfortran --version)",
]
test-command = "TEST_DATA_DIR='{project}/src/supy/supy/test/data_test' pytest -s '{package}/supy/test'"
archs = ["auto64"]

[tool.cibuildwheel.macos]
before-build = [
'ln -sf "$(which gfortran-13)" /usr/local/bin/gfortran',
"python3 -m pip install f90wrap==0.2.14 oldest-supported-numpy",
"make -C '{package}' driver",
"echo '===> numpy version:', $(python3 -c 'import numpy; print(numpy.__version__)')",
"echo '===> gfortran version:', $(gfortran --version)",
"echo $ARCHFLAGS",
]
test-command = "TEST_DATA_DIR='{project}/src/supy/supy/test/data_test' pytest -s '{package}/supy/test'"

# archs = ["universal2"]
# build-verbosity = 10
archs = ["auto"] # skip this for now in gh actions as it takes too long
skip = ['pp*']

repair-wheel-command = "delocate-wheel --require-archs {delocate_archs} -w {dest_dir} -v {wheel}"


[tool.cibuildwheel.windows]
before-build = [
"cd {package}",
"where python",
"python -m pip install oldest-supported-numpy charset_normalizer f90wrap delvewheel",
"python -v",
"python build-win-def.py",
"make driver",
"echo '===> numpy version:', $(python3 -c 'import numpy; print(numpy.__version__)')",
"echo '===> gfortran version:', $(gfortran --version)",
# 'python -c "import numpy; print(numpy.__version__)"',
# "python setup.py build_ext --inplace --compiler=mingw32",
# "ls -l .",
]
archs = ["auto64"]
test-command = 'set "TEST_DATA_DIR={project}/src/supy/supy/test/data_test" && pytest -s "{package}/supy/test"'
repair-wheel-command = "delvewheel repair -w {dest_dir} {wheel}"
# [tool.setuptools_scm]
# write_to = "src/supy/_version_scm.py"
# root = "."
# local_scheme = "no-local-version"


# [tool.cibuildwheel]
# # skip 32-bit and pypy builds
# skip = ["*-win32", "*-manylinux_i686", "pp*", '*-musllinux*']
# # build-frontend = "pip"
# before-build = ["git describe --tags --always --dirty"]

# # Increase pip debugging output
# build-verbosity = 0

# test-requires = "pytest"

# # only test on python 3.9
# # test-skip = [
# # # "*win*",
# # # "*manylinux*",
# # # "cp38*-*",
# # # "cp31*-*",
# # ]

# [tool.cibuildwheel.linux]
# # Install system library
# before-build = [
# "yum install -y glibc-static",
# "python3 -m pip install f90wrap oldest-supported-numpy",
# "make -C '{package}' clean",
# "make -C '{package}' driver",
# "echo $ARCHFLAGS",
# "file '{package}'/supy/_supy_driver*.so",
# "echo '===> numpy version:', $(python3 -c 'import numpy; print(numpy.__version__)')",
# "echo '===> gfortran version:', $(gfortran --version)",
# ]
# # test-command = "TEST_DATA_DIR='{project}/src/supy/supy/test/data_test' pytest -s '{package}/supy/test'"
# archs = ["auto64"]

# [tool.cibuildwheel.macos]
# before-build = [
# 'ln -sf "$(which gfortran-13)" /usr/local/bin/gfortran',
# # "python3 -m pip install f90wrap==0.2.14 oldest-supported-numpy",
# # "make -C '{package}' driver",
# "echo '===> numpy version:', $(python3 -c 'import numpy; print(numpy.__version__)')",
# "echo '===> gfortran version:', $(gfortran --version)",
# "echo $ARCHFLAGS",
# ]
# # test-command = "TEST_DATA_DIR='{project}/src/supy/supy/test/data_test' pytest -s '{package}/supy/test'"

# # archs = ["universal2"]
# # build-verbosity = 10
# archs = ["auto"] # skip this for now in gh actions as it takes too long
# skip = ['pp*']

# repair-wheel-command = "delocate-wheel --require-archs {delocate_archs} -w {dest_dir} -v {wheel}"


# [tool.cibuildwheel.windows]
# before-build = [
# "cd {package}",
# "where python",
# "python -m pip install oldest-supported-numpy charset_normalizer f90wrap delvewheel",
# "python -v",
# "python build-win-def.py",
# "make driver",
# "echo '===> numpy version:', $(python3 -c 'import numpy; print(numpy.__version__)')",
# "echo '===> gfortran version:', $(gfortran --version)",
# # 'python -c "import numpy; print(numpy.__version__)"',
# # "python setup.py build_ext --inplace --compiler=mingw32",
# # "ls -l .",
# ]
# archs = ["auto64"]
# # test-command = 'set "TEST_DATA_DIR={project}/src/supy/supy/test/data_test" && pytest -s "{package}/supy/test"'
# repair-wheel-command = "delvewheel repair -w {dest_dir} {wheel}"

0 comments on commit 987875d

Please sign in to comment.