Skip to content

Tweak to .github/workflows/ scripts, install trimesh before running t… #75

Tweak to .github/workflows/ scripts, install trimesh before running t…

Tweak to .github/workflows/ scripts, install trimesh before running t… #75

name: Python Test (vcpkg build)
on:
workflow_dispatch:
push:
pull_request:
jobs:
python:
name: ${{ github.workflow }} Python package on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-13]
python-version: ["3.10"]
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Install OS tools
shell: bash
run: |
if [ "$RUNNER_OS" == "macOS" ]; then
brew install autoconf automake libtool
fi
- uses: lukka/get-cmake@latest
name: Install cmake and ninja (via get-cmake)
- name: Dump the content of $RUNNER_TEMP
run: find $RUNNER_TEMP
shell: bash
- name: Dump the content of $RUNNER_WORKSPACE
run: find $RUNNER_WORKSPACE
shell: bash
- name: Restore artifacts, or setup vcpkg for building artifacts
uses: lukka/run-vcpkg@v11
with:
# This specifies the location of vcpkg, where it is going to be restored from cache, or create from scratch.
vcpkgDirectory: '${{ runner.workspace }}/vcpkg'
# The Git commit id of vcpkg to be checked out. This is only needed because we are not using a submodule.
vcpkgGitCommitId: "f7423ee180c4b7f40d43402c2feb3859161ef625"
# The vcpkg.json file, which will be part of cache key computation.
vcpkgJsonGlob: '**/vcpkg.json'
id: runvcpkg
- name: Prints output of run-vcpkg's action.
run: echo "root='${{ steps.runvcpkg.outputs.RUNVCPKG_VCPKG_ROOT_OUT }}', triplet='${{ steps.runvcpkg.outputs.RUNVCPKG_VCPKG_DEFAULT_TRIPLET_OUT }}' "
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install python dependencies
shell: bash
run: |
python -m pip install --upgrade pip
python -m pip install cmake setuptools scikit-build wheel 'versioneer[toml]'
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
python -m pip install trimesh
- name: Build and install with pip
env:
VCPKG_ROOT: ${{ runner.workspace }}/vcpkg
run: python -m pip install --user ${{ github.workspace }}
- name: Debug pyemblite install
shell: bash
run: |
cd ~
echo $(pwd)
python -c 'import os; import pyemblite; print(os.listdir(os.path.dirname(pyemblite.__file__)))'
python -c 'import pyemblite; print(f"pyemblite.__file__={pyemblite.__file__}"); print(dir(pyemblite))'
- name: Test
shell: bash
run: |
cd ~
python -m pyemblite.test -fv