Skip to content
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

Add support for Python Environment Tools #23643

Merged
merged 39 commits into from
Jun 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
fbd3437
Build native binaries for pre-release
karthiknadig May 24, 2024
cb19f61
Add native build step
karthiknadig May 24, 2024
925b64d
Fix gulp
karthiknadig May 24, 2024
7b86024
chore: use Linux pools for Alpine builds (#23534)
rzhao271 Jun 6, 2024
de7b794
Add support for python-environment-tools build (#23573)
karthiknadig Jun 7, 2024
935db2a
Use absolute path for better diagnosis
karthiknadig Jun 7, 2024
043cacb
More tweaks to pre-release build
karthiknadig Jun 7, 2024
ad19909
more tweaks
karthiknadig Jun 7, 2024
7b7166d
Fix task bug
karthiknadig Jun 7, 2024
674ad1d
Tweak path further
karthiknadig Jun 7, 2024
a00a48f
Try another path tweak
karthiknadig Jun 7, 2024
065255f
Ensure checkout
karthiknadig Jun 7, 2024
18f15f1
Include the python env tools into the SDL
karthiknadig Jun 7, 2024
5a5a38e
Fix PR check
karthiknadig Jun 7, 2024
95dfd6d
Fix SDL variable
karthiknadig Jun 13, 2024
31928a4
Add translation repo
karthiknadig Jun 13, 2024
ff884ed
Tweak paths
karthiknadig Jun 13, 2024
fbc5df5
Reorder tasks
karthiknadig Jun 13, 2024
e484fb9
Ensure self checkout
karthiknadig Jun 13, 2024
e6f3ed9
Try path fix
karthiknadig Jun 13, 2024
3091e16
Try another path
karthiknadig Jun 13, 2024
c90e3a7
Try more precise paths
karthiknadig Jun 13, 2024
e15b436
Fix paths
karthiknadig Jun 13, 2024
a9eaf8d
Try relative path
karthiknadig Jun 13, 2024
e15ab08
Try different path style
karthiknadig Jun 13, 2024
5803ad9
Ensure we use preferred rustc flags
karthiknadig Jun 13, 2024
56d17a0
Fix web builds
karthiknadig Jun 14, 2024
cf6ac20
Compile rust using a build template and sign binaries
karthiknadig Jun 18, 2024
bd4d33f
Tweak Rust build params
karthiknadig Jun 18, 2024
677ad43
Use custom branch temporarily for templates
karthiknadig Jun 18, 2024
7097f42
Tweak vsce target
karthiknadig Jun 18, 2024
330b716
Another tweak to build variables
karthiknadig Jun 18, 2024
4471431
Some package updates for publishing
karthiknadig Jun 18, 2024
6710c1b
Use different template
karthiknadig Jun 19, 2024
6a01391
Skip tests while building
karthiknadig Jun 19, 2024
885ec4f
Remove armhf as it is not supported
karthiknadig Jun 19, 2024
706413f
Disable arm64
karthiknadig Jun 20, 2024
54fe5d7
Fix path
karthiknadig Jun 21, 2024
5ab06d5
Restore templates to main
karthiknadig Jun 21, 2024
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
33 changes: 33 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,17 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Checkout Python Environment Tools
uses: actions/checkout@v4
with:
repository: 'microsoft/python-environment-tools'
path: 'python-env-tools'
sparse-checkout: |
crates
Cargo.toml
Cargo.lock
sparse-checkout-cone-mode: false

- name: Build VSIX
uses: ./.github/actions/build-vsix
with:
Expand Down Expand Up @@ -201,6 +212,17 @@ jobs:
with:
path: ${{ env.special-working-directory-relative }}

- name: Checkout Python Environment Tools
uses: actions/checkout@v4
with:
repository: 'microsoft/python-environment-tools'
path: ${{ env.special-working-directory-relative }}/python-env-tools
sparse-checkout: |
crates
Cargo.toml
Cargo.lock
sparse-checkout-cone-mode: false

- name: Install Node
uses: actions/setup-node@v4
with:
Expand Down Expand Up @@ -387,6 +409,17 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Checkout Python Environment Tools
uses: actions/checkout@v4
with:
repository: 'microsoft/python-environment-tools'
path: ${{ env.special-working-directory-relative }}/python-env-tools
sparse-checkout: |
crates
Cargo.toml
Cargo.lock
sparse-checkout-cone-mode: false

- name: Smoke tests
uses: ./.github/actions/smoke-tests
with:
Expand Down
70 changes: 68 additions & 2 deletions .github/workflows/pr-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,17 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Checkout Python Environment Tools
uses: actions/checkout@v4
with:
repository: 'microsoft/python-environment-tools'
path: 'python-env-tools'
sparse-checkout: |
crates
Cargo.toml
Cargo.lock
sparse-checkout-cone-mode: false

- name: Build VSIX
uses: ./.github/actions/build-vsix
with:
Expand Down Expand Up @@ -90,6 +101,17 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Checkout Python Environment Tools
uses: actions/checkout@v4
with:
repository: 'microsoft/python-environment-tools'
path: 'python-env-tools'
sparse-checkout: |
crates
Cargo.toml
Cargo.lock
sparse-checkout-cone-mode: false

- name: Install base Python requirements
uses: brettcannon/pip-secure-install@v1
with:
Expand Down Expand Up @@ -186,6 +208,17 @@ jobs:
with:
path: ${{ env.special-working-directory-relative }}

- name: Checkout Python Environment Tools
uses: actions/checkout@v4
with:
repository: 'microsoft/python-environment-tools'
path: ${{ env.special-working-directory-relative }}/python-env-tools
sparse-checkout: |
crates
Cargo.toml
Cargo.lock
sparse-checkout-cone-mode: false

- name: Install Node
uses: actions/setup-node@v4
with:
Expand Down Expand Up @@ -363,9 +396,20 @@ jobs:
with:
path: ${{ env.special-working-directory-relative }}

- name: Native Locator tests
- name: Checkout Python Environment Tools
uses: actions/checkout@v4
with:
repository: 'microsoft/python-environment-tools'
path: ${{ env.special-working-directory-relative }}/python-env-tools
sparse-checkout: |
crates
Cargo.toml
Cargo.lock
sparse-checkout-cone-mode: false

- name: Python Environment Tools tests
run: cargo test -- --nocapture
working-directory: ${{ env.special-working-directory }}/native_locator
working-directory: ${{ env.special-working-directory }}/python-env-tools

smoke-tests:
name: Smoke tests
Expand All @@ -388,6 +432,17 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Checkout Python Environment Tools
uses: actions/checkout@v4
with:
repository: 'microsoft/python-environment-tools'
path: python-env-tools
sparse-checkout: |
crates
Cargo.toml
Cargo.lock
sparse-checkout-cone-mode: false

- name: Smoke tests
uses: ./.github/actions/smoke-tests
with:
Expand All @@ -409,6 +464,17 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Checkout Python Environment Tools
uses: actions/checkout@v4
with:
repository: 'microsoft/python-environment-tools'
path: python-env-tools
sparse-checkout: |
crates
Cargo.toml
Cargo.lock
sparse-checkout-cone-mode: false

- name: Install Node
uses: actions/setup-node@v4
with:
Expand Down
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -48,5 +48,4 @@ dist/**
*.xlf
package.nls.*.json
l10n/
native_locator/target/**
native_locator/Cargo.lock
python-env-tools/**
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,6 @@
"python.testing.unittestEnabled": false,
"python.testing.pytestEnabled": true,
"rust-analyzer.linkedProjects": [
".\\native_locator\\Cargo.toml"
".\\python-env-tools\\Cargo.toml"
]
}
11 changes: 5 additions & 6 deletions .vscodeignore
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,8 @@ test/**
tmp/**
typings/**
types/**
native_locator/.vscode/**
native_locator/src/**
native_locator/tests/**
native_locator/bin/**
native_locator/target/**
native_locator/Cargo.*
python-env-tools/.github/**
python-env-tools/.vscode/**
python-env-tools/crates/**
python-env-tools/target/**
python-env-tools/Cargo.*
93 changes: 79 additions & 14 deletions build/azure-pipeline.pre-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,13 @@ resources:
ref: main
endpoint: Monaco

- repository: python-environment-tools
type: github
name: microsoft/python-environment-tools
ref: main
endpoint: Monaco


parameters:
- name: publishExtension
displayName: 🚀 Publish Extension
Expand All @@ -30,7 +37,48 @@ extends:
publishExtension: ${{ parameters.publishExtension }}
ghCreateTag: false
l10nSourcePaths: ./src/client
sourceRepositoriesToScan:
include:
- repository: python-environment-tools
exclude:
- repository: translations

buildPlatforms:
- name: Linux
vsceTarget: 'web'
# - name: Linux
# packageArch: arm64
# vsceTarget: linux-arm64
# - name: Linux
# packageArch: arm
# vsceTarget: linux-armhf
- name: Linux
packageArch: x64
vsceTarget: linux-x64
# - name: Linux
# packageArch: arm64
# vsceTarget: alpine-arm64
- name: Linux
packageArch: x64
vsceTarget: alpine-x64
- name: MacOS
packageArch: arm64
vsceTarget: darwin-arm64
- name: MacOS
packageArch: x64
vsceTarget: darwin-x64
- name: Windows
packageArch: arm
vsceTarget: win32-arm64
- name: Windows
packageArch: x64
vsceTarget: win32-x64

buildSteps:
- checkout: self
displayName: Checkout Python Extension
path: ./s

- task: NodeTool@0
inputs:
versionSpec: '18.17.1'
Expand All @@ -43,37 +91,54 @@ extends:
architecture: 'x64'
displayName: Select Python version

- script: npm ci
displayName: Install NPM dependencies

- script: python -m pip install -U pip
displayName: Upgrade pip

- script: python -m pip install wheel nox
displayName: Install wheel and nox

- script: |
nox --session install_python_libs
- script: npm ci
displayName: Install NPM dependencies

- script: nox --session install_python_libs
displayName: Install Jedi, get-pip, etc

- script: |
python ./build/update_ext_version.py --for-publishing
- script: python ./build/update_ext_version.py --for-publishing
displayName: Update build number

- script: |
python ./build/update_package_file.py
- script: python ./build/update_package_file.py
displayName: Update telemetry in package.json

- script: npm run addExtensionPackDependencies
displayName: Update optional extension dependencies

- script: gulp prePublishBundle
- script: npx gulp prePublishBundle
displayName: Build

- checkout: python-environment-tools
displayName: Checkout python-environment-tools
path: ./s/python-env-tools

- script: nox --session azure_pet_build_before
displayName: Enable cargo config for azure

- template: azure-pipelines/extension/templates/steps/build-extension-rust-package.yml@templates
parameters:
vsceTarget: $(vsceTarget)
binaryName: pet
signing: true
workingDirectory: $(Build.SourcesDirectory)/python-env-tools
buildWasm: false
runTest: false

- script: nox --session azure_pet_build_after
displayName: Move bin to final location

- script: python -c "import shutil; shutil.rmtree('.nox', ignore_errors=True)"
displayName: Clean up Nox

tsa:
config:
areaPath: 'Visual Studio Code Python Extensions'
serviceTreeID: '6e6194bc-7baa-4486-86d0-9f5419626d46'
enabled: true
config:
areaPath: 'Visual Studio Code Python Extensions'
serviceTreeID: '6e6194bc-7baa-4486-86d0-9f5419626d46'
enabled: true
3 changes: 0 additions & 3 deletions native_locator/.vscode/settings.json

This file was deleted.

23 changes: 0 additions & 23 deletions native_locator/Cargo.toml

This file was deleted.

Loading
Loading