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

Commit 595def8

Browse files
authored
Move build to GitHub actions (#1193)
* github action tests * fix indent * fix xvfb action * trigger * change to @default-branch * update branch names * update linux ver * fix formatting * remove tags and develop triggers * move runs-on * add os target echo * change to build on any push * remove echo * fix linux if * fix os ifs * add ' to ifs * fix brew install * remove tests for win * name steps, add typescript install * fix syntax * fix formatting * fix tests * add missing ' * change to trusty * change to ubuntu-14.04.6 * revert to 5948525 * remove gulp install * remove typescript install * add gulp install back * add triggers * add actions branch trigger * add package * fix indents * add artifact publishing * test package * fix matrix * typo * fix version * fix version * fix export path * test package dir, change to ubuntu * test ubuntu * fix tag ref, change to main branch * test file path * test release upload * add environment * remove arduino install for deploy, add publish * fix conditional for publishing * update enviroment * remove travis.yml * fix tag for stale issue workflow
1 parent 4efe14d commit 595def8

File tree

3 files changed

+109
-90
lines changed

3 files changed

+109
-90
lines changed

.github/workflows/build.yml

+108
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
name: CI-Tests
2+
on:
3+
push:
4+
branches:
5+
- master
6+
- develop
7+
tags:
8+
- v*
9+
pull_request:
10+
branches:
11+
- master
12+
- develop
13+
14+
15+
jobs:
16+
build:
17+
runs-on: ${{ matrix.os }}
18+
strategy:
19+
matrix:
20+
os: [ ubuntu-latest, macos-latest, windows-latest ]
21+
22+
steps:
23+
- name: checkout
24+
uses: actions/checkout@v2
25+
- name: get node
26+
uses: actions/setup-node@v1
27+
with:
28+
node-version: 11.x
29+
- name: linux setup
30+
if: ${{ matrix.os == 'ubuntu-latest' }}
31+
run: |
32+
export CXX="g++-4.9" CC="gcc-4.9" DISPLAY=:99.0
33+
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
37+
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
42+
if: ${{ matrix.os == 'macos-latest' }}
43+
run: |
44+
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
45+
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+
gulp genAikey
57+
vsce package
58+
- name: run tests
59+
if: ${{ matrix.os != 'windows-latest' }}
60+
uses: GabrielBB/xvfb-action@v1
61+
with:
62+
run: npm test --silent
63+
64+
deploy:
65+
needs: build
66+
runs-on: ubuntu-latest
67+
environment: vsix-publishing
68+
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
69+
steps:
70+
- run: echo "VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
71+
- run: echo ${{env.VERSION}}
72+
- name: Checkout
73+
uses: actions/checkout@v2
74+
- name: get node
75+
uses: actions/setup-node@v1
76+
with:
77+
node-version: 11.x
78+
- name: linux setup
79+
run: |
80+
export CXX="g++-4.9" CC="gcc-4.9" DISPLAY=:99.0
81+
sleep 3
82+
sudo apt-get update
83+
sudo apt-get install g++-multilib
84+
sudo apt-get install -y build-essential
85+
sudo apt-get install libudev-dev
86+
- name: preinstall
87+
run: |
88+
npm install -g node-gyp
89+
npm install -g vsce
90+
npm install -g gulp
91+
- name: install
92+
run: npm install
93+
- name: scripts
94+
run: |
95+
gulp tslint
96+
gulp genAikey
97+
vsce package
98+
- name: upload .vsix to github tag
99+
uses: svenstaro/upload-release-action@v2
100+
with:
101+
repo_token: ${{ secrets.OAUTH_TOKEN }}
102+
file: ${{github.workspace}}/vscode-arduino*.vsix
103+
tag: ${{ github.ref }}
104+
overwrite: true
105+
file_glob: true
106+
- name: publish
107+
if: github.ref == 'refs/tags/[0-9].[0-9].[0-9]'
108+
run: vsce publish -p ${{ secrets.VSCE_TOKEN }}

.github/workflows/stale-issues.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
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.'
1717
stale-issue-label: 'stale'
1818
days-before-stale: 7
19-
only-labels: 'need more info'
19+
only-labels: 'needs more info'
2020
last-updated-user-type: 'collaborator'
2121
days-before-close: 3
2222
operations-per-run: 150

.travis.yml

-89
This file was deleted.

0 commit comments

Comments
 (0)