-
-
Notifications
You must be signed in to change notification settings - Fork 0
65 lines (63 loc) · 2.21 KB
/
main.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
59
60
61
62
63
64
65
name: CI
on: [push]
jobs:
build-linux:
runs-on: ubuntu-20.04
steps:
- name: Prepare 32-bit Multiarch
run: sudo dpkg --add-architecture i386
- name: Update Packages
run: sudo apt-get update
- name: Install LuaJIT Development Libraries (i386)
run: sudo apt-get install --assume-yes gcc-multilib libluajit-5.1-dev:i386
- name: Checkout
uses: actions/checkout@v4
with:
path: cs2djit
submodules: true
- name: Configure
run: CFLAGS=-m32 cmake -Bbuild -Scs2djit -DCMAKE_INSTALL_PREFIX=$PWD/install -DCMAKE_BUILD_TYPE=Release
- name: Install
run: cmake --build build --target install
- name: Artifact
uses: actions/upload-artifact@v4
with:
name: cs2djit-linux
path: install/bin
build-windows:
runs-on: ubuntu-latest
steps:
- name: Prepare 32-bit Multiarch
run: sudo dpkg --add-architecture i386
- name: Update Packages
run: sudo apt-get update
- name: Install LuaJIT (Host)
run: sudo apt-get install --assume-yes luajit
- name: Install MinGW-w64 Toolchain
run: sudo apt-get install --assume-yes mingw-w64 gcc-multilib
- name: Clone LuaJIT (For Target)
uses: actions/checkout@v4
with:
repository: LuaJIT/LuaJIT
path: LuaJIT
ref: v2.1
- name: Build LuaJIT (For Target)
run: cd LuaJIT && make TARGET_FLAGS="-static-libgcc" HOST_CC="gcc -m32" CROSS=i686-w64-mingw32- TARGET_SYS=Windows HOST_LUA=luajit amalg
- name: Checkout
uses: actions/checkout@v4
with:
path: cs2djit
submodules: true
- name: Configure
run: CLFAGS=-static-libgcc LUAJIT_DIR=$PWD/LuaJIT/src cmake -DCMAKE_TOOLCHAIN_FILE=$PWD/cs2djit/cmake/mingw-w64.cmake -Bbuild -Scs2djit -DCMAKE_INSTALL_PREFIX=$PWD/install -DCMAKE_BUILD_TYPE=Release
- name: Install
run: cmake --build build --target install
- name: Copy lua51.dll to Install
run: cp LuaJIT/src/lua51.dll install/bin/lua51.dll
- name: Strip
run: cd install/bin && strip lua51.dll && strip cs2djit.dll && strip cs2djitwrapper.exe
- name: Artifact
uses: actions/upload-artifact@v4
with:
name: cs2djit-windows
path: install/bin