-
Notifications
You must be signed in to change notification settings - Fork 1
112 lines (107 loc) · 3.13 KB
/
Copy pathtests.yml
File metadata and controls
112 lines (107 loc) · 3.13 KB
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
name: Tests
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
dotnet_test:
name: dotnet test
runs-on: ubuntu-latest
env:
DOTNET_NOLOGO: 1
DOTNET_CLI_TELEMETRY_OPTOUT: 1
outputs:
artifact-id: ${{ steps.upload-artifacts.outputs.artifact-id }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.x'
- uses: actions/setup-java@v4
with:
distribution: 'temurin' # See 'Supported distributions' for available options
java-version: '21'
java-package: 'jre'
- name: Generate compiler files
working-directory: ./tools/LogicCompiler/grammar
run: |
java \
-jar ../antlr-4.13.1-complete.jar \
-message-format vs2005 \
-long-messages \
-Werror \
-Dlanguage=CSharp \
-no-listener \
-package LogicCompiler.Grammar \
W5LogicLexer.g4 W5LogicParser.g4
- name: Generate test files (1/2)
working-directory: ./server/Test.Logic
run: |
dotnet run \
--project ../../tools/LogicCompiler/LogicCompiler.csproj \
--test \
--write-ast
- name: Generate test files (2/2)
working-directory: ./server/Test.Logic
run: |
dotnet run \
--project ../../tools/LogicCompiler/LogicCompiler.csproj \
-- \
-s ../../logic/werewolf \
-t Modes/Werewolf \
-n Theme.werewolf \
--write-ast \
--write-info-path ../../logic/info/werewolf.json
- name: Run dotnet test
run: dotnet test
- name: Upload artifacts
id: upload-artifacts
uses: actions/upload-artifact@v4
with:
name: logic-info
path: logic/info/
if-no-files-found: error
validate_lang:
name: validate language files
runs-on: ubuntu-latest
needs: dotnet_test
env:
DOTNET_NOLOGO: 1
DOTNET_CLI_TELEMETRY_OPTOUT: 1
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: 'true'
- uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.x'
- name: Download artifacts
uses: actions/download-artifact@v4
with:
name: logic-info
path: logic/info/
- name: Build language
run: |
dotnet run \
--project tools/LangConv/LangConv.csproj \
-d content/lang \
--mode logic/info/werewolf.json
docker_build:
name: docker build
runs-on: ubuntu-latest
env:
GAME_SERVER_NAME: CI Werewolf
GAME_SERVER_DOMAIN: unused
PRONTO_URL: unused
PRONTO_TOKEN: unused
OAUTH_USERINFO: unused
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Run docker compose
run: docker compose build