-
Notifications
You must be signed in to change notification settings - Fork 3
94 lines (93 loc) · 2.68 KB
/
main.yml
File metadata and controls
94 lines (93 loc) · 2.68 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
name: Build
on: [push]
env:
MACOSX_DEPLOYMENT_TARGET: 10.15
jobs:
build:
if: ${{ !contains(join(github.event.commits.*.message),'[skip ci]') }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [windows-latest, macos-latest, ubuntu-latest]
steps:
- name: Install Haxe
uses: krdlab/setup-haxe@master
with:
haxe-version: 4.2.0
- uses: ilammy/msvc-dev-cmd@v1
if: matrix.os == 'windows-latest'
- uses: actions/checkout@v2
with:
submodules: "recursive"
- name: Checkout hashlink
uses: actions/checkout@v2
with:
repository: "HaxeFoundation/hashlink"
path: "hashlink"
- name: Build LuaJIT
if: matrix.os != 'windows-latest'
run: |
cd LuaJIT
make && sudo make install
- name: Build LuaJIT Windows
if: matrix.os == 'windows-latest'
shell: cmd
run: |
cd LuaJIT/src
msvcbuild.bat
cd ../../
mkdir lib/Windows64
copy LuaJIT/src/lua51.dll lib/Windows64
copy LuaJIT/src/lua51.lib lib/Windows64
- name: Build Hashlink
if: matrix.os != 'windows-latest'
run: |
cd hashlink
make libhl
make hl
make ui
sudo make install
- name: Build Hashlink
if: matrix.os == 'windows-latest'
shell: cmd
run: |
cd hashlink
MSBuild libhl.vcxproj /nologo /clp:ErrorsOnly "-p:Configuration=Release;PlatformToolset=v142;WindowsTargetPlatformVersion=10"
MSBuild hl.vcxproj /nologo /clp:ErrorsOnly "-p:Configuration=Release;PlatformToolset=v142;WindowsTargetPlatformVersion=10"
echo %GITHUB_WORKSPACE%\hashlink\x64\Release >> %GITHUB_PATH%
- name: Setup
run: |
haxelib dev hxlua .
haxelib install hxcpp --quiet
cd native
haxelib run hxcpp Build.xml -DHXCPP_M64 -verbose
- name: Test
if: matrix.os == 'windows-latest'
shell: cmd
run: |
copy native\lua.hdll test\lua.hdll
cd test
haxe build.hxml -D HXCPP_M64
out\Main
- name: Test
if: matrix.os == 'macos-latest'
run: |
cp native/lua.hdll test/lua.hdll
cd test
haxe build.hxml -D HXCPP_M64
out/Main
hl out.hl
- name: Test
if: matrix.os == 'ubuntu-latest'
run: |
cp native/lua.hdll test/lua.hdll
cd test
haxe build.hxml -D HXCPP_M64
LD_LIBRARY_PATH=/usr/local/lib out/Main
LD_LIBRARY_PATH=/usr/local/lib hl out.hl
# - name: Upload Artifact
# uses: 'actions/upload-artifact@v2'
# with:
# name: ${{ matrix.os }} ${{ matrix.graphics }}
# path: kinc.hdll