-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit fe5902e
Showing
2 changed files
with
49 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
name: Build | ||
on: [workflow_dispatch] | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: "Checkout" | ||
uses: actions/checkout@v2 | ||
- name: "Checkout luajit2" | ||
uses: actions/checkout@v2 | ||
with: | ||
repository: 'openresty/luajit2' | ||
path: 'luajit2' | ||
- name: "Set up Zig" | ||
uses: goto-bus-stop/setup-zig@v1 | ||
with: | ||
version: 0.8.0 | ||
- name: "Patch Makefile" | ||
run: | | ||
sed -i 's/= gcc/= zig cc -target x86_64-linux-musl -static/' luajit2/src/Makefile | ||
sed -i '/CCOPT= -O2/s/$/ -fPIC -march=x86_64_v3/' luajit2/src/Makefile | ||
sed -i '/^#.*BUILDMODE= static/s/^#//' luajit2/src/Makefile | ||
- name: "Extract luajit2 version" | ||
run: | | ||
cd luajit2 | ||
echo "::set-env name=LUAJIT2VER::`cat README|head -n1|awk '{print $4}'`+`git rev-parse --short HEAD`" | ||
env: | ||
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true' | ||
- name: "Build luajit2" | ||
run: | | ||
cd luajit2 | ||
make amalg XCFLAGS="-DLUAJIT_ENABLE_LUA52COMPAT -DLUAJIT_NUMMODE=2 -DLUAJIT_NO_UNWIND" | ||
mkdir ../luajit2-static-${{ env.LUAJIT2VER }} | ||
make install DESTDIR=$PWD/../luajit2-static-${{ env.LUAJIT2VER }} PREFIX= | ||
- name: "Compress installation" | ||
run: | | ||
tar cfJ luajit2-static-${{ env.LUAJIT2VER }}.tar.xz luajit2-static-${{ env.LUAJIT2VER }} | ||
- name: "Create release" | ||
uses: svenstaro/upload-release-action@v2 | ||
with: | ||
repo_token: ${{ secrets.GITHUB_TOKEN }} | ||
file: luajit2-static-${{ env.LUAJIT2VER }}.tar.xz | ||
tag: ${{ env.LUAJIT2VER }} | ||
overwrite: true | ||
body: "Automatic release - ${{ env.LUAJIT2VER }}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# luajit2-static | ||
[![Build](https://github.com/Ristovski/luajit2-static/actions/workflows/build.yaml/badge.svg)](https://github.com/Ristovski/luajit2-static/actions/workflows/build.yaml) | ||
|
||
Static builds of luajit2 from OpenResty |