Skip to content

Commit 5d9ef4a

Browse files
authored
Merge branch 'develop' into dependabot/gradle/org.springframework.boot-3.0.0
2 parents efc25b6 + 7865e3f commit 5d9ef4a

File tree

162 files changed

+6688
-465
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

162 files changed

+6688
-465
lines changed

.devcontainer/devcontainer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"image":"mcr.microsoft.com/devcontainers/universal:2"}

.github/scripts/build-jpackage.py

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
import ntpath
2+
import os
3+
import platform
4+
import re
5+
import shutil
6+
import sys
7+
8+
9+
def build_image(base_dir, image_prefix, executable_file):
10+
path_to_jar = get_bsl_ls_jar(base_dir)
11+
if path_to_jar is None:
12+
exit()
13+
14+
cmd_args = [
15+
'jpackage',
16+
'--name', 'bsl-language-server',
17+
'--input', 'build/libs',
18+
'--main-jar', path_to_jar]
19+
20+
if is_windows():
21+
cmd_args.append('--win-console')
22+
23+
cmd_args.append('--type')
24+
cmd_args.append('app-image')
25+
cmd_args.append('--java-options')
26+
cmd_args.append('-Xmx2g')
27+
28+
cmd = ' '.join(cmd_args)
29+
os.system(cmd)
30+
31+
shutil.make_archive(
32+
"bsl-language-server_" + image_prefix,
33+
'zip',
34+
'./',
35+
executable_file)
36+
37+
38+
def is_windows():
39+
return platform.system() == 'Windows'
40+
41+
42+
def get_base_dir():
43+
if is_windows():
44+
base_dir = os.getcwd() + "\\build\\libs"
45+
else:
46+
base_dir = os.getcwd() + "/build/libs"
47+
return base_dir
48+
49+
50+
def get_bsl_ls_jar(dir_name):
51+
pattern = r"bsl.+\.jar"
52+
names = os.listdir(dir_name)
53+
for name in names:
54+
fullname = os.path.join(dir_name, name)
55+
if os.path.isfile(fullname) and re.search(pattern, fullname) and fullname.find('exec.jar') != -1:
56+
return ntpath.basename(fullname)
57+
58+
return None
59+
60+
61+
if __name__ == "__main__":
62+
# directory with build project
63+
arg_base_dir = get_base_dir()
64+
65+
# image prefix: `win`, `nic` or `mac`
66+
arg_image_prefix = sys.argv[1]
67+
68+
# executable file: `bsl-language-server` or `bsl-language-server.app`
69+
arg_executable_file = sys.argv[2]
70+
71+
build_image(base_dir=get_base_dir(),
72+
image_prefix=sys.argv[1],
73+
executable_file=sys.argv[2])

.github/workflows/check-package.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Check making image
2+
3+
on:
4+
push:
5+
branches:
6+
- develop
7+
- feature/check-package
8+
9+
10+
jobs:
11+
build:
12+
strategy:
13+
fail-fast: true
14+
matrix:
15+
os: [windows-latest, ubuntu-latest, macOS-latest]
16+
include:
17+
- os: windows-latest
18+
displayName: Windows
19+
prefix: win
20+
app-image: bsl-language-server
21+
- os: ubuntu-latest
22+
displayName: Linux
23+
prefix: nix
24+
app-image: bsl-language-server
25+
- os: macOS-latest
26+
displayName: MacOS
27+
prefix: mac
28+
app-image: bsl-language-server.app
29+
runs-on: ${{ matrix.os }}
30+
name: (${{ matrix.displayName }}) create image app version
31+
32+
steps:
33+
- name: Checkout source
34+
uses: actions/checkout@v3
35+
36+
- name: Set up JDK
37+
uses: actions/setup-java@v3
38+
with:
39+
java-version: 20
40+
distribution: 'temurin'
41+
42+
- name: Build bootJar with Gradle
43+
run: ./gradlew check build
44+
45+
- name: Build jpackage application image
46+
run: python .github/scripts/build-jpackage.py ${{ matrix.prefix }} ${{ matrix.app-image }}
47+
48+
49+
50+
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# This workflow was added by CodeSee. Learn more at https://codesee.io/
2+
# This is v2.0 of this workflow file
3+
on:
4+
push:
5+
branches:
6+
- develop
7+
pull_request_target:
8+
types: [opened, synchronize, reopened]
9+
10+
name: CodeSee
11+
12+
permissions: read-all
13+
14+
jobs:
15+
codesee:
16+
runs-on: ubuntu-latest
17+
continue-on-error: true
18+
name: Analyze the repo with CodeSee
19+
steps:
20+
- uses: Codesee-io/codesee-action@v2
21+
with:
22+
codesee-token: ${{ secrets.CODESEE_ARCH_DIAG_API_TOKEN }}

.github/workflows/gh-pages.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ jobs:
145145
cp -R temp/site/. public/dev/en
146146
147147
- name: Deploy
148-
uses: peaceiris/actions-gh-pages@v3.9.2
148+
uses: peaceiris/actions-gh-pages@v3.9.3
149149
with:
150150
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
151151
publish_branch: gh-pages

