Skip to content
This repository was archived by the owner on Oct 1, 2024. It is now read-only.

Commit 966b1ea

Browse files
authored
Merge branch 'main' into build_prefs_fix
2 parents 33b083f + faf7735 commit 966b1ea

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+4424
-980
lines changed

.ackrc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
--ignore-dir=out
2+
--ignore-dir=.vscode-test

.eslintrc.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
env:
2+
browser: true
3+
es6: true
4+
extends:
5+
- 'eslint:recommended'
6+
- 'plugin:react/recommended'
7+
- 'plugin:@typescript-eslint/eslint-recommended'
8+
globals:
9+
Atomics: readonly
10+
SharedArrayBuffer: readonly
11+
parser: '@typescript-eslint/parser'
12+
parserOptions:
13+
ecmaFeatures:
14+
jsx: true
15+
ecmaVersion: 2018
16+
sourceType: module
17+
plugins:
18+
- react
19+
- '@typescript-eslint'
20+
rules: {
21+
"no-empty": ["error", { "allowEmptyCatch": true }],
22+
"@typescript-eslint/no-unused-vars": ["error", { "args": "none" }]
23+
}
24+

.github/workflows/build.yml

Lines changed: 59 additions & 88 deletions
Original file line numberDiff line numberDiff line change
@@ -1,116 +1,87 @@
1-
name: CI-Tests
1+
# Copyright (c) Microsoft Corporation.
2+
# Licensed under the MIT License.
3+
4+
name: CI
5+
26
on:
37
push:
48
branches:
5-
- master
6-
- develop
9+
- main
10+
- release
711
tags:
812
- v*
913
pull_request:
1014
branches:
11-
- master
12-
- develop
13-
15+
- main
16+
- release
1417

