Skip to content

Ipy v2 #15

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

Merged
merged 9 commits into from
Jan 29, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 24 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
target: build
interpreter: cpython

- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v4
with:
name: cpy_ghuser-components
path: build
Expand All @@ -42,7 +42,29 @@ jobs:
source: examples/ipy
target: build

- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v4
with:
name: ipy_ghuser-components
path: build

build_ipy_v2_ghuser_components:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- uses: NuGet/setup-nuget@v1.0.5

- name: Install IronPython
run: |
choco install ironpython --version=2.7.8.1

- name: Run
uses: ./
with:
source: examples/ipy_v2
target: build
interpreter: ipy_v2

- uses: actions/upload-artifact@v4
with:
name: ipy_v2_ghuser-components
path: build
34 changes: 34 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,37 @@ jobs:
path: build
```

For IronPython2 (RhinoV8):

```yaml
on: [push]

jobs:
build_ipy_ghuser_components:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- uses: NuGet/setup-nuget@v1.0.5

- name: Install IronPython
run: |
choco install ironpython --version=2.7.8.1

- uses: compas-dev/compas-actions.ghpython_components@v5
with:
source: components
target: build
interpreter: ipy_v2

# The components have been built at this step.
# Now you can choose what to do with them, e.g.:
# upload them as artifacts:
- uses: actions/upload-artifact@v2
with:
name: ipy_ghuser-components
path: build
```


Commit, push and enjoy! 🍿

Expand All @@ -90,16 +121,19 @@ Make sure to have IronPython or Python3/pythonnet installed and the `GH_IO.dll`
Then start the script pointing it to a source and target folder, e.g.:

ipy componentize_ipy.py examples/ipy build
ipy componentize_ipy_v2.py examples/ipy_v2 build
python componentize_cpy.py examples/cpy build

Optionally, tag it with a version:

ipy componentize_ipy.py examples/ipy build --version 0.1.2
ipy componentize_ipy_v2.py examples/ipy_v2 build --version 0.1.2
python componentize_cpy.py examples/cpy build --version 0.1.2

An optional name prefix can help tell components apart from other similarly named ones:

ipy componentize_ipy.py examples/ipy build --prefix "(PACKAGE-NAME)"
ipy componentize_ipy.py examples/ipy_v2 build --prefix "(PACKAGE-NAME)"
python componentize_cpy.py examples/cpy build --prefix "(PACKAGE-NAME)"

## How to create components
Expand Down
3 changes: 3 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ runs:
if ("${{ inputs.interpreter }}" -eq "cpython") {
$command="python"
$componentizer="${{ github.action_path }}/componentize_cpy.py"
} elseif ("${{ inputs.interpreter }}" -eq "ipy_v2"){
$command="ipy"
$componentizer="${{ github.action_path }}/componentize_ipy_v2.py"
} else {
$command="ipy"
$componentizer="${{ github.action_path }}/componentize_ipy.py"
Expand Down
Loading
Loading