Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stil parser updates premerge #200

Closed
wants to merge 215 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
215 commits
Select commit Hold shift + click to select a range
83038d6
Massive undergoing for command integration and the global invocation.
coreyeng Dec 27, 2022
e82fd31
Fix to see if regressions will work.
coreyeng Dec 28, 2022
49d2c67
Realized settrue arg action sets a default.
coreyeng Dec 28, 2022
d918357
Add no-app unit tests
coreyeng Dec 28, 2022
0fcd539
Use poetry directly in no-app tests
coreyeng Dec 28, 2022
130ccf8
More tries at no-app tests
coreyeng Dec 28, 2022
fe10d11
Try updated lockfile
coreyeng Dec 28, 2022
87f2c58
Updates for Linux/Python 3.8-
Dec 30, 2022
d945b0e
regression debug
coreyeng Dec 30, 2022
f7bce36
regressions debug
coreyeng Dec 30, 2022
a3298eb
Attempt python 3.7 fix. Some minor cleanup.
Dec 31, 2022
67cbe8f
Merge remote-tracking branch 'refs/remotes/origin/metal_integration' …
Dec 31, 2022
2d25f5e
Add user setting to disable password prompt. Add some simple tests. M…
Dec 31, 2022
a383344
Some clean up and refactoring
Jan 1, 2023
84da497
Add core_app. Continued clean up.
Jan 3, 2023
6f10098
Fix reserved windows path.
Jan 3, 2023
143aed9
Continue cleanup and add more tests.
Jan 17, 2023
0fc4efa
Add support for target, no target, and mode opts for custom commands …
Jan 29, 2023
fc6d23e
Merge remote-tracking branch 'origin/master' into metal_integration
Jan 29, 2023
cb957ae
use target command as guinea pig for a non-frontend command. Add stru…
Feb 13, 2023
66264f1
Make 'all targets' deterministic. Remove some debug statements. Add a…
Feb 13, 2023
5543e54
Allow assert present to receive str or list of strs.
Feb 13, 2023
716cc7d
Support app opts i n plugin/aux commands. Support disabling. Add test…
Feb 16, 2023
5a51c3b
Forgot a file
Feb 16, 2023
208bb22
Handle inter and intra opt exts. Add many tests but still some placeh…
Mar 30, 2023
91b8cb2
Prototype non-extendable commands. Redo boot sequence for more consis…
Apr 26, 2023
904c0bf
debug regression fails
Apr 26, 2023
7ec5593
continue regression debug
Apr 27, 2023
4a8df7d
Refactor and update non-extendable for plugins/plugin/aux_cmds/app-co…
May 11, 2023
a813bf9
See if updating locks and rust version resolves plugin order checking.
May 11, 2023
691461d
Remove checking order from app plugins. Doesn't seem to match between…
May 12, 2023
9785118
Merge remote-tracking branch 'origin/master' into metal_integration
May 12, 2023
723221e
Move generate and env commands to use shared methods. Add some basic …
May 16, 2023
f4d411e
add cargo.lock from merge
May 16, 2023
dfe3dbf
Attempt to fix windows regressions.
May 16, 2023
e9b81bc
Fix for windows
coreyeng May 17, 2023
4eb0c26
Start cleanup and remove untested commands
May 18, 2023
8615871
Refactor build/fmt as develop_origen subcmds. Update regressions acco…
May 19, 2023
617e114
Clean up last of CLI warnings. Remove app commands that haven't been …
May 20, 2023
b5c3084
Some cleanup & support splitting out core cmds from boot.py
May 22, 2023
d286688
Continue clean up. Bugfix where parent required args are inherited by…
May 24, 2023
ef489a1
Continue cleanup items
May 26, 2023
19a4625
Continue cmds PR cleanup and additional tests
May 29, 2023
1b06a8d
Try to fix path difference on Windows regressions.
coreyeng May 29, 2023
f2262ba
Continue cleanup or dispositining tasks
Jun 1, 2023
aff9521
Continue cleanup & re-categorizing future TODOs/tests
Jun 4, 2023
ee67a10
Finish up recategorizing cleanup items
Jun 4, 2023
fac50eb
Merge pull request #190 from Origen-SDK/metal_integration
coreyeng Jun 11, 2023
d4d9225
Begin invocation debug/test work. Add infrastructure and some tests f…
Jun 24, 2023
1dcce4c
Add missing checkin
Jun 24, 2023
ae15f17
Debugging regressions
Jun 25, 2023
03f2d35
Add jinja2 install
Jun 25, 2023
17e26e6
Fix pip install in actions yml
Jun 25, 2023
8700aeb
Try re-lock of user install invocation.
Jun 25, 2023
2794bd2
Debug tests on GA
Jun 25, 2023
2e0bbc1
(GA) Remove poetry update before OM tests
Jun 25, 2023
cffef7c
GA debug - unordered PL compare
Jun 26, 2023
6f0b72a
Add pytest rewrite for t_invocation_env in no_workspace
Jun 26, 2023
6e6f8b6
(GA Debug) Local env. was stale.
Jun 26, 2023
5213de7
Have eval cmd support running from script files.
Jul 1, 2023
6784940
Set indices to empty-dict if not given. Add test for arg indices. Fix…
Jul 2, 2023
c4d6287
Support auto-interpreting some args as strs in run_cli_cmd
Jul 2, 2023
69242fa
Fix for windows path conversion with given as arg to run_cli_cmd
coreyeng Jul 3, 2023
a9200fb
Accidentally left in some debug stuff
coreyeng Jul 3, 2023
62cabad
Add no-workspace with/without plugins tests
Jul 4, 2023
8889c54
Debug regression tests
Jul 4, 2023
55c8b27
GA: fix multiple run steps
Jul 4, 2023
2dcfcdb
GA: More debug
Jul 4, 2023
8c47254
GA: More debug
Jul 4, 2023
013db4f
GA: More debug
Jul 4, 2023
0f16b7f
GA: Continued Debug
Jul 5, 2023
22c7f7c
Update from cli-loc to cli-dir in invocation tests
Jul 5, 2023
ba98475
GA: Continued Debug
Jul 5, 2023
2a1f0e1
GA: Continued Debug
Jul 5, 2023
1026840
GA: Continued Debug
Jul 5, 2023
be43620
GA: Continued Debug
Jul 5, 2023
9c57296
GA: Continued Debug
Jul 5, 2023
d5dcdb3
Add global workspace tests
Jul 6, 2023
ff92557
Merge remote-tracking branch 'origin/master' into invocations
Jul 6, 2023
716ce8c
GA: Continued Debug
Jul 6, 2023
62b82b7
GA: Continued Debug
Jul 7, 2023
34051fe
GA: Continued Debug
Jul 7, 2023
a4a95a5
GA: Continued Debug
Jul 7, 2023
2509ae4
GA: Continued Debug
Jul 7, 2023
2685b45
GA: Continued Debug
Jul 7, 2023
3c6e385
GA: Continued Debug
Jul 7, 2023
dd92cf8
Continued GA Debug
Jul 8, 2023
8d885d3
GA: Continued Debug
Jul 8, 2023
d1c471d
GA: Continued Debug
Jul 8, 2023
d54344e
Some cleanup and add some context for Windows issue in GA
Jul 8, 2023
989d4e1
Minor cleanup
Jul 9, 2023
5fd1692
Add some error cases that may fall back to a global install
Jul 11, 2023
8664443
GA: Debug
Jul 11, 2023
97b369c
GA: Debug
Jul 11, 2023
5fec106
GA: Debug
Jul 11, 2023
a6fd4b0
See about moving Python version to repo variable
Jul 12, 2023
1b0bc2d
Move more into repo variables
Jul 12, 2023
367ec1a
Try new rust install as current one causes deprecation warnings and a…
Jul 12, 2023
3658eb4
GA: Debug New Rust Setup
Jul 12, 2023
70369bd
GA: Debug & Update checkout version
Jul 13, 2023
313fe40
Merge pull request #191 from Origen-SDK/invocations
coreyeng Jul 15, 2023
cb28b99
Update to pyo3 17.3
Jul 16, 2023
4798684
Clean up pyo3 17.3 warnings. Fix run_cmd calls in examples
Jul 17, 2023
6055900
Bump to pyo3 18.0
Jul 19, 2023
76aee8b
Update to pyo3 19.1 (latest as of now)
Jul 19, 2023
de5364b
Update pyprojects to support up to 3.12. add script to make this easi…
Jul 24, 2023
000eb66
Try bumping pip version for python 3.12
Jul 25, 2023
bde62f0
GA: Test for for python 3.12
Jul 25, 2023
cda1eaf
Merge remote-tracking branch 'origin/master' into python_3.11_support
Jul 26, 2023
8520c30
Merge pull request #192 from Origen-SDK/python_3.11_support
coreyeng Jul 26, 2023
6e97944
Support later rust
Aug 2, 2023
8cabadd
Support stable rust
coreyeng Aug 5, 2023
2ffa013
Merge pull request #193 from Origen-SDK/rust_update
coreyeng Aug 9, 2023
e897f1f
Support generating a new workspace (not full app, just workspace). So…
Oct 18, 2023
0973471
Attempt: Fix regression tests
coreyeng Oct 20, 2023
e4b0e6a
Support workflow dispatch for regressions
coreyeng Oct 21, 2023
be773b7
Add readme for no-workspace regressions
coreyeng Oct 22, 2023
6f852de
Update README.md
coreyeng Oct 22, 2023
02bdfd3
Merge pull request #195 from Origen-SDK/origen_new
coreyeng Oct 22, 2023
25021b8
WIP: publish action
Nov 4, 2023
763abef
(origen/OM publishing) Add check for when full publishing script shou…
Nov 5, 2023
ebc3dd8
WiP: publishing
Nov 5, 2023
910636c
WiP: publishing
Nov 5, 2023
ad9e0e4
WiP: publishing
Nov 5, 2023
14e9b2c
WiP: publishing
Nov 6, 2023
fbb26b0
WiP: publishing
Nov 6, 2023
698ef93
Robustness/usage fixes for 'run_origen' poetry wrapper
Nov 7, 2023
4b84cd7
Debug: Robustness/usage fixes for 'run_origen' poetry wrapper
coreyeng Nov 7, 2023
bed413e
Debug: Robustness/usage fixes for 'run_origen' poetry wrapper
coreyeng Nov 8, 2023
17f0dca
Debug: Try reverting run cmd for Linux.
coreyeng Nov 8, 2023
38d10a7
Try removing _origen copy step
coreyeng Nov 9, 2023
4eb3782
Add copy step back. Slight reorder of no-app check to after CLI manip…
coreyeng Nov 9, 2023
0def459
Retry robustness update in run_origen
coreyeng Nov 9, 2023
dc4ba22
Try using poetry's wrapper for regressions.
coreyeng Nov 9, 2023
fd621b9
Copy origen binary, imitating full build step
coreyeng Nov 9, 2023
a831575
Update CLI dirs.
coreyeng Nov 12, 2023
9af9274
Try moving origen CLI earlier
coreyeng Nov 12, 2023
1585119
Move user install tests to after global origen install
coreyeng Nov 13, 2023
c458a1a
Regressions debug
coreyeng Nov 13, 2023
6e5bbfc
Regressions debug
coreyeng Nov 13, 2023
ff8907b
WiP: Github release during publish
Nov 13, 2023
c6cacf8
Merge remote-tracking branch 'origin/master'
Nov 13, 2023
e165ee2
Fix GH release condition
Nov 13, 2023
9eef87f
Try adding a checkout to see if the github release action picks up gi…
Nov 13, 2023
b41ca4c
Try adding commit to release
Nov 13, 2023
6078384
Try adding commit-based tag.
Nov 14, 2023
c9f05d7
WiP: Publish GH Release
Nov 14, 2023
85b7fbd
WiP: GH Release. Zip wheels for release upload.
Nov 14, 2023
7418339
Add commit preface to tag. Bump upload artifact version
Nov 15, 2023
14a1254
Clean up dead code in regressions. Run metal tests across python vers…
coreyeng Nov 15, 2023
9ef28f8
Fix commit tag during GH release. Add boolean options
Nov 15, 2023
a5c12be
Merge pull request #196 from Origen-SDK/cli_and_tests_debug
coreyeng Nov 15, 2023
eef3d78
Prototype using 'retry' action for finicky steps
coreyeng Nov 15, 2023
330b709
WiP: Start larger publishing effort
Nov 17, 2023
586b042
Merge remote-tracking branch 'origin/master'
Nov 17, 2023
581515e
Publishing: bugfix in GH release. Try not validating wheel metadata
Nov 18, 2023
96210d2
Publishing: Debug action
Nov 18, 2023
dc9b5f3
Publishing: Try just releasing origen to test server. Debug getting i…
Nov 18, 2023
f768b78
Publishing: WiP
Nov 18, 2023
0c442fa
WiP O2 Publishing: Bump git2 version. Support getting/increment versi…
Dec 9, 2023
35bcaab
Support any Python 3.12 version
Dec 10, 2023
323344e
Update python versions again. Change script to non-inclusive max.
Dec 10, 2023
e4db777
Update lock file for new python
Dec 10, 2023
c64eca1
Resume WiP on publishing action
Dec 10, 2023
8ea05f1
Add OM test server publishing token
Dec 10, 2023
318c370
WiP: Debug publishing
Dec 10, 2023
a49061e
WiP: Publishing: Bugfix for GH release
Dec 10, 2023
b40239b
WiP: PublishingO2: Bump OM/Origen versions. Some scripting to assist …
Dec 11, 2023
9536b90
WiP: Publishing: Add pypi job. Add verbose setting to pypi uploads
Dec 11, 2023
1c45418
WiP: Publishing: Ensure cleanup after release to pypi
Dec 11, 2023
03e4a36
WiP: Publishing: Fix some typos
Dec 11, 2023
2ecb0a8
Experiment with publish checks in publish action
Jan 9, 2024
15b3f10
WiP: Publishing Checks
Jan 10, 2024
6eb2c4e
WiP: Publishing Checks
Jan 10, 2024
af6ad8a
WiP: Publishing Checks: Try updating lock_master job permissions.
Jan 11, 2024
8c2eb0f
WiP: Publishing: Experiment with Docker image for manylinux
Jan 13, 2024
489d2c5
WiP: Publishing Manylinux
Jan 13, 2024
a406070
WiP: Publishing Manylinux
Jan 13, 2024
a2df131
WiP: Publishing Manylinux
Jan 13, 2024
5500ecb
WiP: Publishing, try manylinux2014 image
Jan 13, 2024
66ddea8
WiP: Publishing: Momentarily skip Rust install
Jan 13, 2024
701a1e5
WiP: Publishing: Actually try rust skip
Jan 13, 2024
e4bab83
WiP: Publishing: manylinux
Jan 16, 2024
78fb3a8
WiP: Publishing: manylinux
Jan 17, 2024
56fcb19
WiP: Publishing: manylinux
Jan 17, 2024
8199c5c
WiP: Publishing manylinux
Jan 20, 2024
f6f4bf7
WiP: Publishing. Revert windows release to same versions as regressio…
Jan 20, 2024
621fba4
WiP: Publishing manylinux. Bugfix for python URL
Jan 20, 2024
852310f
WiP: Publishing manylinux
Jan 21, 2024
e4ea98f
WiP: Publishing manylinux
Jan 21, 2024
81f6c82
WiP: Publishing manylinux
Jan 21, 2024
96c916e
WiP: Publishing manylinux
Jan 21, 2024
ed98e7e
WiP: Publishing manylinux
Jan 21, 2024
578f3f1
WiP: Publishing manylinux
Jan 21, 2024
243bded
Move version wrapper to OM. Add some version tests. Support version f…
Feb 1, 2024
44f1db9
Debug regressions
Feb 2, 2024
be52e43
Add equivalent origen version support from OM. Bump origen version to…
Feb 6, 2024
aa81da3
Bump Origen version. Add consistency to user-facing versions. Change …
Feb 15, 2024
9c694c7
Try reinstalling poetry globally for windows regressions
Feb 17, 2024
40f85ce
Fix Cargo.toml capitalization
coreyeng Feb 17, 2024
1993564
Add additional poetry/pip version outputs. Try poetry install from ENV.
Feb 17, 2024
f5582f6
Merge remote-tracking branch 'origin/master'
Feb 17, 2024
3df6dd0
Fix caching poetry version
Feb 17, 2024
f0c671c
WIP: Debug Regressions
Feb 18, 2024
ad5e173
Debug Regressions: Try reverting build system
Feb 18, 2024
07a2f49
Add CLI to github releases. Bypass regressions for just version and p…
Mar 3, 2024
4d02b4a
Try to fix regression test paths-ignore error
Mar 5, 2024
ea36b3f
Try to fix regression test ignore-paths
Mar 5, 2024
f2cbc9f
Build out publish command some. Remove locking master from publish wo…
Mar 11, 2024
b647ef1
Updated version files for next release
Mar 17, 2024
600cc85
Continue work on publish command.
Mar 17, 2024
f24848b
Try regression fix. Add additional version support. Add some version …
Mar 18, 2024
5c321a6
Expose some more version features to frontend. Add tests.
Mar 19, 2024
de4bd47
Fix OM test needing FE for less-robust Windows
Mar 19, 2024
b17488b
Attempt merge from master
rlaj May 28, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
648 changes: 582 additions & 66 deletions .github/workflows/publish.yml

