GA: Continued Debug #415
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: Regression Tests | |
on: [push] | |
jobs: | |
build: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, windows-latest] | |
python-version: [3.7, 3.8, 3.9, 3.10.5] | |
runs-on: ${{ matrix.os }} | |
env: | |
RUST_BACKTRACE: full | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Show Git Version | |
run : | | |
git --version | |
- name: Install Rust | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: "nightly-2022-05-17" | |
override: true | |
#components: rustfmt, clippy | |
- name: Setup Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
# Needed to compile keyring library | |
# Install taken from keyring library: | |
# https://github.com/hwchen/keyring-rs/blob/v0.10.1/.github/workflows/ci.yaml#L80-L84 | |
- name: install libdbus | |
run: | | |
sudo apt update | |
sudo apt install libdbus-1-dev | |
if: contains(matrix.os, 'ubuntu') | |
- name: Build Origen CLI | |
working-directory: rust/origen/cli | |
run: cargo build --bins | |
- name: Add Origen to PATH (Linux) | |
if: matrix.os == 'ubuntu-latest' | |
run: | | |
echo "${{ github.workspace }}/rust/origen/target/debug" >> $GITHUB_PATH | |
export PATH="${{ github.workspace }}/rust/origen/target/debug:$PATH" | |
- name: Add Origen to PATH (Windows) | |
if: matrix.os == 'windows-latest' | |
run: | | |
echo "${{ github.workspace }}/rust/origen/target/debug" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append | |
$env:Path = "${{ github.workspace }}/rust/origen/target/debug;$env:Path" | |
- name: Display Python Version | |
run: python -c "import sys; print(sys.version)" | |
- name: Display Origen CLI Version | |
run: origen -v | |
- name: Build PyAPI | |
run: origen origen build | |
- name: Setup App Env | |
working-directory: test_apps/python_app | |
run: origen env setup | |
- name: Display Origen App Version | |
working-directory: test_apps/python_app | |
run: origen -v | |
- name: Show Origen Binary Location (Linux) | |
if: matrix.os == 'ubuntu-latest' | |
run: which origen | |
- name: Show Origen Binary Location (Windows) | |
if: matrix.os == 'windows-latest' | |
run: where.exe origen | |
- name: Display Poetry Version | |
working-directory: test_apps/python_app | |
run: poetry --version | |
- name: Show Origen Binary Location (Linux) | |
if: matrix.os == 'ubuntu-latest' | |
working-directory: test_apps/python_app | |
run: | | |
which origen | |
poetry run which origen | |
- name: Show Origen Binary Location (Windows) | |
if: matrix.os == 'windows-latest' | |
working-directory: test_apps/python_app | |
run: | | |
where.exe origen | |
echo "" | |
poetry run where.exe origen | |
# TODO need to see why this is the case and come up with a better solution | |
- name: Remove Poetry's Origen Wrapper (Linux) | |
if: matrix.os == 'ubuntu-latest' | |
working-directory: test_apps/python_app | |
run: poetry run which origen | xargs rm | |
- name: Remove Poetry's Origen Wrapper (Windows) | |
if: matrix.os == 'windows-latest' | |
working-directory: test_apps/python_app | |
run: poetry run where.exe origen | select -first 1 | rm | |
- name: Show Origen Binary Location (Linux) | |
if: matrix.os == 'ubuntu-latest' | |
working-directory: test_apps/python_app | |
run: | | |
which origen | |
poetry run which origen | |
- name: Show Origen Binary Location (Windows) | |
if: matrix.os == 'windows-latest' | |
working-directory: test_apps/python_app | |
run: | | |
where.exe origen | |
echo "" | |
poetry run where.exe origen | |
- name: Run Python-App Unit Tests | |
working-directory: test_apps/python_app | |
run: origen exec pytest -vv | |
- name: Run Python-App Diff Tests | |
working-directory: test_apps/python_app | |
run: origen examples | |
- name: Setup No-App Env | |
working-directory: test_apps/python_no_app | |
run: poetry install | |
- name: Display Poetry Version (No-App) | |
working-directory: test_apps/python_no_app | |
run: poetry --version | |
# Copy _origen | |
- name: Copy Origen Metal (Windows) | |
if: matrix.os == 'windows-latest' | |
working-directory: .\rust\pyapi\ | |
run: cp .\target\debug\_origen.dll ..\..\python\origen\_origen.pyd | |
# Copy _origen | |
- name: Copy Origen Metal (Linux) | |
if: matrix.os == 'ubuntu-latest' | |
working-directory: rust/pyapi | |
run: cp target/debug/lib_origen.so ../../python/origen/_origen.so | |
# Debug | |
- name: Display python/origen directory | |
working-directory: test_apps/python_no_app | |
run: ls ../../python/origen | |
- name: Display Origen No-App Version | |
working-directory: test_apps/python_no_app | |
run: poetry run origen -vvv | |
- name: Show Origen Binary Location (Linux) | |
if: matrix.os == 'ubuntu-latest' | |
working-directory: test_apps/python_no_app | |
run: | | |
which origen | |
poetry run which origen | |
- name: Show Origen Binary Location (Windows) | |
if: matrix.os == 'windows-latest' | |
working-directory: test_apps/python_no_app | |
run: | | |
where.exe origen | |
echo "" | |
poetry run where.exe origen | |
# TODO need to see why this is the case and come up with a better solution | |
- name: Remove Poetry's Origen Wrapper (Linux) | |
if: matrix.os == 'ubuntu-latest' | |
working-directory: test_apps/python_no_app | |
run: poetry run which origen | xargs rm | |
- name: Remove Poetry's Origen Wrapper (Windows) | |
if: matrix.os == 'windows-latest' | |
working-directory: test_apps/python_no_app | |
run: poetry run where.exe origen | select -first 1 | rm | |
- name: Show Origen Binary Location (Linux) | |
if: matrix.os == 'ubuntu-latest' | |
working-directory: test_apps/python_no_app | |
run: | | |
which origen | |
poetry run which origen | |
- name: Show Origen Binary Location (Windows) | |
if: matrix.os == 'windows-latest' | |
working-directory: test_apps/python_no_app | |
run: | | |
where.exe origen | |
echo "" | |
poetry run where.exe origen | |
- name: Run Python-No-App Unit Tests | |
working-directory: test_apps/python_no_app | |
run: poetry run pytest -vv | |
- name: Run Rust Tests | |
if: matrix.python-version == 3.8 | |
working-directory: rust/origen | |
run: cargo test --workspace | |
- name: Build PyAPI - Metal | |
run: origen origen build --metal | |
# - name: Install Poetry | |
# uses: abatilo/actions-poetry@v2.0.0 | |
# with: | |
# poetry-version: 1.1.14 | |
- name: Setup Python Env - Metal | |
working-directory: python/origen_metal | |
run: poetry install | |
- name: Run Python Unit Tests - Metal | |
working-directory: python/origen_metal | |
run: poetry run pytest -vv | |
- name: Run Rust Tests - Metal | |
if: matrix.python-version == 3.8 | |
working-directory: rust/origen_metal | |
run: cargo test | |
# Use a global pytest install for invocation tests | |
- name: Install Pytest | |
run: pip install pytest==7.2.1 jinja2==3.1.2 | |
- name: Get Pytest Version (Check Install) | |
run: pytest --version | |
- name: Run User-Global Invocation Tests | |
working-directory: test_apps/no_workspace | |
run: pytest test_user_install.py -vv | |
# TODO eventually want to move this into a poetry build step | |
# For now, manually move the binary. Also keeps us from having to mess with the path across OSs | |
# 'mv' command should be be fine for both linux & powershell | |
- name: Move Origen executable (Linux) | |
if: matrix.os == 'ubuntu-latest' | |
run: mv rust/origen/target/debug/origen python/origen/origen/__bin__/bin | |
- name: Move Origen executable (Windows) | |
if: matrix.os == 'windows-latest' | |
run: mv rust/origen/target/debug/origen.exe python/origen/origen/__bin__/bin | |
- name: Install Origen Packages | |
run: | | |
pip install python/origen | |
pip install python/origen_metal | |
- name: Show Origen Binary Location (Linux) | |
if: matrix.os == 'ubuntu-latest' | |
run: which origen | |
- name: Show Origen Binary Location (Windows) | |
if: matrix.os == 'windows-latest' | |
run: where.exe origen | |
# Should be no pyprojects in the root so far. Start with no-workspace tests | |
- name: Run No-Workspace-No-Plugins Tests | |
working-directory: test_apps/no_workspace | |
run: pytest test_no_workspace.py::TestNoWorkspaceNoPlugins -vv | |
- name: Install Plugins | |
run: | | |
pip install test_apps/test_apps_shared_test_helpers | |
pip install test_apps/python_plugin | |
pip install python/origen_metal | |
- name: Run No-Workspace-With-Plugins Tests | |
working-directory: test_apps/no_workspace | |
run: pytest test_no_workspace.py::TestNoWorkspaceWithPlugins -vv |