Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Ristovski committed Aug 2, 2021
0 parents commit fe5902e
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 0 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/build.yaml
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 }}"
4 changes: 4 additions & 0 deletions README.md
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

0 comments on commit fe5902e

Please sign in to comment.