fix wheel name #672
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build | |
on: [push, pull_request] | |
env: | |
BUILD_TYPE: Release | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [windows-2022] | |
shared_libs: ['ON', 'OFF'] | |
include: | |
- os: windows-2022 | |
package_manager: "vcpkg" | |
test: "OFF" | |
steps: | |
- name: "(vcpkg only) remove python" | |
if: ${{ matrix.package_manager == 'vcpkg' }} | |
run: | | |
rm -rf c:\\hostedtoolcache\\windows\\python\\ | |
- name: Checkout Pangolin | |
uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: "(vcpkg only) Install Microsoft Visual C++" | |
if: ${{ matrix.package_manager == 'vcpkg' }} | |
uses: ilammy/msvc-dev-cmd@v1 | |
- name: "(vcpkg only) Restore any cached ports" | |
uses: lukka/run-vcpkg@v11 | |
if: ${{ matrix.package_manager == 'vcpkg' }} | |
with: | |
vcpkgDirectory: '${{github.workspace}}/scripts/vcpkg' | |
- name: "(vcpkg only) Setup CMake Toolchain file" | |
if: ${{ matrix.package_manager == 'vcpkg' }} | |
run: | | |
export TOOLCHAIN_FILE="${{github.workspace}}/scripts/vcpkg/scripts/buildsystems/vcpkg.cmake" | |
echo "${{github.workspace}}/scripts/vcpkg" >> $GITHUB_PATH | |
echo "TOOLCHAIN_FILE=$TOOLCHAIN_FILE" >> $GITHUB_ENV | |
- name: "(brew only) Remove Python symlinks" | |
if: ${{ matrix.package_manager == 'brew' }} | |
run: | | |
rm /usr/local/bin/2to3 | |
rm /usr/local/bin/2to3-3.12 | |
rm /usr/local/bin/idle3 | |
rm /usr/local/bin/idle3.12 | |
rm /usr/local/bin/pydoc3 | |
rm /usr/local/bin/pydoc3.12 | |
rm /usr/local/bin/python3 | |
rm /usr/local/bin/python3.12 | |
rm /usr/local/bin/python3-config | |
rm /usr/local/bin/python3.12-config | |
- name: Install Dependencies | |
env: | |
HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK: 1 | |
run: | | |
echo "vcpkg location: $(which vcpkg)" | |
echo "CMake toolchain file: $TOOLCHAIN_FILE" | |
$GITHUB_WORKSPACE/scripts/install_prerequisites.sh -v -u -m ${{matrix.package_manager}} all | |
- name: "(vcpkg only) setuptools 2" | |
if: ${{ matrix.package_manager == 'vcpkg' }} | |
run: | | |
python3 -m pip show setuptools | |
python3 -m pip install setuptools | |
python3 -m pip show setuptools | |
python3 --version | |
python3 -c 'import sys; import pprint; pprint.pprint(sys.path)' | |
python3 -c 'import setuptools' | |
- name: Configure CMake | |
run: > | |
cmake -G Ninja -B build | |
-D CMAKE_BUILD_TYPE=$BUILD_TYPE | |
-D CMAKE_TOOLCHAIN_FILE="$TOOLCHAIN_FILE" | |
-D BUILD_SHARED_LIBS=${{ matrix.shared_libs }} | |
-D BUILD_TESTS=${{ matrix.test }} | |
- name: Build | |
run: cmake --build build --config $BUILD_TYPE | |
- name: Build Python wheel | |
run: cmake --build build -t pypangolin_wheel | |
- name: Install Python wheel | |
env: | |
PIP_BREAK_SYSTEM_PACKAGES: 1 | |
run: | | |
python3 -m pip install build/pypangolin-*.whl | |
python3 -m pip show pypangolin | |
python3 -c "import pypangolin" | |
- name: Run all tests | |
if: ${{ matrix.test == 'ON' }} | |
run: | | |
cmake --build build --target test |