mirror of
https://github.com/Interlisp/maiko.git
synced 2026-01-25 19:46:21 +00:00
Return makeright to original and use LDEARCH env variable instaed; update darwin makefielsd with --target param; update buildReleaseInclDocker workflow to build both x86_64 and aarch64 binaries as well as universal binaries.
This commit is contained in:
committed by
Frank Halasz
parent
6d575a8f22
commit
6f71e2b197
81
.github/workflows/buildReleaseInclDocker.yml
vendored
81
.github/workflows/buildReleaseInclDocker.yml
vendored
@@ -27,6 +27,12 @@ env:
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
draft:
|
||||
description: "Mark this as a draft release"
|
||||
type: choice
|
||||
options:
|
||||
- 'false'
|
||||
- 'true'
|
||||
force:
|
||||
description: "Force build even if build already successfully completed for this commit"
|
||||
type: choice
|
||||
@@ -45,6 +51,11 @@ on:
|
||||
description: "'True' if maiko build completed successully"
|
||||
value: ${{ jobs.complete.outputs.build_successful }}
|
||||
inputs:
|
||||
draft:
|
||||
description: "Mark this as a draft release"
|
||||
required: false
|
||||
type: string
|
||||
default: 'false'
|
||||
force:
|
||||
description: "Force build even if build already successfully completed for this commit"
|
||||
required: false
|
||||
@@ -60,7 +71,8 @@ defaults:
|
||||
# 1. Linux: Build/push a multiplatform Linux Docker image and use results to
|
||||
# build/push Linux release assets.
|
||||
#
|
||||
# 2. MacOs_x86_64: Build maiko for MacOS on X86_64 then create and push release assets.
|
||||
# 2. MacOs: Build maiko for MacOS (x86_64, aarch64, and universal) then create
|
||||
# and push release assets.
|
||||
#
|
||||
|
||||
jobs:
|
||||
@@ -73,13 +85,20 @@ jobs:
|
||||
inputs:
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
force: ${{ steps.force.outputs.force }}
|
||||
draft: ${{ steps.one.outputs.draft }}
|
||||
force: ${{ steps.one.outputs.force }}
|
||||
steps:
|
||||
- id: force
|
||||
- id: one
|
||||
run: >
|
||||
if [ '${{ toJSON(inputs) }}' = 'null' ];
|
||||
then echo ::set-output name=force::'${{ github.event.inputs.force }}'; echo "workflow_dispatch";
|
||||
else echo ::set-output name=force::'${{ inputs.force }}'; echo "workflow_call";
|
||||
then
|
||||
echo "workflow_dispatch";
|
||||
echo "draft=${{ github.event.inputs.draft }}" >> $GITHUB_OUTPUT;
|
||||
echo "force=${{ github.event.inputs.force }}" >> $GITHUB_OUTPUT;
|
||||
else
|
||||
echo "workflow_call";
|
||||
echo "draft=${{ inputs.draft }}" >> $GITHUB_OUTPUT;
|
||||
echo "force=${{ inputs.force }}" >> $GITHUB_OUTPUT;
|
||||
fi
|
||||
|
||||
|
||||
@@ -234,7 +253,7 @@ jobs:
|
||||
|
||||
# Push Release to github
|
||||
- name: Push the release
|
||||
uses: ncipollo/release-action@v1.8.10
|
||||
uses: ncipollo/release-action@v1
|
||||
with:
|
||||
allowUpdates: true
|
||||
artifacts:
|
||||
@@ -242,22 +261,22 @@ jobs:
|
||||
/tmp/release_tars/${{ steps.tag.outputs.release_tag }}-linux.aarch64.tgz,
|
||||
/tmp/release_tars/${{ steps.tag.outputs.release_tag }}-linux.armv7l.tgz
|
||||
tag: ${{ steps.tag.outputs.release_tag }}
|
||||
draft: true
|
||||
draft: ${{ needs.inputs.outputs.draft }}
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
|
||||
######################################################################################
|
||||
|
||||
# MacOS: build for MacOS (X86_64) and use results to
|
||||
# MacOS: build for MacOS (x86_64, aarch64, universal) and use results to
|
||||
# create and push release assets to github
|
||||
macos_x86_64:
|
||||
macos:
|
||||
|
||||
needs: [inputs, sentry]
|
||||
if: |
|
||||
needs.sentry.outputs.release_not_built == 'true'
|
||||
|| needs.inputs.outputs.force == 'true'
|
||||
|
||||
runs-on: macos-10.15
|
||||
runs-on: macos-latest
|
||||
|
||||
steps:
|
||||
|
||||
@@ -287,8 +306,20 @@ jobs:
|
||||
- name: Build
|
||||
working-directory: ./bin
|
||||
run: |
|
||||
export LDEARCH=x86_64
|
||||
./makeright x
|
||||
./makeright init
|
||||
export LDEARCH=aarch64
|
||||
./makeright x
|
||||
./makeright init
|
||||
mkdir -p ../darwin.universal
|
||||
for exe in ldeinit lde ldex
|
||||
do
|
||||
lipo -create \
|
||||
-arch arm64 ../darwin.aarch64/$exe} \
|
||||
-arch x86_64 ../darwin.x86_64/${exe} \
|
||||
-output ../darwin.universal/${exe}
|
||||
done
|
||||
|
||||
# Create release tar for github.
|
||||
- name: Make release tar(s)
|
||||
@@ -296,25 +327,29 @@ jobs:
|
||||
RELEASE_TAG: ${{ steps.tag.outputs.release_tag }}
|
||||
run: |
|
||||
mkdir -p /tmp/release_tars
|
||||
pushd ${GITHUB_WORKSPACE}/../ >/dev/null
|
||||
tar -c -z \
|
||||
-f /tmp/release_tars/${RELEASE_TAG}-darwin.x86_64.tgz \
|
||||
maiko/bin/osversion \
|
||||
maiko/bin/machinetype \
|
||||
maiko/bin/config.guess \
|
||||
maiko/bin/config.sub \
|
||||
maiko/darwin.x86_64/lde*
|
||||
popd >/dev/null
|
||||
cd ${GITHUB_WORKSPACE}/../
|
||||
for arch in x86_64 aarch64 universal
|
||||
do
|
||||
tar -c -z \
|
||||
-f /tmp/release_tars/${RELEASE_TAG}-darwin.${arch}.tgz \
|
||||
maiko/bin/osversion \
|
||||
maiko/bin/machinetype \
|
||||
maiko/bin/config.guess \
|
||||
maiko/bin/config.sub \
|
||||
maiko/darwin.${arch}/lde*
|
||||
done
|
||||
|
||||
# Push Release
|
||||
- name: Push the release
|
||||
uses: ncipollo/release-action@v1.8.10
|
||||
uses: ncipollo/release-action@v1
|
||||
with:
|
||||
allowUpdates: true
|
||||
artifacts:
|
||||
/tmp/release_tars/${{ steps.tag.outputs.release_tag }}-darwin.x86_64.tgz
|
||||
/tmp/release_tars/${{ steps.tag.outputs.release_tag }}-darwin.x86_64.tgz,
|
||||
/tmp/release_tars/${{ steps.tag.outputs.release_tag }}-darwin.aarch64.tgz,
|
||||
/tmp/release_tars/${{ steps.tag.outputs.release_tag }}-darwin.universal.tgz
|
||||
tag: ${{ steps.tag.outputs.release_tag }}
|
||||
draft: true
|
||||
draft: ${{ needs.inputs.outputs.draft }}
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
|
||||
@@ -331,7 +366,7 @@ jobs:
|
||||
outputs:
|
||||
build_successful: ${{ steps.output.outputs.build_successful }}
|
||||
|
||||
needs: [inputs, sentry, linux, macos_x86_64]
|
||||
needs: [inputs, sentry, linux, macos]
|
||||
|
||||
steps:
|
||||
# Checkout the actions for this repo owner
|
||||
|
||||
Reference in New Issue
Block a user