Large diffs are not rendered by default.

327 changes: 300 additions & 27 deletions .github/workflows/regression_test.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,27 @@
name: Regression Tests
on: [push]
on:
push:
paths-ignore:
# Ignore updates to just the publish action
- '.github/workflows/publish.yml'
# Ignore updates to just version files for Origen/OM/CLI
- 'rust/origen/cli/Cargo.toml'
- 'python/origen/pyproject.toml'
- 'python/origen_metal/pyproject.toml'
workflow_dispatch:
jobs:
build:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
python-version: [3.7, 3.8, 3.9, 3.10.5]
os: ${{ fromJSON(vars.SUPPORTED_OS) }}
python-version: ${{ fromJSON(vars.PYTHON_VERSIONS) }}

runs-on: ${{ matrix.os }}
env:
RUST_BACKTRACE: full
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Show Git Version
run : |
Expand All @@ -22,14 +31,69 @@ jobs:
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: ${{ fromJSON(vars.RUST_VERSION) }}
#override: true
#components: rustfmt, clippy

rustflags:

- name: Override Project Rust Version
run: rustup override set ${{ fromJSON(vars.RUST_VERSION) }}

- name: Check Rust Version
run: |
rustc --version
cargo --version

# TODO Invocations: Currently some problem with poetry/pip on Windows where dependencies on drives/mounts separate
# from where the pyproject is located cannot be built. Can workaround this in Windows by updating the
# AGENT_TOOLSDIRECTORY/RUNNER_TOOL_CACHE environment variables, but I'm unable to get these to stick across steps
# in GA. Next few steps are all messiness to debug/work around that.
# Not an issue in Linux, so Windows only will be moved. linux will maintained across different drives.
- name: Pre-Python Install Setup (Windows-Only)
if: matrix.os == 'windows-latest'
run: |
$env:RUNNER_TOOL_CACHE = '${{ github.workspace }}' | Split-Path | Join-Path -ChildPath o2_GA_tools
$env:AGENT_TOOLSDIRECTORY = $env:RUNNER_TOOL_CACHE
mkdir $env:RUNNER_TOOL_CACHE
echo $env:AGENT_TOOLSDIRECTORY
echo $env:RUNNER_TOOL_CACHE
ls $env:AGENT_TOOLSDIRECTORY
echo "RUNNER_TOOL_CACHE=$env:RUNNER_TOOL_CACHE"
echo "AGENT_TOOLSDIRECTORY=$env:AGENT_TOOLSDIRECTORY"
echo "RUNNER_TOOL_CACHE=$env:RUNNER_TOOL_CACHE" >> $GITHUB_ENV
echo "AGENT_TOOLSDIRECTORY=$env:AGENT_TOOLSDIRECTORY" >> $GITHUB_ENV

