@@ -40,20 +40,26 @@ jobs:
4040 matrix :
4141 rn-architecture : ['legacy', 'new']
4242 ios-use-frameworks : ['no-frameworks', 'dynamic-frameworks']
43- platform : ['android', 'ios']
43+ platform : ['android', 'ios', 'macos' ]
4444 build-type : ['dev', 'production']
4545 include :
4646 - platform : ios
4747 runs-on : macos-14 # uses m1 https://github.blog/changelog/2024-01-30-github-actions-macos-14-sonoma-is-now-available/
4848 runtime : ' latest'
4949 device : ' iPhone 14'
50+ - platform : macos
51+ runs-on : macos-14
5052 - platform : android
5153 runs-on : ubuntu-latest
5254 exclude :
5355 - platform : ' android'
5456 ios-use-frameworks : ' dynamic-frameworks'
5557 - rn-architecture : ' new'
5658 ios-use-frameworks : ' dynamic-frameworks'
59+ - rn-architecture : ' new'
60+ platform : ' macos'
61+ - ios-use-frameworks : ' dynamic-frameworks'
62+ platform : ' macos'
5763 steps :
5864 - uses : actions/checkout@v4
5965
6672 samples/react-native/yarn.lock
6773
6874 - uses : ruby/setup-ruby@v1
69- if : ${{ matrix.platform == 'ios' }}
75+ if : ${{ matrix.platform == 'ios' || matrix.platform == 'macos' }}
7076 with :
7177 working-directory : samples/react-native
7278 ruby-version : ' 3.3.0' # based on what is used in the sample
@@ -96,9 +102,12 @@ jobs:
96102 run : yarn install --frozen-lockfile
97103
98104 - name : Install App Pods
99- if : ${{ matrix.platform == 'ios' }}
100- working-directory : samples/react-native/ios
105+ if : ${{ matrix.platform == 'ios' || matrix.platform == 'macos' }}
106+ working-directory : samples/react-native
101107 run : |
108+ [[ "${{ matrix.platform }}" == "ios" ]] && cd ios
109+ [[ "${{ matrix.platform }}" == "macos" ]] && cd macos
110+
102111 [[ "${{ matrix.build-type }}" == "production" ]] && ENABLE_PROD=1 || ENABLE_PROD=0
103112 [[ "${{ matrix.rn-architecture }}" == "new" ]] && ENABLE_NEW_ARCH=1 || ENABLE_NEW_ARCH=0
104113 [[ "${{ matrix.ios-use-frameworks }}" == "dynamic-frameworks" ]] && export USE_FRAMEWORKS=dynamic && export NO_FLIPPER=1
@@ -138,9 +147,28 @@ jobs:
138147 | tee xcodebuild.log \
139148 | xcbeautify --quieter --is-ci --disable-colored-output
140149
150+ - name : Build macOS App
151+ if : ${{ matrix.platform == 'macos' }}
152+ working-directory : samples/react-native/macos
153+ run : |
154+ [[ "${{ matrix.build-type }}" == "production" ]] && CONFIG='Release' || CONFIG='Debug'
155+ echo "Building $CONFIG"
156+ mkdir -p "DerivedData"
157+ derivedData="$(cd "DerivedData" ; pwd -P)"
158+ set -o pipefail && xcodebuild \
159+ -workspace sentry-react-native-sample.xcworkspace \
160+ -configuration "$CONFIG" \
161+ -scheme sentry-react-native-sample-macOS \
162+ -destination 'platform=macOS' \
163+ ONLY_ACTIVE_ARCH=yes \
164+ -derivedDataPath "$derivedData" \
165+ build \
166+ | tee xcodebuild.log \
167+ | xcbeautify --quieter --is-ci --disable-colored-output
168+
141169 - name : Upload logs
142170 if : ${{ always() }}
143171 uses : actions/upload-artifact@v4
144172 with :
145173 name : build-sample-${{ matrix.rn-architecture }}-${{ matrix.platform }}-${{ matrix.build-type }}-${{ matrix.ios-use-frameworks}}-logs
146- path : samples/react-native/ios /*.log
174+ path : samples/react-native/${{ matrix.platform }} /*.log
0 commit comments