-
Notifications
You must be signed in to change notification settings - Fork 109
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
629 changed files
with
13,281 additions
and
3,307 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,4 +2,5 @@ | |
*.bsl eol=lf | ||
*.xml eol=lf | ||
*.md eol=lf | ||
*.json eol=lf | ||
*.bat eol=crlf |
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,22 @@ | ||
name: Publish to m2 | ||
|
||
on: | ||
push: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
gpr: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2-beta | ||
- name: Set up JDK | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: 11 | ||
- name: Github Package Registry publish | ||
run: ./gradlew publish | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
GPR_DEPLOY_KEY: ${{ secrets.GPR_DEPLOY_KEY }} | ||
GPR_USER: ${{ github.actor }} |
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,141 @@ | ||
name: Make image | ||
|
||
on: | ||
release: | ||
types: [published, edited] | ||
|
||
jobs: | ||
build: | ||
strategy: | ||
fail-fast: true | ||
matrix: | ||
os: [windows-latest, ubuntu-latest, macOS-latest] | ||
include: | ||
- os: windows-latest | ||
displayName: Windows | ||
prefix: win | ||
jpackageDownload: https://download.java.net/java/early_access/jdk14/27/GPL/openjdk-14-ea+27_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/early_access/jdk14/27/GPL/openjdk-14-ea+27_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/early_access/jdk14/27/GPL/openjdk-14-ea+27_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 | ||
|
||
steps: | ||
- name: Checkout source | ||
uses: actions/checkout@v2 | ||
- 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 | ||
- name: Build jpackage app-image | ||
run: | | ||
import os | ||
import platform | ||
import re | ||
import ntpath | ||
import shutil | ||
pattern = r"bsl.+\.jar" | ||
thisPlatform = platform.system(); | ||
isWindows = False | ||
if thisPlatform == 'Windows': | ||
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" | ||
def start(): | ||
fullname = get_bslls_jar(dirName) | ||
if (fullname == None): | ||
exit | ||
cmdArgs = [jpackage] | ||
cmdArgs.append('--name') | ||
cmdArgs.append('bsl-language-server') | ||
cmdArgs.append('--input') | ||
cmdArgs.append('build/libs') | ||
cmdArgs.append('--main-jar') | ||
cmdArgs.append(fullname) | ||
if isWindows: | ||
cmdArgs.append('--win-console') | ||
cmdArgs.append('--type') | ||
cmdArgs.append('app-image') | ||
cmdArgs.append('--java-options') | ||
cmdArgs.append('-Xmx2g') | ||
cmd = ' '.join(cmdArgs) | ||
os.system(cmd) | ||
shutil.make_archive("bsl-language-server_" + "${{ matrix.prefix }}", 'zip', './',"${{ matrix.app-image }}") | ||
def get_bslls_jar(dir): | ||
names = os.listdir(dir) | ||
for name in names: | ||
fullname = os.path.join(dir, name) | ||
if os.path.isfile(fullname) and re.search(pattern, fullname): | ||
return ntpath.basename(fullname) | ||
return None | ||
def run_jpackage(): | ||
cmd = jpackage + ' @jpackage.cfg' | ||
print(cmd) | ||
os.system(cmd) | ||
start() | ||
shell: python | ||
- name: Upload artifact | ||
uses: actions/upload-artifact@master | ||
with: | ||
name: bsl-language-server_${{ matrix.prefix }}.zip | ||
path: ./${{ matrix.app-image }} | ||
- name: Upload assets to release | ||
uses: AButler/[email protected] | ||
with: | ||
files: './bsl-language-server_${{ matrix.prefix }}.zip' | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Upload jar to release | ||
if: matrix.prefix == 'nix' | ||
uses: AButler/[email protected] | ||
with: | ||
files: './build/libs/*.jar' | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.