Skip to content

Commit

Permalink
WIP: testing out dual branch x2
Browse files Browse the repository at this point in the history
  • Loading branch information
9and3 committed Jan 23, 2024
1 parent 69e3cad commit c99d120
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 28 deletions.
14 changes: 1 addition & 13 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,6 @@ jobs:
- uses: actions/checkout@v2
- uses: NuGet/[email protected]

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

# - name: Install Python3
# uses: actions/setup-python@v2
# with:
# python-version: '3.9.10'
# - name: Install pythonnet
# run: |
# pip install pythonnet

- name: Run
uses: ./
with:
Expand All @@ -30,5 +18,5 @@ jobs:

- uses: actions/upload-artifact@v2
with:
name: ghuser-components # TODO: add other folder
name: ghuser-components
path: build
42 changes: 27 additions & 15 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,25 +10,37 @@ inputs:
prefix:
description: 'Add this prefix to the name of each generated component'
required: false
# TODO: add a input and a if switch statement
# interpreter:
# description: 'Python interpreter to use'
# required: false
# default: 'ironpython'
interpreter:
description: 'Python interpreter to use: ironpython, or cpython'
required: false
default: 'ironpython'

runs:
using: 'composite'
steps:
- name: Install Python3
uses: actions/setup-python@v2
with:
python-version: '3.9.10'
- name: Install pythonnet
run: pip install pythonnet
- name: Install pythonnet or IronPython
run: |
if ("${{ inputs.interpreter }}" -eq "cpython") {
echo "Installing Python3"
# Install Python3
# pip install pythonnet
} else {
echo "Installing IronPython"
# choco install ironpython --version=2.7.8.1
}
shell: pwsh
- run: nuget install Grasshopper -OutputDirectory ./lib -source https://api.nuget.org/v3/index.json
shell: pwsh # TODO: this one should be for both
- run: |
$command="python"

- name: Install Grasshopper
run: nuget install Grasshopper -OutputDirectory ./lib -source https://api.nuget.org/v3/index.json
shell: pwsh

- name: Launch componentizer
run: |
if ("${{ inputs.interpreter }}" -eq "cpython") {
$command="python"
} else {
$command="ipy"
}
$params="${{ github.action_path }}/componentize.py", "${{ inputs.source }}", "${{ inputs.target }}", "--ghio", "./lib"
$prefix="${{ inputs.prefix }}"
if( $prefix )
Expand Down

0 comments on commit c99d120

Please sign in to comment.