Skip to content

Commit 6ca25cd

Browse files
committed
Workflow Modular fix for linux/macOS
1 parent 00fcfcd commit 6ca25cd

File tree

2 files changed

+46
-0
lines changed

2 files changed

+46
-0
lines changed

.github/workflows/build-linux64.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,13 @@ jobs:
136136
- name: List output directory 3
137137
run: ls -lah out/
138138

139+
- name: Clean before latest-modular upload
140+
if: github.repository == 'openframeworks/apothecary' && github.event_name == 'push' && (startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/master' || github.ref == 'refs/heads/bleeding') &&
141+
env.GCC == 'gcc14'
142+
run: |
143+
echo "Cleaning any existing openFrameworksLibs* files before latest-modular upload..."
144+
rm -f out/openFrameworksLibs*.tar.bz2
145+
139146
- name: Upload to GitHub Release
140147
if: github.repository == 'openframeworks/apothecary' && github.event_name == 'push' && (startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/master' || github.ref == 'refs/heads/bleeding') &&
141148
env.GCC == 'gcc14'

.github/workflows/build-macos.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,13 +177,52 @@ jobs:
177177
name: libs-${{ env.RELEASE }}-${{ env.TARGET }}-${{ matrix.bundle }}
178178
path: out/openFrameworksLibs_${{ env.RELEASE }}_${{ env.TARGET }}_${{ matrix.bundle }}.tar.bz2
179179
retention-days: 31
180+
181+
- name: Remove .tar.bz2 files
182+
if: github.repository == 'openframeworks/apothecary' && github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/bleeding' )
183+
run: |
184+
echo "Removing .tar.bz2 files from out/ directory..."
185+
rm -f out/*.tar.bz2
186+
rm -f xout/*.tar.bz2
187+
echo "Cleanup complete."
188+
189+
- name: Package Individual Modular Libraries (macOS)
190+
if: github.repository == 'openframeworks/apothecary' && github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/bleeding' || contains(github.ref, 'refs/tags/')) && matrix.bundle == 3
191+
working-directory: ${{ env.GITHUB_WORKSPACE }}
192+
run: |
193+
scripts/package-individual.sh
194+
env:
195+
GA_CI_SECRET: ${{ secrets.CI_SECRET }}
196+
197+
- name: List output directory before modular upload
198+
if: matrix.bundle == 3
199+
run: ls -lah xout/
200+
201+
# ── Clean before latest-modular upload (macOS) ─────────────────────────
202+
- name: Clean before latest-modular upload
203+
if: github.repository == 'openframeworks/apothecary' && github.event_name == 'push' && (startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/master' || github.ref == 'refs/heads/bleeding') && matrix.bundle == 3
204+
run: |
205+
echo "🧹 Cleaning any existing openFrameworksLibs* files before latest-modular upload..."
206+
rm -f xout/openFrameworksLibs*.tar.bz2
207+
echo "Files remaining in xout/:"
208+
ls -lah xout/
209+
210+
- name: Upload to GitHub Release (latest-modular)
211+
if: github.repository == 'openframeworks/apothecary' && github.event_name == 'push' && (startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/master' || github.ref == 'refs/heads/bleeding') && matrix.bundle == 3
212+
uses: softprops/action-gh-release@v2.1.0
213+
with:
214+
token: ${{ secrets.GITHUB_TOKEN }}
215+
tag_name: "latest-modular"
216+
files: xout/*.tar.bz2
217+
180218
- name: Remove .tar.bz2 files
181219
if: github.repository == 'openframeworks/apothecary' && github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/bleeding' )
182220
run: |
183221
echo "Removing .tar.bz2 files from out/ directory..."
184222
rm -f out/*.tar.bz2
185223
rm -f xout/*.tar.bz2
186224
echo "Cleanup complete."
225+
187226
- name: Merge our libraries into XC Framework
188227
working-directory: ${{ env.GITHUB_WORKSPACE }}
189228
run: scripts/osx/xcframework_all.sh

0 commit comments

Comments
 (0)