Skip to content

Commit

Permalink
Run python tests, fix python wheels not being able to import
Browse files Browse the repository at this point in the history
  • Loading branch information
ShadowJonathan committed May 29, 2024
1 parent 0c644c3 commit a7f5843
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
12 changes: 10 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,7 @@ jobs:
- macos-12
# latest is ARM
- macos-latest
- windows-latest
python-minor:
- 5
- 6
Expand Down Expand Up @@ -420,10 +421,17 @@ jobs:
key: ${{ runner.os }}-${{ github.sha }}
fail-on-cache-miss: true

- name: Run python test command
- name: Install soar-sml
run: |
pip3.${{ matrix.python-minor }} install soar-sml -f wheelhouse --no-index
python3.${{ matrix.python-minor }} Core/ClientSMLSWIG/Python/TestPythonSML.py
- name: Run test command (Non-Windows)
if: matrix.os != 'windows-latest'
run: python3.${{ matrix.python-minor }} Core/ClientSMLSWIG/Python/TestPythonSML.py

- name: Run test command (Windows)
if: matrix.os == 'windows-latest'
run: py -3.${{ matrix.python-minor }} Core/ClientSMLSWIG/Python/TestPythonSML.py

python_push_dev:
name: Publish to test.pypi.org
Expand Down
5 changes: 4 additions & 1 deletion Core/ClientSMLSWIG/Python/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,10 @@ test-command = "SOAR_UNIT_TEST_BASE_DIR={project}/out/ python {project}/Core/Cli
test-skip = "cp38-macosx_*:arm64"

[tool.cibuildwheel.windows]
# For windows we need a slightly different command
# For windows, we need to include msvcp140.dll and vcruntime140_1.dll in the wheel.
before-build = "pip install delvewheel"
repair-wheel-command = "delvewheel repair --ignore-in-wheel -w {dest_dir} {wheel}"
# For windows we need a slightly different test command
test-command = """\
set SOAR_UNIT_TEST_BASE_DIR={project}/out/
python {project}/Core/ClientSMLSWIG/Python/TestPythonSML.py
Expand Down

0 comments on commit a7f5843

Please sign in to comment.