diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d07f6165315e..b1c56f2535ae 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -28,6 +28,7 @@ jobs: run: shell: python outputs: + vsix_basename: ${{ steps.vsix_names.outputs.vsix_basename }} vsix_name: ${{ steps.vsix_names.outputs.vsix_name }} vsix_artifact_name: ${{ steps.vsix_names.outputs.vsix_artifact_name }} steps: @@ -40,13 +41,45 @@ jobs: else: vsix_type = "release" print(f"::set-output name=vsix_name::ms-python-{vsix_type}.vsix") + print(f"::set-output name=vsix_basename::ms-python-{vsix_type}") print(f"::set-output name=vsix_artifact_name::ms-python-{vsix_type}-vsix") build-vsix: name: Create VSIX if: github.repository == 'microsoft/vscode-python' needs: setup - runs-on: ubuntu-latest + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + include: + - os: windows-latest + target: x86_64-pc-windows-msvc + vsix-target: win32-x64 + - os: windows-latest + target: aarch64-pc-windows-msvc + vsix-target: win32-arm64 + - os: ubuntu-latest + target: x86_64-unknown-linux-musl + vsix-target: linux-x64 + # - os: ubuntu-latest + # target: aarch64-unknown-linux-gnu + # vsix-target: linux-arm64 + # - os: ubuntu-latest + # target: arm-unknown-linux-gnueabihf + # vsix-target: linux-armhf + - os: macos-latest + target: x86_64-apple-darwin + vsix-target: darwin-x64 + - os: macos-14 + target: aarch64-apple-darwin + vsix-target: darwin-arm64 + - os: ubuntu-latest + target: x86_64-unknown-linux-musl + vsix-target: alpine-x64 + # - os: ubuntu-latest + # target: aarch64-unknown-linux-musl + # vsix-target: alpine-arm64 steps: - name: Checkout uses: actions/checkout@v4 @@ -54,9 +87,11 @@ jobs: - name: Build VSIX uses: ./.github/actions/build-vsix with: - node_version: ${{ env.NODE_VERSION }} - vsix_name: ${{ needs.setup.outputs.vsix_name }} - artifact_name: ${{ needs.setup.outputs.vsix_artifact_name }} + node_version: ${{ env.NODE_VERSION}} + vsix_name: ${{ needs.setup.outputs.vsix_basename }}-${{ matrix.vsix-target }}.vsix' + artifact_name: '${{ needs.setup.outputs.vsix_artifact_name }}-${{ matrix.vsix-target }}' + cargo_target: ${{ matrix.target }} + vsix_target: ${{ matrix.vsix-target }} lint: name: Lint diff --git a/.github/workflows/pr-check.yml b/.github/workflows/pr-check.yml index 47fb13807121..0efd568e0346 100644 --- a/.github/workflows/pr-check.yml +++ b/.github/workflows/pr-check.yml @@ -33,7 +33,7 @@ jobs: target: aarch64-pc-windows-msvc vsix-target: win32-arm64 - os: ubuntu-latest - target: x86_64-unknown-linux-gnu + target: x86_64-unknown-linux-musl vsix-target: linux-x64 # - os: ubuntu-latest # target: aarch64-unknown-linux-gnu diff --git a/noxfile.py b/noxfile.py index 0e0e8803c3d1..e0fc26988d5b 100644 --- a/noxfile.py +++ b/noxfile.py @@ -5,9 +5,10 @@ import pathlib import nox import shutil -import sys import sysconfig +EXT_ROOT = pathlib.Path(__file__).parent + @nox.session() def install_python_libs(session: nox.Session): @@ -91,6 +92,13 @@ def native_build(session: nox.Session): dest = f"./bin/python-finder{ext}" shutil.copy(source, dest) + # Remove native_locator/bin exclusion from .vscodeignore + vscode_ignore = EXT_ROOT / ".vscodeignore" + remove_patterns = ("native_locator/bin/**",) + lines = vscode_ignore.read_text(encoding="utf-8").splitlines() + filtered_lines = [line for line in lines if not line.startswith(remove_patterns)] + vscode_ignore.write_text("\n".join(filtered_lines) + "\n", encoding="utf-8") + @nox.session() def setup_repo(session: nox.Session):