From 593a0c3f461f103f92d3d20d2b34d8bccd6bd1c2 Mon Sep 17 00:00:00 2001 From: Andrew Cassidy Date: Sun, 10 Apr 2022 21:08:07 -0700 Subject: [PATCH] Fix windows test command and install fat binaries for libomp --- .github/workflows/python-package.yml | 9 +++++++-- pyproject.toml | 5 ++++- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 7688001..3a74e4a 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -50,7 +50,7 @@ jobs: strategy: matrix: #os: [ macos-latest, windows-latest, ubuntu-latest ] - os: [ macos-latest, windows-latest ] + os: [ macos-11, windows-latest ] steps: - uses: actions/checkout@v3 @@ -62,7 +62,12 @@ jobs: - name: Install libomp if: runner.os == 'macOS' # openMP isnt part of core apple clang for some reason? - run: brew install libomp + # libomp is in homebrew, which works for end users but its not a fat binary + # so we have to install it manually + # compiled dylibs courtesy of https://mac.r-project.org/openmp/ and mirrored on my own server + run: | + wget https://pileof.rocks/openmp-13.0.0-darwin21-Release.tar.gz + sudo tar fvxz openmp-*.tar.gz -C / - name: Install QEMU # install QEMU if building for arm linux diff --git a/pyproject.toml b/pyproject.toml index 52a1575..456ba8c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -58,9 +58,12 @@ package-dir = { '' = '.' } # without this line, C++ source files get included in build = "cp{37,38,39,31*}-*" skip = ["*cp37-musllinux*", "*musllinux_aarch64*", "cp{38,39,31*}-macosx_x86_64"] build-frontend = "build" -test-command = 'cd {project} && python -m unittest --verbose' +test-command = "cd {project} && python -m unittest --verbose" test-extras = ["tests"] manylinux-x86_64-image = "manylinux2014" manylinux-aarch64-image = "manylinux2014" +[tool.cibuildwheel.windows] +test-command = "cd /d {project} && python -m unittest --verbose" + [tool.setuptools_scm]