diff --git a/.ci/build_wheel.py b/.ci/build_wheel.py index 260c796c1e..358e3a05ea 100644 --- a/.ci/build_wheel.py +++ b/.ci/build_wheel.py @@ -15,7 +15,8 @@ "win": "win_amd64", "manylinux1": "manylinux1_x86_64", "manylinux_2_17": "manylinux_2_17_x86_64", - "linux": "manylinux_2_17_x86_64", # Accommodate tox.ini platform substitutions + # Accommodate tox.ini automatic platform substitutions + "linux": "manylinux_2_17_x86_64", "win32": "win_amd64", "darwin": "any", } diff --git a/tox.ini b/tox.ini index 697a6eab17..53547a5c0f 100644 --- a/tox.ini +++ b/tox.ini @@ -1,15 +1,18 @@ # This is work in progress, testing workflow in local/CI is gradually being transferred to tox # Usage instructions: + # `tox` will run all tests sequentially, `tox --parallel` will run all tests in parallel (much faster). # Run specific selection of tests with `tox -e pretest,,posttest` e.g., `tox -e pretest,test-api,test-launcher,posttest` # `--parallel` flag can be passed when running specific selections. +# For packaging, build wheels for specific platform with `tox -e build-wheel -- `. +# If `tox -e build-wheel` is run without passing a platform, tox will automatically build the ffl wheels based on the operating system +# on which it is executing: windows -> "win_amd64", linux -> "manylinux_2_17_x86_64", mac -> "any" + [tox] description = Default tox environment list and core configurations -# List all tests to run in parallel or sequential mode here -# So invocation can be specified as `tox`/`tox --parallel` to run all tests in sequential/parallel mode envlist = pretest,test-{api,launcher,server,local_server,multi_server,remote_workflow,remote_operator,workflow,service,operators},posttest isolated_build_env = build @@ -24,17 +27,6 @@ pass_env = ANSYSLMD_LICENSE_FILE AWP_ROOT242 -package = external # To allow custom wheel builds - -[testenv:build_external] -description = Environment for custom build of package wheels, solves PyDPF custom wheel building requirement - -package_glob = {toxinidir}{/}dist{/}ansys_dpf_core* - -# {on_platform} substitution to automatically detect os type. -commands = - python .ci/build_wheel.py -p {on_platform} -w - [testenv:pretest] description = Environment to kill servers and organize test files prior to testing @@ -115,4 +107,12 @@ deps = -r requirements/requirements_test.txt commands = - pytest {env:PYTEST_PYTHON_FILES} {env:DEBUG} {env:COVERAGE} {env:RERUNS} {env:JUNITXML} \ No newline at end of file + pytest {env:PYTEST_PYTHON_FILES} {env:DEBUG} {env:COVERAGE} {env:RERUNS} {env:JUNITXML} + +[testenv:build-wheel] +description = Environment for custom build of package wheels + +skip_install = True + +commands = + python .ci/build_wheel.py -p {posargs:{on_platform}} -w \ No newline at end of file