@@ -3,60 +3,116 @@ name: build-macos
33on :
44 push :
55 paths-ignore :
6- - ' **/README.md'
6+ - ' **/README.md'
77 pull_request :
88 paths-ignore :
9- - ' **/README.md'
9+ - ' **/README.md'
1010
1111concurrency :
1212 group : ${{ github.workflow }}-${{ github.ref }}
1313 cancel-in-progress : true
1414
1515jobs :
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
0 commit comments