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
96 lines
3.2 KiB
YAML
96 lines
3.2 KiB
YAML
# Apple targets (macOS + iOS), kept out of release.yml: they need a `macos`
|
|
# runner. Gating them there with `if: vars.*` does not work -- Forgejo does not
|
|
# evaluate `vars` in `if:`, so the jobs queued forever and the run never
|
|
# finished. Manual dispatch only, until a Mac runner exists.
|
|
name: apple
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
inputs:
|
|
tag:
|
|
description: 'Release tag to attach artifacts to (empty = build only)'
|
|
required: false
|
|
default: ''
|
|
|
|
env:
|
|
FORGEJO_API_URL: ${{ github.server_url }}/api/v1
|
|
FORGEJO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
REPO: ${{ github.repository }}
|
|
TAG: ${{ github.event.inputs.tag }}
|
|
|
|
jobs:
|
|
# ---------------------------------------------------------------------------
|
|
# macOS. The SDKs are universal: only target objects get -arch.
|
|
# ---------------------------------------------------------------------------
|
|
macos:
|
|
name: macos/${{ matrix.arch }}
|
|
runs-on: macos
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
arch: [arm64, x86_64]
|
|
steps:
|
|
- name: Checkout
|
|
uses: https://data.forgejo.org/actions/checkout@v4
|
|
with:
|
|
submodules: false
|
|
|
|
# luajit.org is dumb HTTP and rejects the --depth that checkout's
|
|
# submodule support always passes, so clone it here in full.
|
|
- name: Fetch submodules
|
|
run: git submodule update --init --recursive
|
|
|
|
- name: Build
|
|
run: |
|
|
make \
|
|
CFLAGS="-O2 -Wall -arch ${{ matrix.arch }}" \
|
|
LUAJIT_EXTRA="TARGET_FLAGS=-arch ${{ matrix.arch }}" \
|
|
all lib
|
|
|
|
- name: Verify architecture
|
|
run: |
|
|
set -eu
|
|
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-macos-${{ matrix.arch }}.tar.gz"
|
|
|
|
# ---------------------------------------------------------------------------
|
|
# iOS. Builds only the archive (JIT compiled out) for an Xcode app target.
|
|
# ---------------------------------------------------------------------------
|
|
ios:
|
|
name: ios/arm64
|
|
runs-on: macos
|
|
steps:
|
|
- name: Checkout
|
|
uses: https://data.forgejo.org/actions/checkout@v4
|
|
with:
|
|
submodules: false
|
|
|
|
- name: Fetch submodules
|
|
run: git submodule update --init --recursive
|
|
|
|
- name: Build static library
|
|
run: make PLATFORM=iOS IOS_ARCH=arm64 all lib
|
|
|
|
- name: Verify archive
|
|
run: |
|
|
set -eu
|
|
# 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 ./hate-no-d-ios-arm64.tar.gz
|