Skip to content

Commit

Permalink
add gitub actions builds
Browse files Browse the repository at this point in the history
  • Loading branch information
sebthom committed Jul 1, 2022
1 parent 4c6f600 commit 856e1f1
Show file tree
Hide file tree
Showing 6 changed files with 140 additions and 3 deletions.
87 changes: 87 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
# https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-syntax-for-github-actions
name: Build

on:
push:
branches: # build all branches
- '**'
tags-ignore: # but don't build tags
- '**'
paths-ignore:
- '**/*.md'
- '.github/*.yml'
pull_request:
workflow_dispatch:
# https://github.blog/changelog/2020-07-06-github-actions-manual-triggers-with-workflow_dispatch/
inputs:
additional_maven_args:
description: 'Additional Maven Args'
required: false
default: ''

defaults:
run:
shell: bash

jobs:

build:
runs-on: ubuntu-latest
steps:
- name: Git Checkout
uses: actions/checkout@v3 #https://github.com/actions/checkout

- name: Set up JDK 11
uses: actions/setup-java@v3 # https://github.com/actions/setup-java
with:
distribution: 'temurin'
java-version: 11

- name: Install xvfb
run: sudo apt-get install -o Acquire::Retries=3 --no-install-recommends -y xvfb

- name: "Cache: Local Maven Repository"
uses: actions/cache@v3
with:
path: |
~/.m2/repository
!~/.m2/**/*SNAPSHOT*
key: ${{ runner.os }}-mvnrepo-${{ hashFiles('**/pom.xml') }}-${{ hashFiles('**/target-platforms/target-platform-latest.target/target-platform-latest.target') }}
restore-keys: |
${{ runner.os }}-mvnrepo-
- name: Set up Maven
uses: stCarolas/setup-maven@v4.4
with:
maven-version: 3.8.6


- name: Build with Maven
id: maven-build
run: |
set -eu
MAVEN_OPTS="${MAVEN_OPTS:-}"
MAVEN_OPTS="$MAVEN_OPTS -XX:+TieredCompilation -XX:TieredStopAtLevel=1" # https://zeroturnaround.com/rebellabs/your-maven-build-is-slow-speed-it-up/
MAVEN_OPTS="$MAVEN_OPTS -Djava.security.egd=file:/dev/./urandom" # https://stackoverflow.com/questions/58991966/what-java-security-egd-option-is-for/59097932#59097932
MAVEN_OPTS="$MAVEN_OPTS -Dorg.slf4j.simpleLogger.showDateTime=true -Dorg.slf4j.simpleLogger.dateTimeFormat=HH:mm:ss,SSS" # https://stackoverflow.com/questions/5120470/how-to-time-the-different-stages-of-maven-execution/49494561#49494561
MAVEN_OPTS="$MAVEN_OPTS -Xmx1024m -Djava.awt.headless=true -Djava.net.preferIPv4Stack=true -Dhttps.protocols=TLSv1.2"
echo " -> MAVEN_OPTS: $MAVEN_OPTS"
export MAVEN_OPTS
# prevent "org.eclipse.swt.SWTError: No more handles [gtk_init_check() failed]"
xvfb-run mvn \
--errors \
--update-snapshots \
--batch-mode \
--show-version \
--no-transfer-progress \
${{ github.event.inputs.additional_maven_args }} \
clean verify
- name: "Delete intermediate build artifacts"
uses: geekyeggo/delete-artifact@1-glob-support # https://github.com/GeekyEggo/delete-artifact/
with:
name: "*"
useGlob: true
failOnError: false
49 changes: 49 additions & 0 deletions .github/workflows/licensecheck.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# This workflow will build a Java project with Maven
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven

name: License check

on:
push:
branches:
- '*'
pull_request:
branches:
- '*'

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Set up JDK 18
uses: actions/setup-java@v3
with:
java-version: '18'
distribution: 'adopt'

- name: Cache local Maven repository
uses: actions/cache@v3
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: License check
run: |
# "excludeArtifactIds" parameter is to prevent builds from failing with:
# License information could not be automatically verified for the following content:
# p2/orbit/p2.p2.installable.unit/org.eclipse.rcp_root/4.24.0.v20220607-0700
# This content is either not correctly mapped by the system, or requires review.
# Error: Dependency license check failed. Some dependencies need to be vetted.
mvn -U -V -e -B -ntp \
org.eclipse.dash:license-tool-plugin:license-check \
--file pom.xml \
-Ddash.fail=true \
-DexcludeArtifactIds=org.eclipse.rcp_root
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Eclipse LSP4E - Language Server Protocol client for Eclipse IDE

[![Build Status](https://github.com/eclipse/lsp4e/actions/workflows/build.yml/badge.svg)](https://github.com/eclipse/lsp4e/actions/workflows/build.yml)
[![License](https://img.shields.io/github/license/eclipse/lsp4e.svg?color=blue)](LICENSE)

[![Clone to Eclipse IDE](https://mickaelistria.github.io/redirctToEclipseIDECloneCommand/cloneToEclipseBadge.png)](https://mickaelistria.github.io/redirctToEclipseIDECloneCommand/redirect.html)
Expand Down
2 changes: 1 addition & 1 deletion org.eclipse.lsp4e.debug/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Debug Adapter client for Eclipse IDE (Incubation)
Bundle-SymbolicName: org.eclipse.lsp4e.debug;singleton:=true
Bundle-Version: 0.13.5.qualifier
Bundle-Version: 0.13.6.qualifier
Bundle-Activator: org.eclipse.lsp4e.debug.DSPPlugin
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
Expand Down
2 changes: 1 addition & 1 deletion org.eclipse.lsp4e.jdt/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: JDT Integration for LSP4E
Bundle-SymbolicName: org.eclipse.lsp4e.jdt;singleton:=true
Bundle-Version: 0.10.2.qualifier
Bundle-Version: 0.10.3.qualifier
Automatic-Module-Name: org.eclipse.lsp4e.jdt
Bundle-RequiredExecutionEnvironment: JavaSE-11
Bundle-ClassPath: .
Expand Down
2 changes: 1 addition & 1 deletion org.eclipse.lsp4e.tests.mock/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Mock Language Server to test LSP4E
Bundle-SymbolicName: org.eclipse.lsp4e.tests.mock
Bundle-Version: 0.14.4.qualifier
Bundle-Version: 0.14.5.qualifier
Bundle-Vendor: Eclipse LSP4E
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Require-Bundle: org.eclipse.lsp4j;bundle-version="[0.14.0,0.15.0)",
Expand Down

0 comments on commit 856e1f1

Please sign in to comment.