From a330e24ab053ad86a0fa18cdfa4e752582456216 Mon Sep 17 00:00:00 2001 From: Victor Milovanov Date: Thu, 11 Feb 2021 12:14:12 -0800 Subject: [PATCH] monthly NuGet release previews --- .github/workflows/nuget-preview.yml | 60 +++++++++++++++++++++++++++++ Directory.Build.props | 1 + LICENSE | 2 +- pythonnet.sln | 20 ++++------ src/runtime/Python.Runtime.csproj | 17 +++++++- 5 files changed, 86 insertions(+), 14 deletions(-) create mode 100644 .github/workflows/nuget-preview.yml diff --git a/.github/workflows/nuget-preview.yml b/.github/workflows/nuget-preview.yml new file mode 100644 index 000000000..951529452 --- /dev/null +++ b/.github/workflows/nuget-preview.yml @@ -0,0 +1,60 @@ +name: GitHub Actions + +on: + schedule: + - cron: "5 4 3 */1 *" # once a month, at 4:05 on 3rd + +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 + + - 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 + + - name: Build and Install + run: | + python setup.py configure + pip install -v . + + - name: Python Tests + run: pytest + env: + PYTHONNET_PYDLL: libpython3.8.so + + - name: Embedding tests + run: dotnet test --runtime any-ubuntu src/embed_tests/ + env: + PYTHONNET_PYDLL: libpython3.8.so + + - 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 + + # TODO: Run perf tests + # TODO: Run mono tests on Windows? diff --git a/Directory.Build.props b/Directory.Build.props index cad319287..55d091b4e 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -5,6 +5,7 @@ pythonnet Python.NET 7.3 + false diff --git a/LICENSE b/LICENSE index 19c31a12f..f3a638346 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2006-2020 the contributors of the Python.NET project +Copyright (c) 2006-2021 the contributors of the Python.NET project Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), diff --git a/pythonnet.sln b/pythonnet.sln index 4da4d7e99..c80ee8e60 100644 --- a/pythonnet.sln +++ b/pythonnet.sln @@ -21,6 +21,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Repo", "Repo", "{441A0123-F .editorconfig = .editorconfig .gitignore = .gitignore CHANGELOG.md = CHANGELOG.md + LICENSE = LICENSE README.rst = README.rst EndProjectSection EndProject @@ -30,6 +31,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "CI", "CI", "{D301657F-5EAF- ci\appveyor_build_recipe.ps1 = ci\appveyor_build_recipe.ps1 ci\appveyor_run_tests.ps1 = ci\appveyor_run_tests.ps1 .github\workflows\main.yml = .github\workflows\main.yml + .github\workflows\nuget-preview.yml = .github\workflows\nuget-preview.yml EndProjectSection EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{57F5D701-F265-4736-A5A2-07249E7A4DA3}" @@ -51,6 +53,12 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tools", "Tools", "{BC426F42 EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Python.PythonTestsRunner", "src\python_tests_runner\Python.PythonTestsRunner.csproj", "{35CBBDEB-FC07-4D04-9D3E-F88FC180110B}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Build", "Build", "{142A6752-C2C2-4F95-B982-193418001B65}" + ProjectSection(SolutionItems) = preProject + configured.props = configured.props + Directory.Build.props = Directory.Build.props + EndProjectSection +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -145,18 +153,6 @@ Global {F2FB6DA3-318E-4F30-9A1F-932C667E38C5}.Release|x64.Build.0 = Release|Any CPU {F2FB6DA3-318E-4F30-9A1F-932C667E38C5}.Release|x86.ActiveCfg = Release|Any CPU {F2FB6DA3-318E-4F30-9A1F-932C667E38C5}.Release|x86.Build.0 = Release|Any CPU - {6CF9EEA0-F865-4536-AABA-739AE3DA971E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {6CF9EEA0-F865-4536-AABA-739AE3DA971E}.Debug|Any CPU.Build.0 = Debug|Any CPU - {6CF9EEA0-F865-4536-AABA-739AE3DA971E}.Debug|x64.ActiveCfg = Debug|Any CPU - {6CF9EEA0-F865-4536-AABA-739AE3DA971E}.Debug|x64.Build.0 = Debug|Any CPU - {6CF9EEA0-F865-4536-AABA-739AE3DA971E}.Debug|x86.ActiveCfg = Debug|Any CPU - {6CF9EEA0-F865-4536-AABA-739AE3DA971E}.Debug|x86.Build.0 = Debug|Any CPU - {6CF9EEA0-F865-4536-AABA-739AE3DA971E}.Release|Any CPU.ActiveCfg = Release|Any CPU - {6CF9EEA0-F865-4536-AABA-739AE3DA971E}.Release|Any CPU.Build.0 = Release|Any CPU - {6CF9EEA0-F865-4536-AABA-739AE3DA971E}.Release|x64.ActiveCfg = Release|Any CPU - {6CF9EEA0-F865-4536-AABA-739AE3DA971E}.Release|x64.Build.0 = Release|Any CPU - {6CF9EEA0-F865-4536-AABA-739AE3DA971E}.Release|x86.ActiveCfg = Release|Any CPU - {6CF9EEA0-F865-4536-AABA-739AE3DA971E}.Release|x86.Build.0 = Release|Any CPU {35CBBDEB-FC07-4D04-9D3E-F88FC180110B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {35CBBDEB-FC07-4D04-9D3E-F88FC180110B}.Debug|Any CPU.Build.0 = Debug|Any CPU {35CBBDEB-FC07-4D04-9D3E-F88FC180110B}.Debug|x64.ActiveCfg = Debug|Any CPU diff --git a/src/runtime/Python.Runtime.csproj b/src/runtime/Python.Runtime.csproj index 32a467dd8..aa2ea4f91 100644 --- a/src/runtime/Python.Runtime.csproj +++ b/src/runtime/Python.Runtime.csproj @@ -5,21 +5,35 @@ 9.0 Python.Runtime Python.Runtime + pythonnet - https://github.com/pythonnet/pythonnet/blob/master/LICENSE + LICENSE https://github.com/pythonnet/pythonnet git python interop dynamic dlr Mono pinvoke https://raw.githubusercontent.com/pythonnet/pythonnet/master/src/console/python-clear.ico https://pythonnet.github.io/ + true + Python and CLR (.NET and Mono) cross-platform language interop + + true + true + snupkg + 1591;NU1701 True + + true $(DefineConstants);$(ConfiguredConstants) + + + + @@ -30,5 +44,6 @@ +