Skip to content

Commit 4058a27

Browse files
asosnoviytheshadowco
authored andcommitted
Merge remote-tracking branch 'origin/develop' into feature/osClassModuleType
2 parents 9483ffc + 29390f1 commit 4058a27

File tree

301 files changed

+8695
-1191
lines changed

Some content is hidden

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

301 files changed

+8695
-1191
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/dependabot.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ updates:
99
directory: "/" # Location of package manifests
1010
schedule:
1111
interval: "daily"
12+
groups:
13+
freefair:
14+
patterns:
15+
- "io.freefair.*"
1216
- package-ecosystem: "github-actions"
1317
directory: "/"
1418
schedule:

.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('-Xmx3g')
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/benchmark.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
uses: actions/checkout@v3
3030

3131
- name: Setup JDK
32-
uses: actions/setup-java@v3
32+
uses: actions/setup-java@v4
3333
with:
3434
java-version: 17
3535
distribution: 'temurin'
@@ -38,7 +38,7 @@ jobs:
3838
run: ./gradlew bootJar
3939

4040
- name: Set up Python
41-
uses: actions/setup-python@v4
41+
uses: actions/setup-python@v5
4242
with:
4343
python-version: "3.7"
4444

.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@v4
35+
36+
- name: Set up JDK
37+
uses: actions/setup-java@v4
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+

.github/workflows/codeql-analysis.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,21 +23,21 @@ jobs:
2323

2424
steps:
2525
- name: Checkout repository
26-
uses: actions/checkout@v3
26+
uses: actions/checkout@v4
2727
with:
2828
# We must fetch at least the immediate parents so that if this is
2929
# a pull request then we can checkout the head.
3030
fetch-depth: 2
3131

3232
- name: Set up JDK 11
33-
uses: actions/setup-java@v3
33+
uses: actions/setup-java@v4
3434
with:
3535
java-version: 17
3636
distribution: 'temurin'
3737

3838
# Initializes the CodeQL tools for scanning.
3939
- name: Initialize CodeQL
40-
uses: github/codeql-action/init@v2
40+
uses: github/codeql-action/init@v3
4141
# Override language selection by uncommenting this and choosing your languages
4242
with:
4343
languages: java
@@ -52,4 +52,4 @@ jobs:
5252
- run: ./gradlew jar
5353

5454
- name: Perform CodeQL Analysis
55-
uses: github/codeql-action/analyze@v2
55+
uses: github/codeql-action/analyze@v3

.github/workflows/gh-pages.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ jobs:
1717
build-deploy:
1818
runs-on: ubuntu-latest
1919
steps:
20-
- uses: actions/checkout@v3
20+
- uses: actions/checkout@v4
2121

2222
- name: Setup JDK
23-
uses: actions/setup-java@v3
23+
uses: actions/setup-java@v4
2424
with:
2525
java-version: 17
2626
distribution: 'temurin'
@@ -29,7 +29,7 @@ jobs:
2929
run: ./gradlew --no-daemon javadoc
3030

3131
- name: Set up Python
32-
uses: actions/setup-python@v4
32+
uses: actions/setup-python@v5
3333
with:
3434
python-version: '3.7.15'
3535
architecture: 'x64'
@@ -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: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,20 +18,20 @@ jobs:
1818
strategy:
1919
fail-fast: false
2020
matrix:
21-
java_version: ['11', '17']
21+
java_version: ['17', '20']
2222
os: [ubuntu-latest, windows-latest, macOS-latest]
2323
steps:
24-
- uses: actions/checkout@v3
24+
- uses: actions/checkout@v4
2525
- name: Set up JDK ${{ matrix.java_version }}
26-
uses: actions/setup-java@v3
26+
uses: actions/setup-java@v4
2727
with:
2828
java-version: ${{ matrix.java_version }}
2929
distribution: 'temurin'
3030
- name: Build with Gradle
3131
run: ./gradlew check --stacktrace
3232
- name: Archive test results
3333
if: failure()
34-
uses: actions/upload-artifact@v3
34+
uses: actions/upload-artifact@v4
3535
with:
3636
name: junit_report_${{ matrix.os }}_${{ matrix.java_version }}
3737
path: build/reports/tests/test

.github/workflows/javadoc.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ jobs:
1717
needs: gatekeeper
1818
runs-on: ubuntu-latest
1919
steps:
20-
- uses: actions/checkout@v3
20+
- uses: actions/checkout@v4
2121
- name: Set up JDK
22-
uses: actions/setup-java@v3
22+
uses: actions/setup-java@v4
2323
with:
2424
java-version: 17
2525
distribution: 'temurin'

.github/workflows/pre-qa.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
run: echo ${{ github.event.number }} > PR_NUMBER.txt
2222
- name: Archive PR number
2323
if: github.event_name == 'pull_request'
24-
uses: actions/upload-artifact@v3
24+
uses: actions/upload-artifact@v4
2525
with:
2626
name: PR_NUMBER
2727
path: PR_NUMBER.txt

0 commit comments

Comments
 (0)