-
Notifications
You must be signed in to change notification settings - Fork 108
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
615 changed files
with
9,368 additions
and
5,533 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
name: "CodeQL" | ||
|
||
on: | ||
push: | ||
branches: [develop, master] | ||
pull_request: | ||
# The branches below must be a subset of the branches above | ||
branches: [develop] | ||
schedule: | ||
- cron: '0 0 * * 5' | ||
|
||
jobs: | ||
analyse: | ||
name: Analyse | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
with: | ||
# We must fetch at least the immediate parents so that if this is | ||
# a pull request then we can checkout the head. | ||
fetch-depth: 2 | ||
|
||
# If this run was triggered by a pull request event, then checkout | ||
# the head of the pull request instead of the merge commit. | ||
- run: git checkout HEAD^2 | ||
if: ${{ github.event_name == 'pull_request' }} | ||
|
||
- name: Set up JDK 11 | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: 11 | ||
|
||
# Initializes the CodeQL tools for scanning. | ||
- name: Initialize CodeQL | ||
uses: github/codeql-action/init@v1 | ||
# Override language selection by uncommenting this and choosing your languages | ||
with: | ||
languages: java | ||
|
||
# ℹ️ Command-line programs to run using the OS shell. | ||
# 📚 https://git.io/JvXDl | ||
|
||
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines | ||
# and modify them (or add more) to build your code if your project | ||
# uses a compiled language | ||
|
||
- run: ./gradlew jar | ||
|
||
- name: Perform CodeQL Analysis | ||
uses: github/codeql-action/analyze@v1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,20 +14,14 @@ jobs: | |
- os: windows-latest | ||
displayName: Windows | ||
prefix: win | ||
jpackageDownload: https://download.java.net/java/GA/jdk14/076bab302c7b4508975440c56f6cc26a/36/GPL/openjdk-14_windows-x64_bin.zip | ||
jdk14Path: /jdk-14 | ||
app-image: bsl-language-server | ||
- os: ubuntu-latest | ||
displayName: Linux | ||
prefix: nix | ||
jpackageDownload: https://download.java.net/java/GA/jdk14/076bab302c7b4508975440c56f6cc26a/36/GPL/openjdk-14_linux-x64_bin.tar.gz | ||
jdk14Path: /jdk-14 | ||
app-image: bsl-language-server | ||
- os: macOS-latest | ||
displayName: MacOS | ||
prefix: mac | ||
jpackageDownload: https://download.java.net/java/GA/jdk14/076bab302c7b4508975440c56f6cc26a/36/GPL/openjdk-14_osx-x64_bin.tar.gz | ||
jdk14Path: /jdk-14.jdk/Contents/Home | ||
app-image: bsl-language-server.app | ||
runs-on: ${{ matrix.os }} | ||
name: (${{ matrix.displayName }}) create image app version | ||
|
@@ -38,31 +32,9 @@ jobs: | |
- name: Set up JDK | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: 13 | ||
- name: Build with Gradle | ||
run: ./gradlew build | ||
- name: Download jpackage | ||
# We need to download jpackage from https://jdk.java.net/jpackage/ | ||
run: | | ||
import tarfile | ||
import zipfile | ||
import sys | ||
if sys.version_info[0] >= 3: | ||
from urllib.request import urlretrieve | ||
else: | ||
from urllib import urlretrieve | ||
url = "${{ matrix.jpackageDownload }}" | ||
tmpfile, headers = urlretrieve(url) | ||
if (url.endswith("tar.gz")): | ||
tar = tarfile.open(tmpfile) | ||
tar.extractall() | ||
tar.close() | ||
elif (url.endswith("zip")): | ||
zip = zipfile.ZipFile(tmpfile) | ||
zip.extractall() | ||
zip.close() | ||
shell: python | ||
java-version: 14 | ||
- name: Build bootJar with Gradle | ||
run: ./gradlew check bootJar | ||
- name: Build jpackage app-image | ||
run: | | ||
import os | ||
|
@@ -78,18 +50,16 @@ jobs: | |
isWindows = True | ||
if isWindows: | ||
jpackage = os.getcwd() + "\\" + "${{ matrix.jdk14Path }}" + '\\bin\\jpackage.exe' | ||
dirName = os.getcwd() + "\\build\\libs" | ||
else: | ||
jpackage = os.getcwd() + "${{ matrix.jdk14Path }}" + '/bin/jpackage' | ||
dirName = os.getcwd() + "/build/libs" | ||
dirName = os.getcwd() + "/build/libs" | ||
def start(): | ||
fullname = get_bslls_jar(dirName) | ||
if (fullname == None): | ||
exit | ||
cmdArgs = [jpackage] | ||
cmdArgs = ['jpackage'] | ||
cmdArgs.append('--name') | ||
cmdArgs.append('bsl-language-server') | ||
cmdArgs.append('--input') | ||
|
@@ -112,15 +82,10 @@ jobs: | |
names = os.listdir(dir) | ||
for name in names: | ||
fullname = os.path.join(dir, name) | ||
if os.path.isfile(fullname) and re.search(pattern, fullname) and fullname.find('sources.jar') == -1 and fullname.find('javadoc.jar') == -1: | ||
if os.path.isfile(fullname) and re.search(pattern, fullname) and fullname.find('exec.jar') != -1: | ||
return ntpath.basename(fullname) | ||
return None | ||
def run_jpackage(): | ||
cmd = jpackage + ' @jpackage.cfg' | ||
print(cmd) | ||
os.system(cmd) | ||
start() | ||
shell: python | ||
- name: Upload artifact | ||
|
@@ -133,6 +98,9 @@ jobs: | |
with: | ||
files: './bsl-language-server_${{ matrix.prefix }}.zip' | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Build with Gradle | ||
if: matrix.prefix == 'nix' | ||
run: ./gradlew build | ||
- name: Upload jar to release | ||
if: matrix.prefix == 'nix' | ||
uses: AButler/[email protected] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -68,3 +68,7 @@ gen/ | |
# mkdocs | ||
temp/ | ||
public/ | ||
|
||
# jpackage | ||
bsl-language-server/ | ||
bsl-language-server_*.zip |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.