Skip to content
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
2 changes: 1 addition & 1 deletion .github/workflows/ARM.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
push:
branches:
- master
pull_request:
# pull_request:

jobs:
build-test-arm:
Expand Down
40 changes: 0 additions & 40 deletions .github/workflows/docs.yml

This file was deleted.

106 changes: 106 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
name: Main

on:
push:
branches:
- dynamo_py3
pull_request:

jobs:
build-test:
name: Build and Test
runs-on: ${{ matrix.os.instance }}
timeout-minutes: 15

strategy:
fail-fast: false
matrix:
os:
- category: windows
platform: x86
instance: windows-latest

- category: windows
platform: x64
instance: windows-latest

- category: ubuntu
platform: x64
instance: ubuntu-22.04

- category: macos
platform: x64
instance: macos-13

python: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]

steps:
- name: Set Environment on macOS
uses: maxim-lobanov/setup-xamarin@v1
if: ${{ matrix.os.category == 'macos' }}
with:
mono-version: latest

- name: Checkout code
uses: actions/checkout@v2

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Currently v4 is out, any reason to stick to v2?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just copied this from upstream, other than turning off the performance tests, which weren't working. I think it makes sense to match upstream, but what do you think?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it, makes sense.


- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: '6.0.x'

- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python }}
architecture: ${{ matrix.os.platform }}

- name: Install dependencies
run: |
pip install --upgrade -r requirements.txt
pip install numpy # for tests

- name: Build and Install
run: |
pip install -v .

- name: Set Python DLL path and PYTHONHOME (non Windows)
if: ${{ matrix.os.category != 'windows' }}
run: |
echo PYTHONNET_PYDLL=$(python -m find_libpython) >> $GITHUB_ENV
echo PYTHONHOME=$(python -c 'import sys; print(sys.prefix)') >> $GITHUB_ENV

- name: Set Python DLL path and PYTHONHOME (Windows)
if: ${{ matrix.os.category == 'windows' }}
run: |
Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append -InputObject "PYTHONNET_PYDLL=$(python -m find_libpython)"
Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append -InputObject "PYTHONHOME=$(python -c 'import sys; print(sys.prefix)')"

- name: Embedding tests
run: dotnet test --runtime any-${{ matrix.os.platform }} --logger "console;verbosity=detailed" src/embed_tests/
env:
MONO_THREADS_SUSPEND: preemptive # https://github.com/mono/mono/issues/21466

- name: Python Tests (Mono)
if: ${{ matrix.os.category != 'windows' }}
run: pytest --runtime mono

# TODO: Run these tests on Windows x86
- name: Python Tests (.NET Core)
if: ${{ matrix.os.platform == 'x64' }}
run: pytest --runtime coreclr

- name: Python Tests (.NET Framework)
if: ${{ matrix.os.category == 'windows' }}
run: pytest --runtime netfx

- name: Python tests run from .NET
run: dotnet test --runtime any-${{ matrix.os.platform }} src/python_tests_runner/

# - name: Perf tests
# if: ${{ (matrix.python == '3.8') && (matrix.os.platform == 'x64') }}
# run: |
# pip install --force --no-deps --target src/perf_tests/baseline/ pythonnet==2.5.2
# dotnet test --configuration Release --runtime any-${{ matrix.os.platform }} --logger "console;verbosity=detailed" src/perf_tests/

# TODO: Run mono tests on Windows?
64 changes: 64 additions & 0 deletions .github/workflows/nuget-preview.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: NuGet Preview Release

on:
push:
branches:
- dynamo_py3
workflow_dispatch:

jobs:
release:
name: Release Preview
runs-on: ubuntu-latest
environment: NuGet
timeout-minutes: 10

env:
PYTHONNET_SHUTDOWN_MODE: Normal

steps:
- name: Get Date
run: |
echo "DATE_VER=$(date "+%Y-%m-%d")" >> $GITHUB_ENV

- name: Checkout code
uses: actions/checkout@v2

- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: '6.0.x'

- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8
architecture: x64

- name: Install dependencies
run: |
pip install --upgrade -r requirements.txt
pip install numpy # for tests

- name: Build and Install
run: |
pip install -v .

- name: Set Python DLL path (non Windows)
if: ${{ matrix.os != 'windows' }}
run: |
echo PYTHONNET_PYDLL=$(python -m find_libpython) >> $GITHUB_ENV

- name: Python Tests
run: pytest

- name: Embedding tests
run: dotnet test --runtime any-ubuntu src/embed_tests/

- name: Pack
run: dotnet pack --configuration Release --version-suffix preview${{env.DATE_VER}} --output "Release-Preview"

- name: Publish NuGet
run: |
dotnet nuget push --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.NUGET_MONTHLY }} Release-Preview/*.nupkg
dotnet nuget push --skip-duplicate --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.NUGET_MONTHLY }} Release-Preview/*.snupkg
17 changes: 0 additions & 17 deletions nuget.config

This file was deleted.

66 changes: 0 additions & 66 deletions pipeline.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,6 @@
version: 3.1.0
pipeline_os: linux
main_branch: dynamo_py3
update_changelog_on_release: true
create_github_release: true
create_pr_release_to_master: true

env:
- GITHUB_ACCESS_TOKEN_ID: github_access_token_acsbuildguy
# - SLACK_QUANTUM_BUILD_CHANNEL: dynamo-vera-notify

jenkins_creds:
-
type: secretText
credentialsId: svc_d_dyntest-apikey-artifactory-dynamo-team-nuget
secretText: API_KEY

# code_analysis:
# sonarqube:
# source_encoding: UTF-8
# src: .
# coverage_reports:
# - coverage.info

build:
-
Expand All @@ -30,30 +10,6 @@ build:
scripts:
- scripts/install.sh

ci_test:
tests:
-
customized_builder_image:
registry: artifactory
url: artifactory.dev.adskengineer.net/dynamo/pythonnet-build:2.0.1
scripts:
- scripts/install.sh
- scripts/test.sh

publish_html_reports:
-
report_name: Embed Tests
report_index_file: src/embed_tests/TestResults/embed_tests-output.html
report_dir: .
-
report_name: Module Tests
report_index_file: src/module_tests/TestResults/module_tests-output.html
report_dir: .
-
report_name: Python Tests Runner
report_index_file: src/python_tests_runner/TestResults/python_tests_runner-output.html
report_dir: .

soc2:
harmony:
allow_branches:
Expand All @@ -63,25 +19,3 @@ soc2:
third_party_lib_paths:
- build\lib\pythonnet\runtime
analyze_results : true

deployment:
# CILibrary doesn't yet support signing on Linux. I tried to get this going, but haven't figured it out yet. See the vera/nuget-deploy branch on the CILibrary repo.
# -
# type: sign
# files_to_sign:
# - pythonnet/runtime/Python.Runtime.dll
-
type: customized
allow_branches: dynamo_py3
customized_builder_image:
registry: artifactory
url: artifactory.dev.adskengineer.net/dynamo/pythonnet-build:2.0.1
scripts:
- dotnet pack --configuration Release --version-suffix preview-ADSK-$(date +%s) --output "Release-Preview"
- dotnet nuget push --source "Dynamo Artifactory" --api-key ${API_KEY} Release-Preview/*.nupkg
- dotnet nuget push --skip-duplicate --source "Dynamo Artifactory" --api-key ${API_KEY} Release-Preview/*.snupkg

-
type: github
outputs:
- build\lib\pythonnet\runtime\Python.Runtime.dll
15 changes: 0 additions & 15 deletions scripts/test.sh

This file was deleted.

Loading