Skip to content

Commit 9a6d382

Browse files
committed
Add LuaJIT build action
[windows-luajit]
1 parent 32455ba commit 9a6d382

File tree

1 file changed

+86
-0
lines changed

1 file changed

+86
-0
lines changed
Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
name: windows-luajit
2+
3+
on: [push]
4+
5+
jobs:
6+
Build-Libs-LuaJIT-Windows:
7+
name: 'Build-Libs-LuaJIT-Windows'
8+
runs-on: windows-latest
9+
if: |
10+
contains(github.event.head_commit.message, '[all]') ||
11+
contains(github.event.head_commit.message, '[windows]') ||
12+
contains(github.event.head_commit.message, '[windows-luajit]') ||
13+
contains(github.event.head_commit.message, '[luajit]')
14+
15+
defaults:
16+
run:
17+
shell: msys2 {0}
18+
strategy:
19+
fail-fast: false
20+
matrix:
21+
include: [
22+
{ msystem: mingw64, arch: x86_64 },
23+
{ msystem: mingw32, arch: i686 }
24+
]
25+
26+
steps:
27+
- name: 'Get LuaJIT'
28+
uses: actions/checkout@v4
29+
with:
30+
repository: LuaJIT/LuaJIT
31+
ref: v2.1
32+
path: LuaJIT
33+
34+
- name: Install MinGW
35+
uses: msys2/setup-msys2@v2
36+
with:
37+
msystem: ${{ matrix.msystem }}
38+
update: true
39+
install: >-
40+
mingw-w64-${{ matrix.arch }}-toolchain
41+
base-devel
42+
git
43+
upx
44+
45+
- name: 'Build LuaJIT binary'
46+
working-directory: LuaJIT/src
47+
run: |
48+
make
49+
50+
- name: 'Archive artifacts'
51+
uses: actions/upload-artifact@v4
52+
with:
53+
name: luajit-windows-${{ matrix.arch }}
54+
path: LuaJIT/src
55+
retention-days: 1
56+
57+
github-release:
58+
name: GitHub Release
59+
needs: Build-Libs-LuaJIT-Windows
60+
runs-on: ubuntu-latest
61+
if: startsWith(github.ref, 'refs/tags/')
62+
63+
steps:
64+
- name: Setup | Checkout
65+
uses: actions/checkout@v4
66+
67+
- name: Setup | Artifacts
68+
uses: actions/download-artifact@v4
69+
70+
- name: Setup | Checksums
71+
run: for file in $(find ./ -name '*.dll' ); do openssl dgst -sha256 -r "$file" | awk '{print $1}' > "${file}.sha256"; done
72+
73+
- name: Setup | Checksums
74+
run: for file in $(find ./ -name '*.a' ); do openssl dgst -sha256 -r "$file" | awk '{print $1}' > "${file}.sha256"; done
75+
76+
- name: Zip ALL
77+
run: for file in *; do zip -r ${file%.*}.zip $file; done
78+
79+
- name: Upload binaries to release
80+
uses: svenstaro/upload-release-action@v2
81+
with:
82+
repo_token: ${{ secrets.GITHUB_TOKEN }}
83+
file: luajit-windows-${{ matrix.arch }}.zip
84+
tag: ${{ github.ref }}
85+
overwrite: true
86+
file_glob: true

0 commit comments

Comments
 (0)