Apothecary - XCFrameworks / PKL updates #199
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: build-ios | |
on: | |
push: | |
paths-ignore: | |
- '**/README.md' | |
pull_request: | |
paths-ignore: | |
- '**/README.md' | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
build-macos-platforms: | |
runs-on: macos-14 | |
strategy: | |
matrix: | |
bundle: [1, 2, 3] | |
env: | |
TARGET: "ios" | |
BUNDLE: ${{ matrix.bundle }} | |
DEVELOPER_DIR: "/Applications/Xcode_15.2.app/Contents/Developer" | |
steps: | |
- name: Determine Release | |
id: vars | |
shell: bash | |
run: | | |
if [[ "${{ github.ref }}" == "refs/heads/master" ]]; then | |
echo "release=nightly" >> $GITHUB_ENV | |
echo "prerelease=false" >> $GITHUB_ENV | |
elif [[ "${{ github.ref }}" == "refs/heads/bleeding" ]]; then | |
echo "release=bleeding" >> $GITHUB_ENV | |
echo "prerelease=true" >> $GITHUB_ENV | |
fi | |
- uses: actions/checkout@v4 | |
- name: Scripts Calc Formula - ${{ env.TARGET }} Bundle ${{ matrix.bundle }} | |
run: ./scripts/calculate_formulas.sh | |
- name: Scripts Install | |
run: ./scripts/osx/install.sh | |
- name: Build iOS arm64 | |
working-directory: ${{ env.GITHUB_WORKSPACE }} | |
run: scripts/build.sh | |
env: | |
BUNDLE: ${{ matrix.bundle }} | |
ARCH: arm64 | |
GA_CI_SECRET: ${{ secrets.CI_SECRET }} | |
- name: Build iOS SIMULATOR x86_64 | |
working-directory: ${{ env.GITHUB_WORKSPACE }} | |
run: scripts/build.sh | |
env: | |
BUNDLE: ${{ matrix.bundle }} | |
ARCH: x86_64 | |
GA_CI_SECRET: ${{ secrets.CI_SECRET }} | |
- name: Build iOS SIMULATOR arm64 | |
working-directory: ${{ env.GITHUB_WORKSPACE }} | |
run: scripts/build.sh | |
env: | |
BUNDLE: ${{ matrix.bundle }} | |
ARCH: SIM_arm64 | |
GA_CI_SECRET: ${{ secrets.CI_SECRET }} | |
- name: List output directory | |
run: ls -lah out/ | |
- name: Package Binaries for Artifact | |
if: github.repository == 'openframeworks/apothecary' && github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/bleeding') | |
working-directory: ${{ env.GITHUB_WORKSPACE }} | |
run: scripts/artifact.sh | |
env: | |
BUNDLE: ${{ matrix.bundle }} | |
GA_CI_SECRET: ${{ secrets.CI_SECRET }} | |
- name: Upload binaries as Artifact | |
if: github.repository == 'openframeworks/apothecary' && github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/bleeding') | |
uses: actions/upload-artifact@v4 | |
with: | |
name: libs-ios-${{ env.TARGET }}-${{ matrix.bundle }} | |
path: out/openFrameworksLibs_${{ env.release }}_${{ env.TARGET }}_${{ matrix.bundle }}.tar.bz2 | |
retention-days: 2 | |
- name: Remove .tar.bz2 files | |
if: github.repository == 'openframeworks/apothecary' && github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/bleeding') | |
run: | | |
echo "Removing .tar.bz2 files from out/ directory..." | |
rm -f out/*.tar.bz2 | |
echo "Cleanup complete." | |
- name: Merge our iOS libaries into XC Framework | |
working-directory: ${{ env.GITHUB_WORKSPACE }} | |
run: scripts/ios/xcframework_all.sh | |
env: | |
BUNDLE: ${{ matrix.bundle }} | |
GA_CI_SECRET: ${{ secrets.CI_SECRET }} | |
- name: Package | |
if: github.repository == 'openframeworks/apothecary' && 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 }} | |
GA_CI_SECRET: ${{ secrets.CI_SECRET }} | |
- name: Update Release arm64 | |
if: github.repository == 'openframeworks/apothecary' && github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/bleeding') | |
uses: johnwbyrd/update-release@v1.0.0 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
tag: ${{ env.release }} | |
release: ${{ env.release }} | |
prerelease: ${{ env.prerelease }} | |
files: out/openFrameworksLibs_${{ env.release }}_${{ env.TARGET }}_${{ matrix.bundle }}.tar.bz2 |