.github/workflows/gradle.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
strategy:
1919
fail-fast: false
2020
matrix:
21-
java_version: ['17', '19']
21+
java_version: ['17', '20']
2222
os: [ubuntu-latest, windows-latest, macOS-latest]
2323
steps:
2424
- uses: actions/checkout@v3

.github/workflows/qodana.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,15 @@ jobs:
2020
steps:
2121
- uses: actions/checkout@v3
2222
- name: 'Qodana Scan'
23-
uses: JetBrains/qodana-action@v2022.3.0
23+
uses: JetBrains/qodana-action@v2023.1.4
2424
with:
2525
linter: jetbrains/qodana-jvm-community
2626
- uses: github/codeql-action/upload-sarif@v2
2727
with:
2828
sarif_file: ${{ runner.temp }}/qodana/results/qodana.sarif.json
2929
- name: Deploy to GitHub Pages
3030
if: github.event_name == 'push'
31-
uses: peaceiris/actions-gh-pages@v3.9.2
31+
uses: peaceiris/actions-gh-pages@v3.9.3
3232
with:
3333
github_token: ${{ secrets.GITHUB_TOKEN }}
3434
publish_dir: ${{ runner.temp }}/qodana/results/report

.github/workflows/rebase.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ jobs:
1414
token: ${{ secrets.GITHUB_TOKEN }}
1515
fetch-depth: 0 # otherwise, you will fail to push refs to dest repo
1616
- name: Automatic Rebase
17-
uses: cirrus-actions/rebase@1.7
17+
uses: cirrus-actions/rebase@1.8
1818
env:
1919
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/release.yml

Lines changed: 9 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -28,80 +28,36 @@ jobs:
2828

2929
steps:
3030
- name: Checkout source
31-
uses: actions/checkout@v3
31+
uses: actions/checkout@v3
32+
3233
- name: Set up JDK
3334
uses: actions/setup-java@v3
3435
with:
35-
java-version: 17
36+
java-version: 20
3637
distribution: 'temurin'
38+
3739
- name: Build bootJar with Gradle
3840
run: ./gradlew check bootJar
39-
- name: Build jpackage app-image
40-
run: |
41-
import os
42-
import platform
43-
import re
44-
import ntpath
45-
import shutil
46-
47-
pattern = r"bsl.+\.jar"
48-
thisPlatform = platform.system();
49-
isWindows = False
50-
if thisPlatform == 'Windows':
51-
isWindows = True
52-
53-
if isWindows:
54-
dirName = os.getcwd() + "\\build\\libs"
55-
else:
56-
dirName = os.getcwd() + "/build/libs"
57-
58-
def start():
59-
fullname = get_bslls_jar(dirName)
60-
if (fullname == None):
61-
exit
62-
63-
cmdArgs = ['jpackage']
64-
cmdArgs.append('--name')
65-
cmdArgs.append('bsl-language-server')
66-
cmdArgs.append('--input')
67-
cmdArgs.append('build/libs')
68-
cmdArgs.append('--main-jar')
69-
cmdArgs.append(fullname)
70-
if isWindows:
71-
cmdArgs.append('--win-console')
72-
cmdArgs.append('--type')
73-
cmdArgs.append('app-image')
74-
cmdArgs.append('--java-options')
75-
cmdArgs.append('-Xmx2g')
7641

77-
cmd = ' '.join(cmdArgs)
78-
os.system(cmd)
79-
80-
shutil.make_archive("bsl-language-server_" + "${{ matrix.prefix }}", 'zip', './',"${{ matrix.app-image }}")
42+
- name: Build jpackage application image
43+
run: python .github/scripts/build-jpackage.py ${{ matrix.prefix }} ${{ matrix.app-image }}
8144

82-
def get_bslls_jar(dir):
83-
names = os.listdir(dir)
84-
for name in names:
85-
fullname = os.path.join(dir, name)
86-
if os.path.isfile(fullname) and re.search(pattern, fullname) and fullname.find('exec.jar') != -1:
87-
return ntpath.basename(fullname)
88-
return None
89-
90-
start()
91-
shell: python
9245
- name: Upload artifact
9346
uses: actions/upload-artifact@v3
9447
with:
9548
name: bsl-language-server_${{ matrix.prefix }}.zip
9649
path: ./${{ matrix.app-image }}
50+
9751
- name: Upload assets to release
9852
uses: AButler/upload-release-assets@v2.0
9953
with:
10054
files: './bsl-language-server_${{ matrix.prefix }}.zip'
10155
repo-token: ${{ secrets.GITHUB_TOKEN }}
56+
10257
- name: Build with Gradle
10358
if: matrix.prefix == 'nix'
10459
run: ./gradlew build
60+
10561
- name: Upload jar to release
10662
if: matrix.prefix == 'nix'
10763
uses: AButler/upload-release-assets@v2.0

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ fabric.properties
5454
*.ps1
5555
target/
5656
build/
57+
bin/
5758

5859
# Scala compiler user settings
5960
.idea/hydra.xml
@@ -67,6 +68,7 @@ gen/
6768
.idea/sonarlint-state.xml
6869
.idea/sonarlint.xml
6970
.idea/checkstyle-idea.xml
71+
.idea/jpa-buddy.xml
7072
*.bak
7173
*.orig
7274

0 commit comments

Comments
 (0)