-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Expand file tree
/
Copy pathaction.yml
More file actions
95 lines (80 loc) · 2.57 KB
/
action.yml
File metadata and controls
95 lines (80 loc) · 2.57 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
name: 'Build VSIX'
description: "Build the extension's VSIX"
inputs:
node_version:
description: 'Version of Node to install'
required: true
vsix_name:
description: 'Name to give the final VSIX'
required: true
artifact_name:
description: 'Name to give the artifact containing the VSIX'
required: true
cargo_target:
description: 'Cargo build target for the native build'
required: true
vsix_target:
description: 'vsix build target for the native build'
required: true
runs:
using: 'composite'
steps:
- name: Install Node
uses: actions/setup-node@v4
with:
node-version: ${{ inputs.node_version }}
cache: 'npm'
- name: Rust Tool Chain setup
uses: dtolnay/rust-toolchain@stable
# Jedi LS depends on dataclasses which is not in the stdlib in Python 3.7.
- name: Use Python 3.8 for JediLSP
uses: actions/setup-python@v5
with:
python-version: 3.8
cache: 'pip'
cache-dependency-path: |
requirements.txt
python_files/jedilsp_requirements/requirements.txt
- name: Upgrade Pip
run: python -m pip install -U pip
shell: bash
# For faster/better builds of sdists.
- name: Install build pre-requisite
run: python -m pip install wheel nox
shell: bash
- name: Install Python Extension dependencies (jedi, etc.)
run: nox --session install_python_libs
shell: bash
- name: Add Rustup target
run: rustup target add ${{ inputs.cargo_target }}
shell: bash
- name: Build Native Binaries
run: nox --session native_build
shell: bash
env:
CARGO_TARGET: ${{ inputs.cargo_target }}
- name: Run npm ci
run: npm ci --prefer-offline
shell: bash
- name: Update optional extension dependencies
run: npm run addExtensionPackDependencies
shell: bash
- name: Build Webpack
run: |
npx gulp clean
npx gulp prePublishBundle
shell: bash
- name: Build VSIX
run: npx vsce package --target ${{ inputs.vsix_target }} --out ms-python-insiders.vsix --pre-release
shell: bash
- name: Rename VSIX
# Move to a temp name in case the specified name happens to match the default name.
run: mv ms-python-insiders.vsix ms-python-temp.vsix && mv ms-python-temp.vsix ${{ inputs.vsix_name }}
shell: bash
- name: Upload VSIX
uses: actions/upload-artifact@v4
with:
name: ${{ inputs.artifact_name }}
path: ${{ inputs.vsix_name }}
if-no-files-found: error
retention-days: 7