-
Notifications
You must be signed in to change notification settings - Fork 106
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into magicDate
- Loading branch information
Showing
957 changed files
with
11,539 additions
and
2,836 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
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('-Xmx3g') | ||
|
||
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
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,51 @@ | ||
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@v4 | ||
|
||
- name: Set up JDK | ||
uses: actions/setup-java@v4 | ||
with: | ||
java-version: 20 | ||
distribution: 'temurin' | ||
cache: gradle | ||
|
||
- 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
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
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 |
---|---|---|
|
@@ -10,25 +10,27 @@ on: | |
jobs: | ||
gatekeeper: | ||
runs-on: ubuntu-latest | ||
if: github.event_name == 'pull_request' && startsWith(github.head_ref, 'translations_') == false || github.event_name == 'push' | ||
if: github.event_name == 'pull_request' && startsWith(github.head_ref, 'translations_') == false || github.event_name == 'push' || github.event_name == 'workflow_dispatch' | ||
steps: | ||
- run: echo 'Open the Golden Gate' | ||
|
||
qodana: | ||
needs: gatekeeper | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/checkout@v4 | ||
- 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 | ||
- uses: github/codeql-action/upload-sarif@v3 | ||
with: | ||
sarif_file: ${{ runner.temp }}/qodana/results/qodana.sarif.json | ||
- name: Deploy to GitHub Pages | ||
if: github.event_name == 'push' | ||
uses: peaceiris/actions-gh-pages@v3.9.2 | ||
uses: peaceiris/actions-gh-pages@v4.0.0 | ||
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
Oops, something went wrong.