From 6a6d92b52eb7f17afddfebc7d44531063a255ab0 Mon Sep 17 00:00:00 2001 From: Sheng Chen Date: Tue, 2 Mar 2021 16:09:01 +0800 Subject: [PATCH 1/3] Enable GitHub Actions Signed-off-by: Sheng Chen --- .github/workflows/build.yml | 123 ++++++++++++++++++++++++++++++++++++ 1 file changed, 123 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 00000000..55a892b9 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,123 @@ +name: CI + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + linux: + name: Linux + runs-on: ubuntu-latest + timeout-minutes: 30 + steps: + - uses: actions/checkout@v2 + + - name: Setup Build Environment + run: | + sudo apt-get update + sudo apt-get install -y libxkbfile-dev pkg-config libsecret-1-dev libxss1 dbus xvfb libgtk-3-0 libgbm1 + sudo /usr/bin/Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 & + sleep 3 + + - name: Set up JDK 11 + uses: actions/setup-java@v1 + with: + java-version: '11' + + - name: Setup Node.js environment + uses: actions/setup-node@v2 + with: + node-version: 12 + + - name: Install Node.js modules + run: npm install + + - name: Install build tools + run: npm install -g vsce gulp typescript + + - name: Lint + run: gulp tslint + + - name: Package + run: vsce package + + - name: Test extension + run: DISPLAY=:99 npm test + + - name: Print language server Log if job failed + if: ${{ failure() }} + run: find $HOME/.config/Code/User/workspaceStorage/*/redhat.java/jdt_ws/.metadata/.log -print -exec cat '{}' \;; + + windows: + name: Windows + runs-on: windows-latest + timeout-minutes: 30 + steps: + - uses: actions/checkout@v2 + + - name: Set up JDK 11 + uses: actions/setup-java@v1 + with: + java-version: '11' + + - name: Setup Node.js environment + uses: actions/setup-node@v2 + with: + node-version: 12 + + - name: Install Node.js modules + run: npm install + + - name: Install build tools + run: npm install -g vsce gulp typescript + + - name: Lint + run: gulp tslint + + - name: Package + run: vsce package + + - name: Test extension + run: npm test + + - name: Print language server Log if job failed + if: ${{ failure() }} + run: Get-ChildItem -Path $env:APPDATA/Code/User/workspaceStorage/*/redhat.java/jdt_ws/.metadata/.log | cat + + darwin: + name: macOS + runs-on: macos-latest + timeout-minutes: 30 + steps: + - uses: actions/checkout@v2 + + - name: Set up JDK 11 + uses: actions/setup-java@v1 + with: + java-version: '11' + + - name: Setup Node.js environment + uses: actions/setup-node@v2 + with: + node-version: 12 + + - name: Install Node.js modules + run: npm install + + - name: Install build tools + run: npm install -g vsce gulp typescript + + - name: Lint + run: gulp tslint + + - name: Package + run: vsce package + + - name: Test extension + run: npm test + + - name: Print language server Log if job failed + if: ${{ failure() }} + run: find $HOME/Library/Application\ Support/Code/User/workspaceStorage/*/redhat.java/jdt_ws/.metadata/.log -print -exec cat '{}' \;; From 10a85d38f0f1a2666e7b0e39368554b65e801ce0 Mon Sep 17 00:00:00 2001 From: Sheng Chen Date: Tue, 2 Mar 2021 16:12:22 +0800 Subject: [PATCH 2/3] Force to install build tools on Windows --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 55a892b9..731806b2 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -71,7 +71,7 @@ jobs: run: npm install - name: Install build tools - run: npm install -g vsce gulp typescript + run: npm install -g vsce gulp typescript --force - name: Lint run: gulp tslint From 9f0075f84e136e176d831d06b1882eb615854d96 Mon Sep 17 00:00:00 2001 From: Sheng Chen Date: Tue, 2 Mar 2021 16:21:56 +0800 Subject: [PATCH 3/3] Remove Travis --- .editorconfig | 2 +- .travis.yml | 28 ---------------------------- .vscodeignore | 1 - README.md | 2 +- 4 files changed, 2 insertions(+), 31 deletions(-) delete mode 100644 .travis.yml diff --git a/.editorconfig b/.editorconfig index d24a06ef..d1be8048 100644 --- a/.editorconfig +++ b/.editorconfig @@ -10,7 +10,7 @@ indent_size = 4 # The indent size used in the `package.json` file cannot be changed # https://github.com/npm/npm/pull/3180#issuecomment-16336516 -[{.travis.yml,npm-shrinkwrap.json,package.json}] +[{.github/workflows/build.yml,npm-shrinkwrap.json,package.json}] indent_size = 2 [vendor/**.js] diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 2072d153..00000000 --- a/.travis.yml +++ /dev/null @@ -1,28 +0,0 @@ -language: node_js - -node_js: -- '--lts' - -os: -- linux -- osx - -before_install: - - | - if [ $TRAVIS_OS_NAME == "linux" ]; then - export CXX="g++-4.9" CC="gcc-4.9" - export DISPLAY=':99.0' - /usr/bin/Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 & - sleep 3 - fi - -install: -- npm install -g vsce -- npm install -g typescript -- npm install -g gulp -- npm install - -script: -- gulp tslint -- vsce package -- npm test diff --git a/.vscodeignore b/.vscodeignore index 4021d8a9..4b313096 100644 --- a/.vscodeignore +++ b/.vscodeignore @@ -11,7 +11,6 @@ images/docs/** testprojects/** TestPlan.md .github/** -.travis.yml tsconfig.json tslint.json packages diff --git a/README.md b/README.md index 73eef2b3..dddebe00 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # Debugger for Java [![Gitter](https://badges.gitter.im/Microsoft/vscode-java-debug.svg)](https://gitter.im/Microsoft/vscode-java-debug) -[![Travis CI](https://travis-ci.org/Microsoft/vscode-java-debug.svg?branch=master)](https://travis-ci.org/Microsoft/vscode-java-debug) +[![GitHub Actions](https://img.shields.io/github/workflow/status/microsoft/vscode-java-debug/CI/master)](https://github.com/microsoft/vscode-java-debug/actions?query=workflow%3ACI+branch%3Amaster) ## Overview A lightweight Java Debugger based on [Java Debug Server](https://github.com/Microsoft/java-debug) which extends the [Language Support for Java by Red Hat](https://marketplace.visualstudio.com/items?itemName=redhat.java). It allows users to debug Java code using Visual Studio Code (VS Code). Here's a list of features: