Standardize release workflow
Some checks failed
release / linux/aarch64 (pull_request) Successful in 49s
release / linux/armv7 (pull_request) Successful in 52s
release / linux/i686 (pull_request) Successful in 41s
release / linux/x86_64 (pull_request) Successful in 38s
release / android (pull_request) Successful in 1m36s
release / freebsd/x86_64 (pull_request) Failing after 4m47s
release / windows/i686 (pull_request) Failing after 55s
release / windows/x86_64 (pull_request) Failing after 54s
Some checks failed
release / linux/aarch64 (pull_request) Successful in 49s
release / linux/armv7 (pull_request) Successful in 52s
release / linux/i686 (pull_request) Successful in 41s
release / linux/x86_64 (pull_request) Successful in 38s
release / android (pull_request) Successful in 1m36s
release / freebsd/x86_64 (pull_request) Failing after 4m47s
release / windows/i686 (pull_request) Failing after 55s
release / windows/x86_64 (pull_request) Failing after 54s
This commit is contained in:
parent
0589f19985
commit
f552092235
3 changed files with 55 additions and 10 deletions
|
|
@ -4,6 +4,8 @@
|
|||
#
|
||||
# freebsd-build.sh <output-file> [source-dir]
|
||||
#
|
||||
# The archive lands next to <output-file> as libhate-no-d.a.
|
||||
#
|
||||
# Needs qemu-system-x86, cloud-image-utils, openssh-client, xz and curl, plus
|
||||
# /dev/kvm (act_runner: options: "--device /dev/kvm"); under TCG the boot takes
|
||||
# many minutes. The guest runs with -snapshot, so nothing persists.
|
||||
|
|
@ -126,10 +128,12 @@ ssh_vm 'set -e
|
|||
tar xzf /root/src.tar.gz -C /root/src
|
||||
cd /root/src
|
||||
gmake CC=cc clean >/dev/null 2>&1 || true
|
||||
gmake CC=cc all'
|
||||
gmake CC=cc all lib'
|
||||
|
||||
log "fetching binary"
|
||||
mkdir -p "$(dirname "$OUT")"
|
||||
log "fetching artifacts"
|
||||
mkdir -p "$OUT_DIR"
|
||||
scp $SCP_OPTS "root@127.0.0.1:/root/src/hate-no-d" "$OUT"
|
||||
scp $SCP_OPTS "root@127.0.0.1:/root/src/libhate-no-d.a" "$OUT_DIR/libhate-no-d.a"
|
||||
|
||||
log "built $OUT ($(wc -c < "$OUT") bytes)"
|
||||
log "built $OUT_DIR/libhate-no-d.a ($(wc -c < "$OUT_DIR/libhate-no-d.a") bytes)"
|
||||
|
|
|
|||
|
|
@ -53,9 +53,13 @@ jobs:
|
|||
file ./hate-no-d
|
||||
file ./hate-no-d | grep -q '${{ matrix.arch }}'
|
||||
|
||||
- name: Package
|
||||
run: sh .forgejo/scripts/make-archive.sh "hate-no-d-macos-${{ matrix.arch }}" tar.gz \
|
||||
./hate-no-d ./libhate-no-d.a
|
||||
|
||||
- name: Attach to release
|
||||
if: github.event.inputs.tag != ''
|
||||
run: sh .forgejo/scripts/release-asset.sh ./hate-no-d "hate-no-d-macos-${{ matrix.arch }}"
|
||||
run: sh .forgejo/scripts/release-asset.sh "./hate-no-d-macos-${{ matrix.arch }}.tar.gz"
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# iOS. Builds only the archive (JIT compiled out) for an Xcode app target.
|
||||
|
|
@ -72,15 +76,21 @@ jobs:
|
|||
- name: Fetch submodules
|
||||
run: git submodule update --init --recursive
|
||||
|
||||
- name: Build libluajit.a
|
||||
run: make PLATFORM=iOS IOS_ARCH=arm64 all
|
||||
- name: Build static library
|
||||
run: make PLATFORM=iOS IOS_ARCH=arm64 all lib
|
||||
|
||||
- name: Verify archive
|
||||
run: |
|
||||
set -eu
|
||||
lipo -info submodules/luajit/src/libluajit.a
|
||||
lipo -info submodules/luajit/src/libluajit.a | grep -q arm64
|
||||
# libhate-no-d.a is what ships; it must be single-arch arm64 Mach-O.
|
||||
lipo -info ./libhate-no-d.a
|
||||
lipo -info ./libhate-no-d.a | grep -q arm64
|
||||
|
||||
- name: Package
|
||||
# Only a static archive ships here: iOS forbids JIT, so libhate-no-d.a is
|
||||
# the deliverable to link into an Xcode target. There is no binary.
|
||||
run: sh .forgejo/scripts/make-archive.sh hate-no-d-ios-arm64 tar.gz ./libhate-no-d.a
|
||||
|
||||
- name: Attach to release
|
||||
if: github.event.inputs.tag != ''
|
||||
run: sh .forgejo/scripts/release-asset.sh submodules/luajit/src/libluajit.a hate-no-d-ios-arm64-luajit.a
|
||||
run: sh .forgejo/scripts/release-asset.sh ./hate-no-d-ios-arm64.tar.gz
|
||||
|
|
|
|||
33
Makefile
33
Makefile
|
|
@ -10,6 +10,7 @@
|
|||
# Targets:
|
||||
# make the CLI (hate-no-d, or hate-no-d.exe / libluajit.a on iOS)
|
||||
# make lib libhate-no-d.a, for embedding into another program
|
||||
# make help every target and option
|
||||
|
||||
# luajit requires GNU Make (use `gmake` on FreeBSD/OpenBSD/NetBSD).
|
||||
ifndef .FEATURES
|
||||
|
|
@ -222,6 +223,36 @@ $(LUAJIT_AR):
|
|||
$(MAKE) -C $(LUAJIT_SRC) $(LUAJIT_MAKE_ARGS) "LJCORE_O=ljamalg.o" libluajit.a
|
||||
|
||||
# Targets
|
||||
help:
|
||||
@echo "hate-no-d -- LuaJIT-based Lua runtime"
|
||||
@echo ""
|
||||
@echo "Targets:"
|
||||
@echo " make [all] CLI for the auto-detected platform (hate-no-d,"
|
||||
@echo " hate-no-d.exe, or libluajit.a on iOS)"
|
||||
@echo " make lib libhate-no-d.a: LuaJIT plus LIB_OBJS, for embedding"
|
||||
@echo " make luajit LuaJIT static archive only"
|
||||
@echo " make print-config resolved configuration for the current target"
|
||||
@echo " make clean remove build artifacts, LuaJIT's included"
|
||||
@echo " make help this text"
|
||||
@echo ""
|
||||
@echo "Options (pass as VAR=value):"
|
||||
@echo " PLATFORM= Linux | Android | Darwin | iOS | Windows | a BSD"
|
||||
@echo " (default: uname -s)"
|
||||
@echo " WIN_ARCH= x86_64 | i686 [Windows]"
|
||||
@echo " ANDROID_NDK= NDK root, or export ANDROID_NDK_HOME [Android]"
|
||||
@echo " ANDROID_ABI= arm64-v8a | armeabi-v7a | x86_64 | x86 [Android]"
|
||||
@echo " ANDROID_API= target API level, default 21 [Android]"
|
||||
@echo " IOS_ARCH= IOS_MIN= arm64 / 12.0 [iOS]"
|
||||
@echo " IOS_SDK= IOS_CC= Xcode paths, default from xcrun [iOS]"
|
||||
@echo " MACOSX_HRT= hardened-runtime JIT, default 1 [macOS]"
|
||||
@echo " MACOSX_DEPLOYMENT_TARGET= default 11.0 [macOS]"
|
||||
@echo " HOST_CC= host compiler for minilua/buildvm; needed"
|
||||
@echo " when the target is 32-bit and the host is not"
|
||||
@echo " CFLAGS= default -O2 -Wall"
|
||||
@echo " LDFLAGS= extra linker flags"
|
||||
@echo " LIB_OBJS= extra objects merged into libhate-no-d.a"
|
||||
@echo " AR= archiver used to merge libhate-no-d.a"
|
||||
|
||||
all: $(LINK_TARGET)
|
||||
|
||||
$(OBJ): hate-no-d.c
|
||||
|
|
@ -280,4 +311,4 @@ clean:
|
|||
$(MAKE) -C $(LUAJIT_DIR) clean
|
||||
rm -f $(BIN) $(OBJ) $(LIB) $(LIB).mri
|
||||
|
||||
.PHONY: all clean luajit print-config lib
|
||||
.PHONY: all clean luajit print-config lib help
|
||||
|
|
|
|||
Loading…
Reference in a new issue