Skip to content

Commit 63975db

Browse files
authored
Split Build Steps for PG into seperate files. macOS / VS now should be easily built (#450)
1 parent 295b729 commit 63975db

24 files changed

Lines changed: 2926 additions & 585 deletions

.github/workflows/build-macos.yml

Lines changed: 100 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -3,60 +3,116 @@ name: build-macos
33
on:
44
push:
55
paths-ignore:
6-
- '**/README.md'
6+
- '**/README.md'
77
pull_request:
88
paths-ignore:
9-
- '**/README.md'
9+
- '**/README.md'
1010

1111
concurrency:
1212
group: ${{ github.workflow }}-${{ github.ref }}
1313
cancel-in-progress: true
1414

1515
jobs:
1616
build-osx:
17-
runs-on: macos-12
17+
runs-on: macos-13
1818
strategy:
19-
matrix:
20-
cfg:
19+
matrix:
20+
cfg:
2121
- {target: osx}
2222
env:
23-
TARGET: ${{matrix.cfg.target}}
23+
TARGET: ${{ matrix.cfg.target }}
2424
steps:
25-
- uses: actions/checkout@v3
26-
# - name: Cache OF
27-
# id: cache-of
28-
# uses: actions/cache@v3
29-
# env:
30-
# cache-name: cache-keep-of
31-
# with:
32-
# path: |
33-
# /Users/runner/work/projectGenerator/openFrameworks/**
34-
# key: ${{ runner.os }}-${{matrix.cfg.opt}}-${{ env.cache-name }}-${{ hashFiles('openFrameworks/**/*.cpp') }}
35-
# restore-keys: |
36-
# ${{ runner.os }}-${{matrix.cfg.opt}}-${{ env.cache-name }}-
37-
- name: rm-dev
38-
run: sudo rm -rf /Library/Developer
39-
- name: Build
40-
run:
41-
./scripts/osx/buildPG.sh;
42-
env:
43-
DEVELOPER_DIR: "/Applications/Xcode_13.4.1.app/Contents/Developer"
44-
SDKROOT: "/Applications/Xcode_13.4.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk"
45-
# DEVELOPER_DIR: "/Applications/Xcode_14.2.app/Contents/Developer"
46-
# SDKROOT: "/Applications/Xcode_14.2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk"
47-
GA_CI_SECRET: ${{ secrets.CI_SECRET }}
48-
CERTIFICATE_OSX_APPLICATION: ${{ secrets.CERTIFICATE_OSX_APPLICATION }}
49-
CERTIFICATE_PASSWORD: ${{ secrets.CERTIFICATE_PASSWORD }}
50-
GA_APPLE_USERNAME: ${{ secrets.GA_APPLE_USERNAME }}
51-
GA_APPLE_PASS: ${{ secrets.GA_APPLE_PASS }}
52-
GA_NOTARIZE_PROVIDER: ${{ secrets.GA_NOTARIZE_PROVIDER }}
53-
- name: Update Release
54-
if: github.repository == 'openframeworks/projectGenerator' && github.ref == 'refs/heads/master'
55-
uses: IsaacShelton/update-existing-release@v1.3.2
56-
with:
57-
token: ${{ secrets.GITHUB_TOKEN }}
58-
tag: nightly
59-
release: nightly
60-
prerelease: false
61-
replace: false
62-
files: ../openFrameworks/apps/projectGenerator/projectGenerator-osx/projectGenerator-osx.zip ../openFrameworks/apps/projectGenerator/projectGenerator-ios/projectGenerator-ios.zip
25+
- uses: actions/checkout@v4
26+
- uses: actions/setup-node@v4
27+
with:
28+
node-version: 16
29+
- name: Setup
30+
run: ./scripts/osx/setup_environment.sh
31+
- name: Determine Release
32+
id: vars
33+
shell: bash
34+
run: |
35+
if [[ "${{ github.ref }}" == "refs/heads/master" ]]; then
36+
echo "release=nightly" >> $GITHUB_ENV
37+
echo "prerelease=false" >> $GITHUB_ENV
38+
elif [[ "${{ github.ref }}" == "refs/heads/bleeding" ]]; then
39+
echo "release=bleeding" >> $GITHUB_ENV
40+
echo "prerelease=true" >> $GITHUB_ENV
41+
fi
42+
- name: Build PG macOS GUI and command line
43+
run: |
44+
echo "Current directory: (should be projectGenerator)"
45+
pwd
46+
echo "Directory contents:"
47+
ls
48+
echo "Setup CI setup environment / checkout oF "
49+
./scripts/osx/ci_install_core.sh
50+
51+
echo "Current directory after moving up: (should be projectGenerator/projectGenerator)"
52+
pwd
53+
cd ../
54+
55+
echo "Current directory after moving up: (should be projectGenerator/)"
56+
echo "------------------"
57+
pwd
58+
ls
59+
echo "------------------"
60+
if [ -f "openFrameworks/apps/projectGenerator/scripts/osx/ci_build_pg.sh" ]; then
61+
echo "ci_build_pg.sh exists, running script..."
62+
openFrameworks/apps/projectGenerator/scripts/osx/ci_build_pg.sh
63+
else
64+
echo "ci_build_pg.sh does not exist, checking Git status..."
65+
if cd openFrameworks/apps/projectGenerator; then
66+
echo "Current Git branch in projectGenerator:"
67+
git rev-parse --abbrev-ref HEAD
68+
echo "Latest commit hash in projectGenerator:"
69+
git rev-parse HEAD
70+
else
71+
echo "Failed to change directory to openFrameworks/apps/projectGenerator"
72+
fi
73+
echo "Current directory: (should be openFrameworks/apps/projectGenerator)"
74+
pwd
75+
echo "Directory contents:"
76+
ls
77+
echo "------------------"
78+
echo "Failure exit1"
79+
exit 1
80+
fi
81+
env:
82+
GA_CI_SECRET: ${{ secrets.CI_SECRET }}
83+
CERTIFICATE_OSX_APPLICATION: ${{ secrets.CERTIFICATE_OSX_APPLICATION }}
84+
CERTIFICATE_PASSWORD: ${{ secrets.CERTIFICATE_PASSWORD }}
85+
GA_APPLE_USERNAME: ${{ secrets.GA_APPLE_USERNAME }}
86+
GA_APPLE_PASS: ${{ secrets.GA_APPLE_PASS }}
87+
GA_NOTARIZE_PROVIDER: ${{ secrets.GA_NOTARIZE_PROVIDER }}
88+
- name: Check output
89+
run: |
90+
echo "Current directory: (should be projectGenerator)"
91+
pwd
92+
echo "Directory contents:"
93+
ls
94+
if [ -f "projectGenerator/projectGenerator-osx.zip" ]; then
95+
echo "projectGenerator/projectGenerator-osx.zip found at level 1"
96+
else
97+
echo "projectGenerator/projectGenerator-osx.zip NOT found at level 1"
98+
fi
99+
if [ -f "projectGenerator/projectGenerator/projectGenerator-osx.zip" ]; then
100+
echo "projectGenerator/projectGenerator/projectGenerator-osx.zip found at level 2"
101+
else
102+
echo "projectGenerator/projectGenerator/projectGenerator-osx.zip NOT found at level 2"
103+
fi
104+
if [ -f "projectGenerator-osx.zip" ]; then
105+
echo "projectGenerator-osx.zip found at level 0"
106+
else
107+
echo "projectGenerator-osx.zip NOT found at level 0"
108+
fi
109+
- name: Update Release x86_64
110+
if: github.repository == 'openframeworks/projectGenerator' && github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/bleeding')
111+
uses: IsaacShelton/update-existing-release@v1.3.3
112+
with:
113+
token: ${{ secrets.GITHUB_TOKEN }}
114+
tag: ${{ env.release }}
115+
release: ${{ env.release }}
116+
prerelease: ${{ env.prerelease }}
117+
replace: false
118+
files: projectGenerator-osx.zip

.github/workflows/build-vs.yml

Lines changed: 54 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,10 @@ jobs:
2929
BITS: ${{ matrix.bits }}
3030
steps:
3131
- name: Clone repository
32-
uses: actions/checkout@v3
32+
uses: actions/checkout@v4
33+
- uses: actions/setup-node@v4
34+
with:
35+
node-version: 18
3336
- uses: msys2/setup-msys2@v2
3437
with:
3538
update: true
@@ -39,28 +42,66 @@ jobs:
3942
zip
4043
rsync
4144
wget
45+
- name: Determine Release
46+
id: vars
47+
shell: bash
48+
run: |
49+
if [[ "${{ github.ref }}" == "refs/heads/master" ]]; then
50+
echo "release=nightly" >> $GITHUB_ENV
51+
echo "prerelease=false" >> $GITHUB_ENV
52+
elif [[ "${{ github.ref }}" == "refs/heads/bleeding" ]]; then
53+
echo "release=bleeding" >> $GITHUB_ENV
54+
echo "prerelease=true" >> $GITHUB_ENV
55+
fi
4256
- name: Install dependencies
43-
shell: msys2 {0}
57+
shell: bash
4458
run:
45-
./scripts/vs/install.sh
59+
./scripts/vs/ci_install.sh
4660
- name: Setup MSBuild
4761
uses: microsoft/setup-msbuild@v1.1
48-
- name: Build projectGenerator
62+
63+
- name: Build projectGenerator CMDLine with oF
4964
working-directory: ${{env.GITHUB_WORKSPACE}}
5065
run:
5166
msbuild ../openFrameworks/apps/projectGenerator/commandLine/commandLine.vcxproj /p:configuration=release /p:platform=${{ matrix.platform }} /p:PlatformToolset=v142
52-
- name: Create zip
53-
if: github.repository == 'openframeworks/projectGenerator' && github.ref == 'refs/heads/master'
67+
68+
- name: Create projectGenerator cmd zip
5469
shell: msys2 {0}
5570
run:
56-
./scripts/vs/create_package.sh
57-
- name: Update Release
58-
if: github.repository == 'openframeworks/projectGenerator' && github.ref == 'refs/heads/master'
59-
uses: IsaacShelton/update-existing-release@v1.3.2
71+
../openFrameworks/apps/projectGenerator/scripts/vs/ci_cmd_package.sh
72+
73+
- name: Build and Package projectGenerator VS GUI
74+
shell: bash
75+
run: |
76+
cd ../openFrameworks/apps/projectGenerator/frontend
77+
npm install
78+
npm update
79+
npm run dist:win64
80+
cd dist
81+
pwd
82+
ls
83+
- name: Create projectGenerator VS GUI package
84+
shell: msys2 {0}
85+
run:
86+
../openFrameworks/apps/projectGenerator/scripts/vs/ci_frontend_package.sh
87+
88+
- name: Update CMD Gen Release
89+
if: github.repository == 'openframeworks/projectGenerator' && github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/bleeding')
90+
uses: IsaacShelton/update-existing-release@v1.3.3
6091
with:
6192
token: ${{ secrets.GITHUB_TOKEN }}
62-
tag: nightly
63-
release: nightly
64-
prerelease: false
93+
tag: ${{ env.release }}
94+
release: ${{ env.release }}
95+
prerelease: ${{ env.release }}
6596
replace: false
6697
files: ../openFrameworks/apps/projectGenerator/commandLine/bin/projectGenerator-vs.zip
98+
- name: Update Project Gen GUI Release
99+
if: github.repository == 'openframeworks/projectGenerator' && github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/bleeding')
100+
uses: IsaacShelton/update-existing-release@v1.3.3
101+
with:
102+
token: ${{ secrets.GITHUB_TOKEN }}
103+
tag: ${{ env.release }}
104+
release: ${{ env.release }}
105+
prerelease: ${{ env.release }}
106+
replace: false
107+
files: ../openFrameworks/apps/projectGenerator/frontend/dist/projectGenerator-vs-gui.zip

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,3 +96,4 @@ Temporary Items
9696
commandLine/bin/projectGenerator*
9797
frontend/app/projectGenerator*
9898

99+
commandLine/.vs/commandLine/xs

commandLine/commandLine.xcodeproj/project.pbxproj

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@
282282
buildActionMask = 2147483647;
283283
runOnlyForDeploymentPostprocessing = 0;
284284
shellPath = /bin/sh;
285-
shellScript = "if test -f \"$TARGET_BUILD_DIR/projectGenerator\"; then rm \"$TARGET_BUILD_DIR/projectGenerator\"; fi; cp \"$TARGET_BUILD_DIR/$PRODUCT_NAME.app/Contents/MacOS/$PRODUCT_NAME\" \"$TARGET_BUILD_DIR/projectGenerator\"";
285+
shellScript = "if test -f \"$TARGET_BUILD_DIR/projectGenerator\"; then rm \"$TARGET_BUILD_DIR/projectGenerator\"; fi; cp \"$TARGET_BUILD_DIR/$PRODUCT_NAME.app/Contents/MacOS/$PRODUCT_NAME\" \"$TARGET_BUILD_DIR/projectGenerator\"\n";
286286
showEnvVarsInLog = 0;
287287
};
288288
E42962A92163ECCD00A6A9E2 /* Run Script — Compile OF */ = {
@@ -342,6 +342,7 @@
342342
"$(OF_CORE_HEADERS)",
343343
src,
344344
);
345+
ONLY_ACTIVE_ARCH = NO;
345346
OTHER_CPLUSPLUSFLAGS = "-D__MACOSX_CORE__";
346347
};
347348
name = Debug;
@@ -358,6 +359,7 @@
358359
"$(OF_CORE_HEADERS)",
359360
src,
360361
);
362+
ONLY_ACTIVE_ARCH = NO;
361363
OTHER_CPLUSPLUSFLAGS = "-D__MACOSX_CORE__";
362364
};
363365
name = Release;
@@ -381,6 +383,7 @@
381383
src/uuidxx/src,
382384
);
383385
LIBRARY_SEARCH_PATHS = "$(inherited)";
386+
ONLY_ACTIVE_ARCH = NO;
384387
OTHER_LDFLAGS = (
385388
"$(OF_CORE_LIBS)",
386389
"$(OF_CORE_FRAMEWORKS)",
@@ -407,6 +410,7 @@
407410
src/uuidxx/src,
408411
);
409412
LIBRARY_SEARCH_PATHS = "$(inherited)";
413+
ONLY_ACTIVE_ARCH = NO;
410414
OTHER_LDFLAGS = (
411415
"$(OF_CORE_LIBS)",
412416
"$(OF_CORE_FRAMEWORKS)",

0 commit comments

Comments
 (0)