Skip to content

Commit e22cbaa

Browse files
committed
Merge remote-tracking branch 'server/dev'
Former-commit-id: 9aa00c9
2 parents ee830d4 + 0033deb commit e22cbaa

File tree

230 files changed

+62307
-0
lines changed

Some content is hidden

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

230 files changed

+62307
-0
lines changed

.gitattributes

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
*.lib filter=lfs diff=lfs merge=lfs -text
2+
*.so.* filter=lfs diff=lfs merge=lfs -text
3+
*.so filter=lfs diff=lfs merge=lfs -text
4+
*.dll filter=lfs diff=lfs merge=lfs -text
5+
*.pdb filter=lfs diff=lfs merge=lfs -text

.github/ISSUE_TEMPLATE/bug_report.md

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
**Describe the bug**
11+
A clear and concise description of what the bug is.
12+
13+
**To Reproduce**
14+
Steps to reproduce the behavior:
15+
1. Go to '...'
16+
2. Click on '....'
17+
3. Scroll down to '....'
18+
4. See error
19+
20+
**Expected behavior**
21+
A clear and concise description of what you expected to happen.
22+
23+
**Screenshots**
24+
If applicable, add screenshots to help explain your problem.
25+
26+
**Environment:**
27+
- OS: [e.g. Ubuntu 18.04]
28+
- alt:V server version: [e.g. dev#1202]
29+
- Other installed modules: [e.g. csharp-module]
30+
- JS module version: [e.g. 1.0-rc1]
31+
32+
**Additional context**
33+
Add any other context about the problem here.
+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
**Is your feature request related to a problem? Please describe.**
11+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12+
13+
**Describe the solution you'd like**
14+
A clear and concise description of what you want to happen.
15+
16+
**Describe alternatives you've considered**
17+
A clear and concise description of any alternative solutions or features you've considered.
18+
19+
**Additional context**
20+
Add any other context or screenshots about the feature request here.

.github/workflows/build-deploy.yml

+212
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,212 @@
1+
name: Build & deploy
2+
on:
3+
push:
4+
branches-ignore:
5+
- '**'
6+
tags:
7+
- 'dev/*.*-dev*'
8+
- 'rc/*.*-rc*'
9+
- 'release/*.*'
10+
11+
jobs:
12+
build-windows:
13+
name: Build windows release
14+
runs-on: windows-2019
15+
steps:
16+
- name: Checkout repository
17+
uses: actions/checkout@v2
18+
with:
19+
submodules: recursive
20+
lfs: true
21+
22+
- name: Extract version
23+
id: version
24+
shell: bash
25+
run: |
26+
TAG=${GITHUB_REF/refs\/tags\//}
27+
echo ::set-output name=BRANCH::${TAG/\/*}
28+
echo ::set-output name=VERSION::${TAG/*\/}
29+
30+
- name: Build
31+
shell: cmd
32+
run: |
33+
mkdir build
34+
pushd build
35+
cmake -G"Visual Studio 16" -A x64 -DJS_MODULE_VERSION=%VERSION% ..
36+
cmake --build . --config Release
37+
popd
38+
mkdir dist\modules\js-module
39+
copy build\Release\js-module.dll dist\modules\js-module
40+
copy deps\nodejs\lib\Release\libnode.dll dist\modules\js-module
41+
env:
42+
VERSION: ${{ steps.version.outputs.VERSION }}
43+
44+
- uses: actions/upload-artifact@v2
45+
with:
46+
name: js-module-windows
47+
path: ./dist/
48+
49+
build-linux:
50+
name: Build linux release
51+
runs-on: ubuntu-18.04
52+
steps:
53+
- name: Checkout repository
54+
uses: actions/checkout@v2
55+
with:
56+
submodules: recursive
57+
lfs: true
58+
59+
- name: Extract version
60+
id: version
61+
shell: bash
62+
run: |
63+
TAG=${GITHUB_REF/refs\/tags\//}
64+
echo ::set-output name=BRANCH::${TAG/\/*}
65+
echo ::set-output name=VERSION::${TAG/*\/}
66+
67+
- name: Build
68+
run: |
69+
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
70+
sudo apt-get update
71+
sudo apt-get install gcc-8 g++-8
72+
mkdir build-linux && cd build-linux
73+
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER=g++-8 -DJS_MODULE_VERSION=%VERSION% ..
74+
cmake --build . --config Release
75+
cd ..
76+
mkdir -p dist/modules/js-module
77+
cp ./build-linux/libjs-module.so dist/modules/js-module
78+
cp ./deps/nodejs/lib/libnode.so.83 dist/modules/js-module
79+
env:
80+
VERSION: ${{ steps.version.outputs.VERSION }}
81+
82+
- uses: actions/upload-artifact@v2
83+
with:
84+
name: js-module-linux
85+
path: ./dist/
86+
87+
deploy-cdn:
88+
name: Deploy release to alt:V CDN
89+
runs-on: ubuntu-18.04
90+
needs: [build-linux, build-windows]
91+
steps:
92+
- name: Set up Node.js
93+
uses: actions/setup-node@v1
94+
with:
95+
node-version: 12.x
96+
97+
- name: Cache node_modules
98+
uses: actions/cache@v2
99+
with:
100+
path: '**/node_modules'
101+
key: ${{ runner.os }}
102+
103+
- name: Download windows artifacts
104+
uses: actions/download-artifact@v2
105+
with:
106+
name: js-module-windows
107+
path: dist-windows
108+
109+
- name: Download linux artifacts
110+
uses: actions/download-artifact@v2
111+
with:
112+
name: js-module-linux
113+
path: dist-linux
114+
115+
- name: Extract version
116+
id: version
117+
shell: bash
118+
run: |
119+
TAG=${GITHUB_REF/refs\/tags\//}
120+
echo ::set-output name=BRANCH::${TAG/\/*}
121+
echo ::set-output name=VERSION::${TAG/*\/}
122+
123+
- name: Install upload tool
124+
run: npm i @altmp/upload-tool@latest
125+
126+
- name: Deploy windows artifacts to cdn
127+
run: npx alt-upload dist-windows js-module/$BRANCH/x64_win32 $VERSION
128+
env:
129+
CI_UPLOAD_URL: ${{ secrets.CI_UPLOAD_URL }}
130+
CI_DEPLOY_TOKEN: ${{ secrets.CI_DEPLOY_TOKEN }}
131+
BRANCH: ${{ steps.version.outputs.BRANCH }}
132+
VERSION: ${{ steps.version.outputs.VERSION }}
133+
134+
- name: Deploy linux artifacts to cdn
135+
run: npx alt-upload dist-linux js-module/$BRANCH/x64_linux $VERSION
136+
env:
137+
CI_UPLOAD_URL: ${{ secrets.CI_UPLOAD_URL }}
138+
CI_DEPLOY_TOKEN: ${{ secrets.CI_DEPLOY_TOKEN }}
139+
BRANCH: ${{ steps.version.outputs.BRANCH }}
140+
VERSION: ${{ steps.version.outputs.VERSION }}
141+
142+
create-release:
143+
name: Create GitHub Release
144+
runs-on: ubuntu-18.04
145+
needs: [build-linux, build-windows]
146+
steps:
147+
- name: Download windows artifacts
148+
uses: actions/download-artifact@v2
149+
with:
150+
name: js-module-windows
151+
path: dist-windows
152+
153+
- name: Download linux artifacts
154+
uses: actions/download-artifact@v2
155+
with:
156+
name: js-module-linux
157+
path: dist-linux
158+
159+
- name: Zip artifacts
160+
run: |
161+
zip -r -j js-module-windows dist-windows
162+
zip -r -j js-module-linux dist-linux
163+
164+
- name: Extract version
165+
id: version
166+
shell: bash
167+
run: |
168+
TAG=${GITHUB_REF/refs\/tags\//}
169+
echo ::set-output name=BRANCH::${TAG/\/*}
170+
echo ::set-output name=VERSION::${TAG/*\/}
171+
172+
- name: Create Release
173+
id: create_release
174+
uses: actions/create-release@v1
175+
env:
176+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
177+
with:
178+
tag_name: ${{ github.ref }}
179+
release_name: Release ${{ steps.version.outputs.VERSION }}
180+
181+
- name: Upload windows artifacts
182+
uses: actions/upload-release-asset@v1
183+
env:
184+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
185+
with:
186+
upload_url: ${{ steps.create_release.outputs.upload_url }}
187+
asset_path: ./js-module-windows.zip
188+
asset_name: js-module-windows.zip
189+
asset_content_type: application/zip
190+
191+
- name: Upload linux artifacts
192+
uses: actions/upload-release-asset@v1
193+
env:
194+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
195+
with:
196+
upload_url: ${{ steps.create_release.outputs.upload_url }}
197+
asset_path: ./js-module-linux.zip
198+
asset_name: js-module-linux.zip
199+
asset_content_type: application/zip
200+
201+
delete-artifacts:
202+
name: Delete artifacts
203+
runs-on: ubuntu-18.04
204+
needs: [ create-release, deploy-cdn ]
205+
if: ${{ always() }}
206+
steps:
207+
- name: Delete artifacts
208+
uses: geekyeggo/delete-artifact@v1
209+
with:
210+
name: |
211+
js-module-linux
212+
js-module-windows

.github/workflows/test-changes.yml

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Test changes
2+
on: [pull_request]
3+
4+
jobs:
5+
test-windows:
6+
name: Test changes on Windows
7+
runs-on: windows-2019
8+
steps:
9+
- name: Checkout repository
10+
uses: actions/checkout@v2
11+
with:
12+
submodules: recursive
13+
lfs: true
14+
15+
- name: Build
16+
shell: cmd
17+
run: |
18+
mkdir build
19+
pushd build
20+
cmake -G"Visual Studio 16" -A x64 ..
21+
cmake --build . --config Release
22+
23+
test-linux:
24+
name: Test changes on Linux
25+
runs-on: ubuntu-18.04
26+
steps:
27+
- name: Checkout repository
28+
uses: actions/checkout@v2
29+
with:
30+
submodules: recursive
31+
lfs: true
32+
33+
- name: Build
34+
run: |
35+
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
36+
sudo apt-get update
37+
sudo apt-get install gcc-8 g++-8
38+
mkdir build-linux && cd build-linux
39+
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER=g++-8 ..
40+
cmake --build . --config Release

0 commit comments

Comments
 (0)