- name: Check ENV Variables (Windows-Only)
if: matrix.os == 'windows-latest'
run: |
echo $env:AGENT_TOOLSDIRECTORY
echo $env:RUNNER_TOOL_CACHE
echo $RUNNER_TOOL_CACHE
echo $AGENT_TOOLSDIRECTORY

- name: Setup Python ${{ matrix.python-version }}
if: matrix.os != 'windows-latest'
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
if: matrix.os == 'windows-latest'
uses: actions/setup-python@v4
env:
RUNNER_TOOL_CACHE: D:\a\o2\o2_GA_tools
AGENT_TOOLSDIRECTORY: D:\a\o2\o2_GA_tools
with:
python-version: ${{ matrix.python-version }}

- name: Check Python Install (Windows-Only)
if: matrix.os == 'windows-latest'
run: |
echo $RUNNER_TOOL_CACHE
echo $AGENT_TOOLSDIRECTORY
echo $env:AGENT_TOOLSDIRECTORY
echo $env:RUNNER_TOOL_CACHE
ls $env:AGENT_TOOLSDIRECTORY
python -c "import os; [print(f'{v}: {k}') for v,k in os.environ.items()];"
python -c "import os, sys; print(os.path.dirname(sys.executable))"

# 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
Expand All @@ -45,20 +109,26 @@ jobs:

