-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (58 loc) · 2.43 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
name: Build
on: [push, pull_request]
jobs:
build:
strategy:
matrix:
include:
- os: windows-latest
command: package-windows-x64
- os: ubuntu-latest
command: package-linux-x64
- os: macos-latest
command: package-macos-x64
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: 'true'
- name: Install Node.js
uses: actions/setup-node@v4
- name: Install dependencies for the client
run: npm ci
- name: Install dependencies for the language server
run: npm ci
working-directory: ./Dagor-Shader-Language-Server
- name: Generate condition ANTLR lexer
run: npx antlr4ts -o "../../src/_generated" "ConditionLexer.g4"
working-directory: ./Dagor-Shader-Language-Server/grammar/antlr
- name: Generate condition ANTLR parser
run: npx antlr4ts -o "../../src/_generated" -no-listener -visitor "ConditionParser.g4"
working-directory: ./Dagor-Shader-Language-Server/grammar/antlr
- name: Generate DSHL ANTLR lexer
run: npx antlr4ts -o "../../src/_generated" "DshlLexer.g4"
working-directory: ./Dagor-Shader-Language-Server/grammar/antlr
- name: Generate DSHL ANTLR parser
run: npx antlr4ts -o "../../src/_generated" -no-listener -visitor "DshlParser.g4"
working-directory: ./Dagor-Shader-Language-Server/grammar/antlr
- name: Build
run: npm run build
- name: Build the tests
run: npm run build-tests
- name: ESLint
run: npm run eslint
- name: Prettier lint
run: npm run prettier-lint
- name: Run tests
run: xvfb-run -a npm test
if: runner.os == 'Linux'
- name: Run tests
run: npm test
if: runner.os != 'Linux'
- name: Build in production mode
run: npm run build-production
- name: Create platform-specific package
run: npm run ${{ matrix.command }}
- name: Create Universal package
run: npm run package-universal