1518
jobs:
1619
build:
17-
runs-on: ${{ matrix.os }}
20+
runs-on: ${{ matrix.os }}
1821
strategy:
22+
fail-fast: false
1923
matrix:
2024
os: [ ubuntu-latest, macos-latest, windows-latest ]
21-
25+
2226
steps:
23-
- name: checkout
27+
- name: Checkout
2428
uses: actions/checkout@v2
25-
- name: get node
26-
uses: actions/setup-node@v1
29+
30+
# Node 14 matches the version of Node used by VS Code when this was
31+
# written, but it should be updated when VS Code updates its Node version.
32+
# Node needs to be installed before OS-specific setup so that we can run
33+
# the hash verification script.
34+
- name: Use Node 14.x
35+
uses: actions/setup-node@v2
2736
with:
28-
node-version: 11.x
29-
- name: linux setup
37+
node-version: 14.x
38+
39+
- name: Windows setup
40+
if: ${{ matrix.os == 'windows-latest' }}
41+
run: |
42+
curl -LO https://downloads.arduino.cc/arduino-1.8.19-windows.zip
43+
node build/checkHash.js arduino-1.8.19-windows.zip `
44+
c704a821089eab2588f1deae775916219b1517febd1dd574ff29958dca873945
45+
7z x arduino-1.8.19-windows.zip -o"$Env:TEMP\arduino-ide"
46+
echo "$Env:TEMP\arduino-ide\arduino-1.8.19" | Out-File -FilePath $env:GITHUB_PATH -Append
47+
- name: Linux setup
3048
if: ${{ matrix.os == 'ubuntu-latest' }}
3149
run: |
3250
export CXX="g++-4.9" CC="gcc-4.9" DISPLAY=:99.0
3351
sleep 3
34-
wget https://downloads.arduino.cc/arduino-1.8.2-linux64.tar.xz -P /home/$USER
35-
tar -xvf /home/$USER/arduino-1.8.2-linux64.tar.xz -C /home/$USER/
36-
sudo ln -s /home/$USER/arduino-1.8.2/arduino /usr/bin/arduino
52+
wget https://downloads.arduino.cc/arduino-1.8.19-linux64.tar.xz -P /home/$USER
53+
node build/checkHash.js /home/$USER/arduino-1.8.19-linux64.tar.xz \
54+
eb68bddc1d1c0120be2fca1350a03ee34531cf37f51847b21210b6e70545bc9b
55+
tar -xvf /home/$USER/arduino-1.8.19-linux64.tar.xz -C /home/$USER/
56+
sudo ln -s /home/$USER/arduino-1.8.19/arduino /usr/bin/arduino
3757
sudo apt-get update
38-
sudo apt-get install g++-multilib
39-
sudo apt-get install -y build-essential
40-
sudo apt-get install libudev-dev
41-
- name: macos setup
58+
sudo apt-get install -y g++-multilib build-essential libudev-dev
59+
- name: macOS setup
4260
if: ${{ matrix.os == 'macos-latest' }}
43-
run: |
61+
run: |
4462
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
4563
brew install arduino --cask
46-
- name: preinstall
47-
run: |
48-
npm install -g node-gyp
49-
npm install -g vsce
50-
npm install -g gulp
51-
- name: install
52-
run: npm install
53-
- name: scripts
54-
run: |
55-
gulp tslint
56-
vsce package
57-
- name: run tests
64+
65+
# Windows agents already have gulp installed.
66+
- name: Install gulp
5867
if: ${{ matrix.os != 'windows-latest' }}
68+
run: npm install --global gulp
69+
- name: Install global dependencies
70+
run: npm install --global node-gyp vsce
71+
- name: Install project dependencies
72+
run: npm install
73+
74+
- name: Check for linting errors
75+
run: gulp tslint
76+
- name: Build and pack extension
77+
run: vsce package --out vscode-arduino.vsix
78+
- name: Publish extension VSIX as artifact
79+
uses: actions/upload-artifact@v2
80+
with:
81+
name: VS Code extension VSIX (${{ matrix.os }})
82+
path: vscode-arduino.vsix
83+
84+
- name: Run tests
5985
uses: GabrielBB/xvfb-action@v1
6086
with:
6187
run: npm test --silent
62-
63-
deploy:
64-
needs: build
65-
runs-on: ubuntu-latest
66-
environment: vsix-publishing
67-
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
68-
steps:
69-
- run: echo "VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
70-
- run: echo ${{env.VERSION}}
71-
- name: Checkout
72-
uses: actions/checkout@v2
73-
- name: get node
74-
uses: actions/setup-node@v1
75-
with:
76-
node-version: 11.x
77-
- name: linux setup
78-
run: |
79-
export CXX="g++-4.9" CC="gcc-4.9" DISPLAY=:99.0
80-
sleep 3
81-
sudo apt-get update
82-
sudo apt-get install g++-multilib
83-
sudo apt-get install -y build-essential
84-
sudo apt-get install libudev-dev
85-
- name: preinstall
86-
run: |
87-
npm install -g node-gyp
88-
npm install -g vsce
89-
npm install -g gulp
90-
- name: install
91-
run: npm install
92-
- name: scripts
93-
run: |
94-
gulp tslint
95-
vsce package
96-
- name: upload .vsix to github tag
97-
uses: svenstaro/upload-release-action@v2
98-
with:
99-
repo_token: ${{ secrets.OAUTH_TOKEN }}
100-
file: ${{github.workspace}}/vscode-arduino*.vsix
101-
tag: ${{ github.ref }}
102-
overwrite: true
103-
file_glob: true
104-
- name: check for production tag
105-
id: check-version
106-
run: |
107-
if [[ ${{ env.VERSION }} =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
108-
echo ::set-output name=ISPRODUCTION::true
109-
fi
110-
- name: publish
111-
if: steps.check-version.outputs.ISPRODUCTION == 'true'
112-
env:
113-
PROD_AIKEY: ${{ secrets.PROD_AIKEY }}
114-
run: |
115-
gulp genAikey
116-
vsce publish -p ${{ secrets.VSCE_TOKEN }}

.github/workflows/fixed-issues.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Close fixed issues
2+
3+
on:
4+
push:
5+
tags:
6+
- "v[0-9]+.[0-9]+.[0-9]+"
7+
workflow_dispatch:
8+
9+
permissions:
10+
issues: write
11+
12+
jobs:
13+
fixed:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/[email protected]
17+
with:
18+
days-before-stale: 0
19+
days-before-close: 0
20+
ignore-updates: true
21+
remove-stale-when-updated: false
22+
close-issue-message: >-
23+
This issue has been fixed in the latest release of this extension,
24+
which is available in the VS Code extension marketplace.
25+
stale-issue-label: fixed-pending-release
26+
only-labels: fixed-pending-release

.github/workflows/remove-labels.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Remove labels from closed issues
2+
3+
on:
4+
issues:
5+
types:
6+
- closed
7+
8+
permissions:
9+
issues: write
10+
11+
jobs:
12+
label_issues:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Remove labels
16+
uses: andymckay/labeler@e6c4322d0397f3240f0e7e30a33b5c5df2d39e90
17+
with:
18+
remove-labels: triage, needs-more-info

.github/workflows/stale-issues.yml

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,29 @@
1-
name: Mark stale issues and close them
1+
name: Label and close stale issues
22

33
on:
44
schedule:
55
- cron: "0 * * * *"
6+
workflow_dispatch:
7+
8+
permissions:
9+
issues: write
610

711
jobs:
812
stale:
9-
1013
runs-on: ubuntu-latest
11-
1214
steps:
13-
- uses: blackchoey/stale@releases/v1.2
15+
- uses: actions/stale@v4.1.0
1416
with:
15-
repo-token: ${{ secrets.GITHUB_TOKEN }}
16-
stale-issue-message: 'This issue has been automatically marked as stale because it has no recent activities. It will be closed if no further activity occurs within 3 days. Thank you for your contributions.'
17-
stale-issue-label: 'stale'
18-
days-before-stale: 7
19-
only-labels: 'needs more info'
20-
last-updated-user-type: 'collaborator'
21-
days-before-close: 3
22-
operations-per-run: 150
17+
days-before-stale: 30
18+
days-before-close: 7
19+
stale-issue-message: >-
20+
This issue has been automatically marked as stale because it has been
21+
inactive for 30 days. To reactivate the issue, simply post a comment
22+
with the requested information to help us diagnose this issue. If this
23+
issue remains inactive for another 7 days, it will be automatically
24+
closed.
25+
close-issue-message: >-
26+
This issue has been automatically closed due to inactivity. If you are
27+
still experiencing problems, please open a new issue.
28+
stale-issue-label: stale
29+
only-labels: needs-more-info

.github/workflows/triage-issues.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Label new issues
2+
3+
on:
4+
issues:
5+
types:
6+
- opened
7+
- reopened
8+
9+
permissions:
10+
issues: write
11+
12+
jobs:
13+
label_issues:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Add triage label
17+
uses: andymckay/labeler@e6c4322d0397f3240f0e7e30a33b5c5df2d39e90
18+
with:
19+
add-labels: triage

.vscode/tasks.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"tasks": [
1616
{
1717
"label": "build",
18-
"args": [],
18+
"args": ["build"],
1919
"type": "shell",
2020
"group": "build",
2121
"isBackground": false,
@@ -25,7 +25,7 @@
2525
},
2626
{
2727
"label": "build_without_view",
28-
"args": [],
28+
"args": ["build_without_view"],
2929
"group": "build",
3030
"isBackground": false,
3131
"problemMatcher": [

.vscodeignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,6 @@ gulpfile.js
1515
*.log
1616
webpack.config.js
1717
node_modules/**
18-
vendor/**
18+
vendor/**
19+
azure-pipelines.yml
20+
build/**

0 commit comments

Comments
 (0)