- name: Add Origen to PATH (Linux)
if: matrix.os == 'ubuntu-latest'
run: echo "${{ github.workspace }}/rust/origen/target/debug" >> $GITHUB_PATH
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

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)"
run: |
python -c "import sys; print(sys.version)"
pip --version

- name: Display Origen CLI Version
run: origen -v

- name: Build PyAPI
run: origen build
run: origen origen build

- name: Setup App Env
working-directory: test_apps/python_app
Expand All @@ -67,31 +137,140 @@ jobs:
- 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: Run Python Unit Tests

# - name: Install importlib_metadata (Python 3.12)
# run: pip install importlib_metadata

# - name: Cache Poetry Version (Linux)
# if: matrix.os == 'ubuntu-latest'
# working-directory: test_apps/python_app
# run: |
# POETRY_VER=$(python -c "import importlib_metadata; print(importlib_metadata.version('poetry'))")
# echo $POETRY_VER
# echo "poetry_version=$POETRY_VER" >> $GITHUB_ENV
# - name: Cache Poetry Version (Windows)
# if: matrix.os == 'windows-latest'
# working-directory: test_apps/python_app
# run: |
# $POETRY_VER = python -c "import importlib_metadata; print(importlib_metadata.version('poetry'))"
# echo $POETRY_VER
# echo "poetry_version=$POETRY_VER" >> $GITHUB_ENV

