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

Commit aa4910b

Browse files
authored
Merge branch 'main' into fix_no_verbose_sketch_stats_output
2 parents 0295850 + 849de32 commit aa4910b

24 files changed

+559
-195
lines changed

.github/workflows/build.yml

+59-92
Original file line numberDiff line numberDiff line change
@@ -1,120 +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-
- dev
9+
- main
10+
- release
711
tags:
812
- v*
913
pull_request:
1014
branches:
11-
- master
12-
- dev
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@"^1.0.0"
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@"^1.0.0"
89-
npm install -g gulp
90-
- name: install
91-
run: npm install
92-
- name: scripts
93-
run: |
94-
gulp tslint
95-
gulp genAikey
96-
vsce package
97-
- name: upload .vsix to github tag
98-
uses: svenstaro/upload-release-action@v2
99-
with:
100-
repo_token: ${{ secrets.OAUTH_TOKEN }}
101-
file: ${{github.workspace}}/vscode-arduino*.vsix
102-
tag: ${{ github.ref }}
103-
overwrite: true
104-
file_glob: true
105-
- name: check for production tag
106-
id: check-version
107-
run: |
108-
if [[ ${{ env.VERSION }} =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
109-
echo ::set-output name=ISPRODUCTION::true
110-
fi
111-
# Skip attempting to publish for now, because I can't figure out how to
112-
# generate a valid VSCE_TOKEN. Instead we can manually publish by uploading
113-
# the release build artifact to the extension publisher site.
114-
- name: publish
115-
if: false && steps.check-version.outputs.ISPRODUCTION == 'true'
116-
env:
117-
PROD_AIKEY: ${{ secrets.PROD_AIKEY }}
118-
run: |
119-
gulp genAikey
120-
vsce publish -p ${{ secrets.VSCE_TOKEN }}

.github/workflows/fixed-issues.yml

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

.github/workflows/remove-labels.yml

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

.github/workflows/stale-issues.yml

+16-12
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,26 @@
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:
67

78
jobs:
89
stale:
9-
1010
runs-on: ubuntu-latest
11-
1211
steps:
13-
- uses: blackchoey/stale@releases/v1.2
12+
- uses: actions/stale@v4.1.0
1413
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
14+
days-before-stale: 30
15+
days-before-close: 7
16+
stale-issue-message: >-
17+
This issue has been automatically marked as stale because it has been
18+
inactive for 30 days. To reactivate the issue, simply post a comment
19+
with the requested information to help us diagnose this issue. If this
20+
issue remains inactive for another 7 days, it will be automatically
21+
closed.
22+
close-issue-message: >-
23+
This issue has been automatically closed due to inactivity. If you are
24+
still experiencing problems, please open a new issue.
25+
stale-issue-label: stale
26+
only-labels: needs-more-info

.github/workflows/triage-issues.yml

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

.vscodeignore

+3-1
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/**

CHANGELOG.md

+10
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,16 @@
11
# Change Log
22
All notable changes to this project will be documented in this file.
33

4+
## Version 0.4.9
5+
6+
- Release date: January 12, 2022
7+
8+
### Changed
9+
10+
- vid and pid for Adafruit Grand Central M4 (SAMD51) [#1218](https://github.com/microsoft/vscode-arduino/pull/1218)
11+
- Add clear output on build option [#1057](https://github.com/microsoft/vscode-arduino/pull/1057)
12+
- Added buffering to prevent heavy logging issues [#1412](https://github.com/microsoft/vscode-arduino/pull/1412)
13+
414
## Version 0.4.8
515

616
- Release date: November 9, 2021

CONTRIBUTING.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ There are many ways that you can contribute, beyond writing code. The goal of th
88

99
If you are interested in writing code to fix issues, first look at the issues with the [help-wanted](https://github.com/Microsoft/vscode-arduino/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22) label. They should have the context and code pointers needed to get started. If not, then feel free to ask for some, and we will be happy to provide any guidance you need.
1010

11-
When you are doing code fix, please work against [dev](https://github.com/microsoft/vscode-arduino/tree/dev)
12-
branch and also submit pull request to `dev` branch.
13-
Changes will be merged into `master` branch after production release.
11+
When you are doing code fix, please work against [main](https://github.com/microsoft/vscode-arduino/tree/main)
12+
branch and also submit pull request to `main` branch.
13+
Changes will be merged into `release` branch after production release.
1414

1515

1616

README.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# Visual Studio Code extension for Arduino
22

33
[![Gitter](https://img.shields.io/badge/chat-on%20gitter-blue.svg)](https://gitter.im/Microsoft/vscode-arduino)
4-
[![Travis CI](https://travis-ci.org/Microsoft/vscode-arduino.svg?branch=master)](https://travis-ci.org/Microsoft/vscode-arduino)
54

65
Welcome to the Visual Studio Code extension for **Arduino** <sup>preview</sup> ! The Arduino extension makes it easy to develop, build, deploy and debug your Arduino sketches in Visual Studio Code, with a rich set of functionalities. These include:
76

@@ -74,7 +73,8 @@ This extension provides several commands in the Command Palette (<kbd>F1</kbd> o
7473
| `arduino.commandPath` | Path to an executable (or script) relative to `arduino.path`. The default value is `arduino_debug.exe` for Windows, `Contents/MacOS/Arduino` for Mac and `arduino` for Linux, You also can use a custom launch script to run Arduino by modifying this setting. (Requires a restart after change) Example: `run-arduino.bat` for Windows, `Contents/MacOS/run-arduino.sh` for Mac and `bin/run-arduino.sh` for Linux. |
7574
| `arduino.additionalUrls` | Additional Boards Manager URLs for 3rd party packages. You can have multiple URLs in one string with a comma(`,`) as separator, or have a string array. The default value is empty. |
7675
| `arduino.logLevel` | CLI output log level. Could be info or verbose. The default value is `"info"`. |
77-
| `arduino.allowPDEFiletype` | Allow the VSCode Arduino extension to open .pde files from pre-1.0.0 versions of Arduino. Note that this will break Processing code. Default value is `false`. |
76+
| `arduino.clearOutputOnBuild` | Clear the output logs before uploading or verifying. Default value is `false`. |
77+
| `arduino.allowPDEFiletype` | Allow the VSCode Arduino extension to open .pde files from pre-1.0.0 versions of Arduino. Note that this will break Processing code. Default value is `false`. |
7878
| `arduino.enableUSBDetection` | Enable/disable USB detection from the VSCode Arduino extension. The default value is `true`. When your device is plugged in to your computer, it will pop up a message "`Detected board ****, Would you like to switch to this board type`". After clicking the `Yes` button, it will automatically detect which serial port (COM) is connected a USB device. If your device does not support this feature, please provide us with the PID/VID of your device; the code format is defined in `misc/usbmapping.json`.To learn more about how to list the vid/pid, use the following tools: https://github.com/EmergingTechnologyAdvisors/node-serialport `npm install -g serialport` `serialport-list -f jsonline`|
7979
| `arduino.disableTestingOpen` | Enable/disable automatic sending of a test message to the serial port for checking the open status. The default value is `false` (a test message will be sent). |
8080
| `arduino.skipHeaderProvider` | Enable/disable the extension providing completion items for headers. This functionality is included in newer versions of the C++ extension. The default value is `false`.|
@@ -120,7 +120,7 @@ The following settings are as per sketch settings of the Arduino extension. You
120120
- `port` - Name of the serial port connected to the device. Can be set by the `Arduino: Select Serial Port` command. For Mac users could be "/dev/cu.wchusbserial1420".
121121
- `board` - Currently selected Arduino board alias. Can be set by the `Arduino: Change Board Type` command. Also, you can find the board list there.
122122
- `output` - Arduino build output path. If not set, Arduino will create a new temporary output folder each time, which means it cannot reuse the intermediate result of the previous build leading to long verify/upload time, so it is recommended to set the field. Arduino requires that the output path should not be the workspace itself or in a subfolder of the workspace, otherwise, it may not work correctly. By default, this option is not set. It's worth noting that the contents of this file could be deleted during the build process, so pick (or create) a directory that will not store files you want to keep.
123-
- `debugger` - The short name of the debugger that will be used when the board itself does not have a debugger and there is more than one debugger available. You can find the list of debuggers [here](https://github.com/Microsoft/vscode-arduino/blob/master/misc/debuggerUsbMapping.json). By default, this option is not set.
123+
- `debugger` - The short name of the debugger that will be used when the board itself does not have a debugger and there is more than one debugger available. You can find the list of debuggers [here](https://github.com/Microsoft/vscode-arduino/blob/release/misc/debuggerUsbMapping.json). By default, this option is not set.
124124
- `prebuild` - External command which will be invoked before any sketch build (verify, upload, ...). For details see the [Pre- and Post-Build Commands](#Pre--and-Post-Build-Commands) section.
125125
- `postbuild` - External command to be run after the sketch has been built successfully. See the afore mentioned section for more details.
126126
- `intelliSenseGen` - Override the global setting for auto-generation of the IntelliSense configuration (i.e. `.vscode/c_cpp_properties.json`). Three options are available:
@@ -203,7 +203,7 @@ Steps to start debugging:
203203
> To learn more about how to debug Arduino code, visit our [team blog](https://blogs.msdn.microsoft.com/iotdev/2017/05/27/debug-your-arduino-code-with-visual-studio-code/).
204204
205205
## Change Log
206-
See the [Change log](https://github.com/Microsoft/vscode-arduino/blob/master/CHANGELOG.md) for details about the changes in each version.
206+
See the [Change log](https://github.com/Microsoft/vscode-arduino/blob/release/CHANGELOG.md) for details about the changes in each version.
207207

208208
## Supported Operating Systems
209209
Currently this extension supports the following operating systems:
@@ -241,7 +241,7 @@ This project has adopted the [Microsoft Open Source Code of Conduct](https://ope
241241
The [Microsoft Enterprise and Developer Privacy Statement](https://www.microsoft.com/en-us/privacystatement/EnterpriseDev/default.aspx) describes the privacy statement of this software.
242242

243243
## License
244-
This extension is licensed under the [MIT License](https://github.com/Microsoft/vscode-arduino/blob/master/LICENSE.txt). Please see the [Third Party Notice](https://github.com/Microsoft/vscode-arduino/blob/master/ThirdPartyNotices.txt) file for additional copyright notices and terms.
244+
This extension is licensed under the [MIT License](https://github.com/Microsoft/vscode-arduino/blob/release/LICENSE.txt). Please see the [Third Party Notice](https://github.com/Microsoft/vscode-arduino/blob/release/ThirdPartyNotices.txt) file for additional copyright notices and terms.
245245

246246
## Contact Us
247247
If you would like to help build the best Arduino experience with VS Code, you can reach us directly at [gitter chat room](https://gitter.im/Microsoft/vscode-arduino).

0 commit comments

Comments
 (0)