Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CI] Rewrite without lix/vshaxe-build, run on different OS and haxe versions #122

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Avoid differences between unix and windows CI there
install.hxml text eol=crlf
20 changes: 18 additions & 2 deletions .github/workflows/formatting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,22 @@ jobs:
- uses: actions/checkout@v2
with:
submodules: true
- run: |

- uses: krdlab/setup-haxe@v1
with:
haxe-version: latest

- name: Install dependencies
run: |
npm ci
npx lix run formatter -s . --check
haxelib newrepo
haxelib state load install.hxml

- name: Check dependencies
run: |
haxe -version
haxelib list

- name: Run formatter
run: |
haxelib run formatter -s shared -s src --check
41 changes: 38 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,43 @@ on: [push, pull_request]

jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
haxe: [latest, "2024-01-16_development_3dbee4f"]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- run: npm ci
- run: npx lix run vshaxe-build -t language-server -t language-server-tests

- uses: krdlab/setup-haxe@v1
with:
haxe-version: ${{ matrix.haxe }}

- name: Cache haxelib
id: cache-haxelib
uses: actions/[email protected]
with:
path: .haxelib
key: ${{ hashFiles('./install.hxml') }}

- name: Install npm dependencies
run: |
npm ci

- name: Install haxelib dependencies
if: steps.cache-haxelib.outputs.cache-hit != 'true'
run: |
haxelib newrepo
haxelib state load install.hxml

- name: Check dependencies
run: |
haxe -version
haxelib list

- name: Build Haxe LSP
run: haxe build.hxml

- name: Run tests
run: haxe test.hxml
4 changes: 0 additions & 4 deletions .haxerc

This file was deleted.

31 changes: 31 additions & 0 deletions build.hxml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
-lib hxnodejs
-lib hxparse
-lib haxeparser
-lib tokentree
-lib formatter
-lib rename
-lib json2object
-lib language-server-protocol
-lib vscode-json-rpc
-lib uglifyjs
-lib safety

-cp src
-cp shared

--macro haxeLanguageServer.Init.run()
--macro Safety.safeNavigation('haxeLanguageServer')
--macro nullSafety('haxeLanguageServer')

-D analyzer-optimize
-D js-unflatten
-D js-es=6
-D JSTACK_FORMAT=vscode
-D uglifyjs_overwrite
-D message.reporting=pretty
-dce full
-debug

-main haxeLanguageServer.Main
-js bin/server.js

4 changes: 0 additions & 4 deletions haxe_libraries/formatter.hxml

This file was deleted.

4 changes: 0 additions & 4 deletions haxe_libraries/haxeparser.hxml

This file was deleted.

3 changes: 0 additions & 3 deletions haxe_libraries/hxjsonast.hxml

This file was deleted.

7 changes: 0 additions & 7 deletions haxe_libraries/hxnodejs.hxml

This file was deleted.

3 changes: 0 additions & 3 deletions haxe_libraries/hxparse.hxml

This file was deleted.

4 changes: 0 additions & 4 deletions haxe_libraries/json2object.hxml

This file was deleted.

3 changes: 0 additions & 3 deletions haxe_libraries/language-server-protocol.hxml

This file was deleted.

3 changes: 0 additions & 3 deletions haxe_libraries/rename.hxml

This file was deleted.

3 changes: 0 additions & 3 deletions haxe_libraries/safety.hxml

This file was deleted.

5 changes: 0 additions & 5 deletions haxe_libraries/test-adapter.hxml

This file was deleted.

3 changes: 0 additions & 3 deletions haxe_libraries/tokentree.hxml

This file was deleted.

4 changes: 0 additions & 4 deletions haxe_libraries/uglifyjs.hxml

This file was deleted.

5 changes: 0 additions & 5 deletions haxe_libraries/utest.hxml

This file was deleted.

3 changes: 0 additions & 3 deletions haxe_libraries/vscode-json-rpc.hxml

This file was deleted.

4 changes: 0 additions & 4 deletions haxe_libraries/vshaxe-build.hxml

This file was deleted.

14 changes: 14 additions & 0 deletions install.hxml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
-lib formatter:1.15.0
-lib haxeparser:git:https://github.com/HaxeCheckstyle/haxeparser#7e98c9aef901b8e26541cf3f8a6e1da0385b237a
-lib hxjsonast:1.1.0
-lib hxnodejs:git:https://github.com/HaxeFoundation/hxnodejs#504066dc1ba5ad543afa5f6c3ea019f06136a82b
-lib hxparse:git:https://github.com/simn/hxparse#876070ec62a4869de60081f87763e23457a3bda8
-lib json2object:git:https://github.com/elnabo/json2object#429986134031cbb1980f09d0d3d642b4b4cbcd6a
-lib language-server-protocol:git:https://github.com/vshaxe/language-server-protocol-haxe#a6baa2ddcd792e99b19398048ef95aa00f0aa1f6
-lib rename:2.2.2
-lib safety:1.1.2
-lib test-adapter:2.0.4
-lib tokentree:1.2.10
-lib uglifyjs:1.0.0
-lib utest:git:https://github.com/haxe-utest/utest#a94f8812e8786f2b5fec52ce9f26927591d26327
-lib vscode-json-rpc:git:https://github.com/vshaxe/vscode-json-rpc#0160f06bc9df1dd0547f2edf23753540db74ed5b
21 changes: 0 additions & 21 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 0 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@
"name": "haxe-language-server",
"version": "0.0.0",
"devDependencies": {
"lix": "^15.12.0",
"terser": "^5.15.0"
},
"scripts": {
"postinstall": "npx lix download"
}
}
28 changes: 28 additions & 0 deletions test.hxml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
-lib hxnodejs
-lib hxparse
-lib haxeparser
-lib tokentree
-lib formatter
-lib rename
-lib json2object
-lib language-server-protocol
-lib vscode-json-rpc
-lib safety
-lib utest

-cp src
-cp shared
-cp test

--macro Safety.safeNavigation('haxeLanguageServer')

-D analyzer-optimize
-D js-unflatten
-D js-es=6
-D message.reporting=pretty
-dce full
-debug

-main TestMain
-js bin/test.js
-cmd node bin/test.js
77 changes: 0 additions & 77 deletions vshaxe-build.json

This file was deleted.

Loading