From 7563152532fd34810c029cb3c8e1f110b1e49c98 Mon Sep 17 00:00:00 2001 From: Jens Fischer Date: Mon, 30 Mar 2020 14:05:53 +0200 Subject: [PATCH] Switch to GitHub Actions and lix --- .github/workflows/main.yml | 11 +++++++++++ .gitignore | 2 +- .haxerc | 4 ++++ .travis.yml | 11 ----------- README.md | 13 +++---------- haxe_libraries/hxnodejs.hxml | 6 ++++++ haxe_libraries/vscode-debugadapter.hxml | 4 ++++ haxe_libraries/vscode.hxml | 4 ++++ package-lock.json | 6 ++++++ package.json | 6 +++++- 10 files changed, 44 insertions(+), 23 deletions(-) create mode 100644 .github/workflows/main.yml create mode 100644 .haxerc delete mode 100644 .travis.yml create mode 100644 haxe_libraries/hxnodejs.hxml create mode 100644 haxe_libraries/vscode-debugadapter.hxml create mode 100644 haxe_libraries/vscode.hxml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..f2c4da4 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,11 @@ +name: CI + +on: [push, pull_request] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - run: npm install + - run: npx haxe build.hxml diff --git a/.gitignore b/.gitignore index a98d50a..c4d543c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,2 @@ -node_modules/* +node_modules bin diff --git a/.haxerc b/.haxerc new file mode 100644 index 0000000..8b6b442 --- /dev/null +++ b/.haxerc @@ -0,0 +1,4 @@ +{ + "version": "4.0.5", + "resolveLibs": "scoped" +} \ No newline at end of file diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index f99289f..0000000 --- a/.travis.yml +++ /dev/null @@ -1,11 +0,0 @@ -language: haxe -dist: xenial -haxe: - - development - -install: - - haxelib install vscode - - haxelib install vscode-debugadapter - -script: - - haxe build.hxml diff --git a/README.md b/README.md index 7b703be..10f691d 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # HXCPP Debugger -[![Build Status](https://travis-ci.org/vshaxe/hxcpp-debugger.svg?branch=master)](https://travis-ci.org/vshaxe/hxcpp-debugger) [![Version](https://vsmarketplacebadge.apphb.com/version-short/vshaxe.hxcpp-debugger.svg)](https://marketplace.visualstudio.com/items?itemName=vshaxe.hxcpp-debugger) [![Installs](https://vsmarketplacebadge.apphb.com/installs-short/vshaxe.hxcpp-debugger.svg)](https://marketplace.visualstudio.com/items?itemName=vshaxe.hxcpp-debugger) +[![CI](https://img.shields.io/github/workflow/status/vshaxe/hxcpp-debugger/CI.svg?logo=github)](https://github.com/vshaxe/hxcpp-debugger/actions?query=workflow%3ACI) [![Version](https://vsmarketplacebadge.apphb.com/version-short/vshaxe.hxcpp-debugger.svg)](https://marketplace.visualstudio.com/items?itemName=vshaxe.hxcpp-debugger) [![Installs](https://vsmarketplacebadge.apphb.com/installs-short/vshaxe.hxcpp-debugger.svg)](https://marketplace.visualstudio.com/items?itemName=vshaxe.hxcpp-debugger) This VSCode extension allows you to debug [HXCPP](https://haxe.org/manual/target-cpp-getting-started.html) applications. @@ -46,15 +46,8 @@ Replace `/bin/application.exe` with the path to your executable file. 1. Navigate to the extensions folder (`C:\Users\\.vscode\extensions` on Windows, `~/.vscode/extensions` otherwise) 2. Clone this repo: `git clone https://github.com/vshaxe/hxcpp-debugger` 3. Change current directory to the cloned one: `cd hxcpp-debugger`. -4. Install dependencies: - - ```hxml - npm install - haxelib install vscode - haxelib install vscode-debugadapter - ``` - -5. Do `haxe build.hxml` +4. Install dependencies `npm install` +5. Do `npx haxe build.hxml` ## Usage with lix https://github.com/tbrosman/vshaxe-hxcpp-debugger-and-lix diff --git a/haxe_libraries/hxnodejs.hxml b/haxe_libraries/hxnodejs.hxml new file mode 100644 index 0000000..3c20092 --- /dev/null +++ b/haxe_libraries/hxnodejs.hxml @@ -0,0 +1,6 @@ +# @install: lix --silent download "haxelib:/hxnodejs#12.0.0" into hxnodejs/12.0.0/haxelib +-cp ${HAXE_LIBCACHE}/hxnodejs/12.0.0/haxelib/src +-D hxnodejs=12.0.0 +--macro allowPackage('sys') +# should behave like other target defines and not be defined in macro context +--macro define('nodejs') diff --git a/haxe_libraries/vscode-debugadapter.hxml b/haxe_libraries/vscode-debugadapter.hxml new file mode 100644 index 0000000..193947d --- /dev/null +++ b/haxe_libraries/vscode-debugadapter.hxml @@ -0,0 +1,4 @@ +# @install: lix --silent download "haxelib:/vscode-debugadapter#1.39.0" into vscode-debugadapter/1.39.0/haxelib +-lib hxnodejs +-cp ${HAXE_LIBCACHE}/vscode-debugadapter/1.39.0/haxelib/src +-D vscode-debugadapter=1.39.0 diff --git a/haxe_libraries/vscode.hxml b/haxe_libraries/vscode.hxml new file mode 100644 index 0000000..cec108c --- /dev/null +++ b/haxe_libraries/vscode.hxml @@ -0,0 +1,4 @@ +# @install: lix --silent download "haxelib:/vscode#1.43.0" into vscode/1.43.0/haxelib +-lib hxnodejs +-cp ${HAXE_LIBCACHE}/vscode/1.43.0/haxelib/src +-D vscode=1.43.0 diff --git a/package-lock.json b/package-lock.json index 4efa8b2..db0ea78 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4,6 +4,12 @@ "lockfileVersion": 1, "requires": true, "dependencies": { + "lix": { + "version": "15.8.9", + "resolved": "https://registry.npmjs.org/lix/-/lix-15.8.9.tgz", + "integrity": "sha512-PeyaVHuq6I5q7Gf6YL74zhK9ASPGncF+L405my+waKcFFhtIF8LzrcNWGhcVuJwOHW1VD32+UiTRKoWbHwvvjg==", + "dev": true + }, "minimist": { "version": "0.0.8", "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", diff --git a/package.json b/package.json index 40474a7..eaebb00 100644 --- a/package.json +++ b/package.json @@ -35,8 +35,12 @@ "vscode-debugprotocol": "1.36.0", "vscode-debugadapter": "1.36.0" }, + "devDependencies": { + "lix": "^15.8.9" + }, "scripts": { - "vscode:prepublish": "haxe build.hxml" + "vscode:prepublish": "haxe build.hxml", + "postinstall": "lix download" }, "main": "bin/extension.js", "activationEvents": [