Skip to content

Apple xcframeworks: merge archives built for only one arch (KleidiCV arm64) into the universal archive #1388

Apple xcframeworks: merge archives built for only one arch (KleidiCV arm64) into the universal archive

Apple xcframeworks: merge archives built for only one arch (KleidiCV arm64) into the universal archive #1388

name: build-linux-cross
on:
push:
branches: [bleeding, master]
tags: ['**', '!latest', '!latest-modular', '!nightly', '!build-state', '!sha256', '!nightly-staging-*', '!nightly-previous-*']
paths-ignore:
- '**/README.md'
pull_request:
paths-ignore:
- '**/README.md'
concurrency:
group: ${{ github.workflow }}-${{ startsWith(github.ref, 'refs/tags/') && github.run_id || github.event.pull_request.number || github.ref }}
cancel-in-progress: ${{ !startsWith(github.ref, 'refs/tags/') }}
permissions:
contents: write
env:
TARGET: "linux"
NO_FORCE: 1
GA_CI_SECRET: ${{ secrets.CI_SECRET }}
USE_ARTIFACT: false
DISABLE_WORKFLOW: "true"
jobs:
pre-check:
runs-on: ubuntu-latest
outputs:
workflow_disabled: ${{ steps.check-disabled.outputs.disabled }}
steps:
- name: Check if Workflow is disabled
id: check-disabled
shell: bash
run: |
if [ "${{ env.DISABLE_WORKFLOW }}" == "true" ]; then
echo "disabled=true" >> $GITHUB_ENV
echo "::set-output name=disabled::true"
else
echo "::set-output name=disabled::false"
fi
build-linux-aarch64:
if: needs.pre-check.outputs.workflow_disabled != 'true'
needs: pre-check
runs-on: ubuntu-latest
strategy:
matrix:
cfg:
- { distro: ubuntu, target: linux, arch: arm64, gcc: gcc14}
# - { distro: jetson, target: linux, arch:arm64, gcc: gcc14}
env:
TARGET: ${{matrix.cfg.target}}
GCC: ${{matrix.cfg.gcc}}
ARCH: ${{matrix.cfg.arch}}
DISTRO: ${{matrix.cfg.distro}}
steps:
- uses: actions/checkout@v7.0.1
- name: Check if Workflow is disabled
run: |
if [ "${{ env.DISABLE_WORKFLOW }}" == "true" ]; then
echo "Workflow is disabled. Exiting."
exit 78
fi
- name: Determine Release
id: vars
shell: bash
run: |
if [[ "${{ github.ref }}" == refs/tags/* ]]; then
echo "RELEASE=${{ github.ref_name }}" >> $GITHUB_ENV
elif [[ "${{ github.ref }}" == "refs/heads/master" ]]; then
echo "RELEASE=nightly" >> $GITHUB_ENV
elif [[ "${{ github.ref }}" == "refs/heads/bleeding" ]]; then
echo "RELEASE=latest" >> $GITHUB_ENV
else
echo "RELEASE=latest" >> $GITHUB_ENV
fi
- name: Scripts Calc Formula - ${{matrix.cfg.target}} - ${{matrix.cfg.gcc}}
run: ./scripts/calculate_formulas.sh
- name: Scripts Setup
run: sudo ./scripts/${{ env.TARGET }}/${{ env.DISTRO }}/${{ env.ARCH }}/setup.sh
- name: Build
working-directory: ${{env.GITHUB_WORKSPACE}}
run: ./scripts/${{ env.TARGET }}/${{ env.DISTRO }}/${{ env.ARCH }}/build.sh
env:
BUNDLE: ${{ matrix.bundle }}
- name: Package
if: (github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/bleeding'))
working-directory: ${{ env.GITHUB_WORKSPACE }}
run: scripts/package.sh
env:
BUNDLE: ${{ matrix.bundle }}
- name: List output directory
run: ls -lah out/
- name: Update GitHub Release
if: github.event_name == 'push' && (startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/master' || github.ref == 'refs/heads/bleeding')
uses: danoli3/action-gh-release@ec40b04e78c39008f73c4ca3fdf9b51df604c4ed # temporary patch: softprops/action-gh-release#852
with:
token: ${{ secrets.PAT_TOKEN || secrets.GITHUB_TOKEN }}
tag_name: ${{ env.RELEASE }}
draft: false
files: out/openFrameworksLibs_${{ env.RELEASE }}_${{ env.TARGET }}_${{ env.DISTRO }}_${{ env.ARCH }}_${{ env.GCC }}.tar.bz2