- name: Show Origen Binary Location (Linux)
if: matrix.os == 'ubuntu-latest'
working-directory: test_apps/python_app
run: origen exec pytest -vv

- name: Run Diff Tests
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 GA: Add to build script?
- name: Move Origen executable (Linux)
if: matrix.os == 'ubuntu-latest'
run: cp rust/origen/target/debug/origen python/origen/origen/__bin__/bin
- name: Move Origen executable (Windows)
if: matrix.os == 'windows-latest'
run: cp rust/origen/target/debug/origen.exe python/origen/origen/__bin__/bin

- 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
uses: Wandalen/wretry.action@v1.3.0
with:
attempt_limit: 2
current_path: test_apps/python_app
command: origen exec pytest -vv

- name: Run Python-App Diff Tests
working-directory: test_apps/python_app
run: origen examples


- name: Setup No-App Env
uses: Wandalen/wretry.action@v1.3.0
with:
attempt_limit: 2
current_path: test_apps/python_no_app
command: poetry install

- name: Display Poetry Version (No-App)
working-directory: test_apps/python_no_app
run: poetry --version

# Copy _origen
- name: Copy Origen Library (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 Library (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: 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: Display Origen No-App Version
working-directory: test_apps/python_no_app
run: poetry run origen -vvv

- 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 build --metal

- name: Install Poetry
uses: abatilo/actions-poetry@v2.0.0
with:
poetry-version: 1.1.14
run: origen origen build --metal

- name: Setup Python Env - Metal
working-directory: python/origen_metal
Expand All @@ -102,7 +281,101 @@ jobs:
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::TestUserInstall -vv

# TODO GA: Regressions: 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
# Update: remove binary since it is being copied earlier.
- name: Remove Origen executable (Linux)
if: matrix.os == 'ubuntu-latest'
run: rm rust/origen/target/debug/origen
# run: rm rust/origen/target/debug/origen python/origen/origen/__bin__/bin
- name: Remove Origen executable (Windows)
if: matrix.os == 'windows-latest'
run: rm rust/origen/target/debug/origen.exe
# run: rm rust/origen/target/debug/origen.exe python/origen/origen/__bin__/bin

# TODO GA: Regressions: not sure why, but the tmp directory in origen_metal causes some issues
# For now, just removing it.
- name: Remove origen_metal tmp Directory
run: rm python/origen_metal/tmp -r

# TODO GA: Regressions: Need to better handle this
# Issue being that working on a newer Python version than what's released will not resolve
# Workaround by removing origen_metal package from origen dependencies and installing separately
- name: Hack origen pyproject
working-directory: python/origen
run: poetry remove origen_metal

- name: Install Origen Packages
run: |
pip --version
poetry --version
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

# - name: Reinstall Poetry Version
# run: |
# echo ${{ env.poetry_version }}
# poetry --version
# pip install poetry==${{ env.poetry_version }}
# poetry --version

- name: Run User-Global Invocation Tests
working-directory: test_apps/no_workspace
run: pytest test_user_install.py::TestUserInstall -vv

# 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

# Leave the no-workspace setup. The global setup should override
- name: Run Global No-Plugins One Above Site-Packages Dir
working-directory: test_apps/no_workspace
run: pytest test_global_install.py::TestGlobalInstallNoPlugins -vv

- name: Run Global With Plugins At Site-Packages Dir
working-directory: test_apps/no_workspace
run: pytest test_global_install.py::TestGlobalInstallWithPlugins -vv

- name: Run Global No-Plugins At CLI Dir
working-directory: test_apps/no_workspace
run: pytest test_global_install.py::TestGlobalInstallAtCliDir -vv

# With global origen available, test user install errors which fall back to the global install
- name: Run User Install Errors - Falling Back To Global Install
working-directory: test_apps/no_workspace
run:
poetry --version
pytest test_user_install.py::TestErrorCasesWithFallback -vv
Loading
Loading