Skip to content

[SymForce] Fix editable install test #318

[SymForce] Fix editable install test

[SymForce] Fix editable install test #318

name: Test Editable Pip Install
on:
push:
branches:
- 'main'
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
workflow_dispatch:
jobs:
editable_install:
if: github.event.event_name == 'workflow_dispatch' || github.event.pull_request.draft == false
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-22.04, ubuntu-20.04, macos-latest]
pip_version: [24.0]
setuptools_version: [69.5.1]
steps:
- name: Checkout
uses: actions/checkout@v4
- if: ${{ matrix.os == 'macos-latest' }}
name: Set up user-managed python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Upgrade versions
run: |
python -m pip install \
pip==${{ matrix.pip_version }} \
setuptools==${{ matrix.setuptools_version }}
- name: install dev_requirements.txt
run: python -m pip install -r dev_requirements.txt
- name: editable install
run: python -m pip install -v -e .
- name: Set expected install locations for ubuntu focal
if: ${{ matrix.os == 'ubuntu-20.04' }}
run: |
echo CC_SYM_LOCATION=/home/runner/work/${{ github.event.repository.name }}/${{ github.event.repository.name }}/cc_sym.cpython-38-x86_64-linux-gnu.so >> $GITHUB_ENV
echo SYM_LOCATION=/home/runner/.local/lib/python3.8/site-packages/sym/__init__.py >> $GITHUB_ENV
echo SKYMARSHAL_LOCATION=/home/runner/.local/lib/python3.8/site-packages/skymarshal/__init__.py >> $GITHUB_ENV
echo SYMENGINE_LOCATION=/home/runner/work/${{ github.event.repository.name }}/${{ github.event.repository.name }}/third_party/symenginepy/symengine/__init__.py >> $GITHUB_ENV
echo LCMTYPES_SYM_LOCATION=/home/runner/work/${{ github.event.repository.name }}/${{ github.event.repository.name }}/lcmtypes_build/lcmtypes/sym/__init__.py >> $GITHUB_ENV
echo LCMTYPES_EIGEN_LCM_LOCATION=/home/runner/work/${{ github.event.repository.name }}/${{ github.event.repository.name }}/lcmtypes_build/lcmtypes/eigen_lcm/__init__.py >> $GITHUB_ENV
echo SF_SYMPY_LOCATION=/home/runner/work/${{ github.event.repository.name }}/${{ github.event.repository.name }}/third_party/symenginepy/symengine/__init__.py >> $GITHUB_ENV
- name: Set expected install locations for ubuntu jammy
if: ${{ matrix.os == 'ubuntu-22.04' }}
run: |
echo CC_SYM_LOCATION=/home/runner/work/${{ github.event.repository.name }}/${{ github.event.repository.name }}/cc_sym.cpython-310-x86_64-linux-gnu.so >> $GITHUB_ENV
echo SYM_LOCATION=/home/runner/.local/lib/python3.10/site-packages/sym/__init__.py >> $GITHUB_ENV
echo SKYMARSHAL_LOCATION=/home/runner/.local/lib/python3.10/site-packages/skymarshal/__init__.py >> $GITHUB_ENV
echo SYMENGINE_LOCATION=/home/runner/work/${{ github.event.repository.name }}/${{ github.event.repository.name }}/third_party/symenginepy/symengine/__init__.py >> $GITHUB_ENV
echo LCMTYPES_SYM_LOCATION=/home/runner/work/${{ github.event.repository.name }}/${{ github.event.repository.name }}/lcmtypes_build/lcmtypes/sym/__init__.py >> $GITHUB_ENV
echo LCMTYPES_EIGEN_LCM_LOCATION=/home/runner/work/${{ github.event.repository.name }}/${{ github.event.repository.name }}/lcmtypes_build/lcmtypes/eigen_lcm/__init__.py >> $GITHUB_ENV
echo SF_SYMPY_LOCATION=/home/runner/work/${{ github.event.repository.name }}/${{ github.event.repository.name }}/third_party/symenginepy/symengine/__init__.py >> $GITHUB_ENV
- name: Set expected install locations for macos
if: ${{ matrix.os == 'macos-latest' }}
run: |
echo CC_SYM_LOCATION=/Users/runner/work/${{ github.event.repository.name }}/${{ github.event.repository.name }}/cc_sym.cpython-311-darwin.so >> $GITHUB_ENV
echo SYM_LOCATION=/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/sym/__init__.py >> $GITHUB_ENV
echo SKYMARSHAL_LOCATION=/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/skymarshal/__init__.py >> $GITHUB_ENV
echo SYMENGINE_LOCATION=/Users/runner/work/${{ github.event.repository.name }}/${{ github.event.repository.name }}/third_party/symenginepy/symengine/__init__.py >> $GITHUB_ENV
echo LCMTYPES_SYM_LOCATION=/Users/runner/work/${{ github.event.repository.name }}/${{ github.event.repository.name }}/lcmtypes_build/lcmtypes/sym/__init__.py >> $GITHUB_ENV
echo LCMTYPES_EIGEN_LCM_LOCATION=/Users/runner/work/${{ github.event.repository.name }}/${{ github.event.repository.name }}/lcmtypes_build/lcmtypes/eigen_lcm/__init__.py >> $GITHUB_ENV
echo SF_SYMPY_LOCATION=/Users/runner/work/${{ github.event.repository.name }}/${{ github.event.repository.name }}/third_party/symenginepy/symengine/__init__.py >> $GITHUB_ENV
- name: Test everything is installed in expected locations
run: ./.github/scripts/expected_paths_test.py