-
Notifications
You must be signed in to change notification settings - Fork 110
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/develop' into feature/osClassMod…
…uleType
- Loading branch information
Showing
178 changed files
with
6,065 additions
and
500 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 |
---|---|---|
@@ -0,0 +1 @@ | ||
{"image":"mcr.microsoft.com/devcontainers/universal:2"} |
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,73 @@ | ||
import ntpath | ||
import os | ||
import platform | ||
import re | ||
import shutil | ||
import sys | ||
|
||
|
||
def build_image(base_dir, image_prefix, executable_file): | ||
path_to_jar = get_bsl_ls_jar(base_dir) | ||
if path_to_jar is None: | ||
exit() | ||
|
||
cmd_args = [ | ||
'jpackage', | ||
'--name', 'bsl-language-server', | ||
'--input', 'build/libs', | ||
'--main-jar', path_to_jar] | ||
|
||
if is_windows(): | ||
cmd_args.append('--win-console') | ||
|
||
cmd_args.append('--type') | ||
cmd_args.append('app-image') | ||
cmd_args.append('--java-options') | ||
cmd_args.append('-Xmx2g') | ||
|
||
cmd = ' '.join(cmd_args) | ||
os.system(cmd) | ||
|
||
shutil.make_archive( | ||
"bsl-language-server_" + image_prefix, | ||
'zip', | ||
'./', | ||
executable_file) | ||
|
||
|
||
def is_windows(): | ||
return platform.system() == 'Windows' | ||
|
||
|
||
def get_base_dir(): | ||
if is_windows(): | ||
base_dir = os.getcwd() + "\\build\\libs" | ||
else: | ||
base_dir = os.getcwd() + "/build/libs" | ||
return base_dir | ||
|
||
|
||
def get_bsl_ls_jar(dir_name): | ||
pattern = r"bsl.+\.jar" | ||
names = os.listdir(dir_name) | ||
for name in names: | ||
fullname = os.path.join(dir_name, name) | ||
if os.path.isfile(fullname) and re.search(pattern, fullname) and fullname.find('exec.jar') != -1: | ||
return ntpath.basename(fullname) | ||
|
||
return None | ||
|
||
|
||
if __name__ == "__main__": | ||
# directory with build project | ||
arg_base_dir = get_base_dir() | ||
|
||
# image prefix: `win`, `nic` or `mac` | ||
arg_image_prefix = sys.argv[1] | ||
|
||
# executable file: `bsl-language-server` or `bsl-language-server.app` | ||
arg_executable_file = sys.argv[2] | ||
|
||
build_image(base_dir=get_base_dir(), | ||
image_prefix=sys.argv[1], | ||
executable_file=sys.argv[2]) |
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,50 @@ | ||
name: Check making image | ||
|
||
on: | ||
push: | ||
branches: | ||
- develop | ||
- feature/check-package | ||
|
||
|
||
jobs: | ||
build: | ||
strategy: | ||
fail-fast: true | ||
matrix: | ||
os: [windows-latest, ubuntu-latest, macOS-latest] | ||
include: | ||
- os: windows-latest | ||
displayName: Windows | ||
prefix: win | ||
app-image: bsl-language-server | ||
- os: ubuntu-latest | ||
displayName: Linux | ||
prefix: nix | ||
app-image: bsl-language-server | ||
- os: macOS-latest | ||
displayName: MacOS | ||
prefix: mac | ||
app-image: bsl-language-server.app | ||
runs-on: ${{ matrix.os }} | ||
name: (${{ matrix.displayName }}) create image app version | ||
|
||
steps: | ||
- name: Checkout source | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up JDK | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: 20 | ||
distribution: 'temurin' | ||
|
||
- name: Build bootJar with Gradle | ||
run: ./gradlew check build | ||
|
||
- name: Build jpackage application image | ||
run: python .github/scripts/build-jpackage.py ${{ matrix.prefix }} ${{ matrix.app-image }} | ||
|
||
|
||
|
||
|
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 |
---|---|---|
|
@@ -145,7 +145,7 @@ jobs: | |
cp -R temp/site/. public/dev/en | ||
- name: Deploy | ||
uses: peaceiris/[email protected].2 | ||
uses: peaceiris/[email protected].3 | ||
with: | ||
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }} | ||
publish_branch: gh-pages | ||
|
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 |
---|---|---|
|
@@ -20,15 +20,17 @@ jobs: | |
steps: | ||
- uses: actions/checkout@v3 | ||
- name: 'Qodana Scan' | ||
uses: JetBrains/[email protected] | ||
uses: JetBrains/[email protected] | ||
env: | ||
QODANA_TOKEN: ${{ secrets.QODANA_TOKEN }} | ||
with: | ||
linter: jetbrains/qodana-jvm-community | ||
- uses: github/codeql-action/upload-sarif@v2 | ||
with: | ||
sarif_file: ${{ runner.temp }}/qodana/results/qodana.sarif.json | ||
- name: Deploy to GitHub Pages | ||
if: github.event_name == 'push' | ||
uses: peaceiris/[email protected].2 | ||
uses: peaceiris/[email protected].3 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: ${{ runner.temp }}/qodana/results/report | ||
|
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 |
---|---|---|
|
@@ -28,80 +28,36 @@ jobs: | |
|
||
steps: | ||
- name: Checkout source | ||
uses: actions/checkout@v3 | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up JDK | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: 17 | ||
java-version: 20 | ||
distribution: 'temurin' | ||
|
||
- name: Build bootJar with Gradle | ||
run: ./gradlew check bootJar | ||
- 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: | ||
dirName = os.getcwd() + "\\build\\libs" | ||
else: | ||
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 }}") | ||
- name: Build jpackage application image | ||
run: python .github/scripts/build-jpackage.py ${{ matrix.prefix }} ${{ 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) and fullname.find('exec.jar') != -1: | ||
return ntpath.basename(fullname) | ||
return None | ||
start() | ||
shell: python | ||
- name: Upload artifact | ||
uses: actions/upload-artifact@v3 | ||
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: 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,4 @@ | ||
{ | ||
"java.compile.nullAnalysis.mode": "automatic", | ||
"java.configuration.updateBuildConfiguration": "automatic" | ||
} |
Oops, something went wrong.