forked from pythonnet/pythonnet
-
Notifications
You must be signed in to change notification settings - Fork 2
DYN-8502: Modify cicd for public github #1
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
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
6bc84bf
Modify cicd for public github
twastvedt 5a7f8ad
Haven't merged 3.13 yet
twastvedt 95cdde5
Remove custom nuget.config
twastvedt 9bb8c0d
Disable perf tests
twastvedt 9f13d5d
ARM available publicly?
twastvedt 778cce1
Different arm id?
twastvedt a5d4a74
Use default python on ARM
twastvedt 54baed8
.net framework issue fixed in .NET 9?
twastvedt 4b75bba
Specify framework?
twastvedt fb92b11
Disable ARM for now
twastvedt File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,7 +4,7 @@ on: | |
| push: | ||
| branches: | ||
| - master | ||
| pull_request: | ||
| # pull_request: | ||
|
|
||
| jobs: | ||
| build-test-arm: | ||
|
|
||
This file was deleted.
Oops, something went wrong.
This file contains hidden or 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
| 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 | ||
|
|
||
| - 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? | ||
This file contains hidden or 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
| 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 |
This file was deleted.
Oops, something went wrong.
This file contains hidden or 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
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it, makes sense.