Skip to content

Commit

Permalink
feat: enable new_arch build
Browse files Browse the repository at this point in the history
  • Loading branch information
mfazekas committed Sep 21, 2023
1 parent b7521ed commit 3dfd692
Show file tree
Hide file tree
Showing 6 changed files with 52 additions and 5 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/android-actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ on:
default: mapbox
required: false
type: string
NEW_ARCH:
description: "If build with new architecture or not"
default: false
required: false
type: boolean
secrets:
MAPBOX_ACCESS_TOKEN:
required: true
Expand Down Expand Up @@ -54,3 +59,4 @@ jobs:
working-directory: example/android
env:
CI_MAP_IMPL: ${{ inputs.MAP_IMPL }}
ORG_GRADLE_PROJECT_newArchEnabled: ${{ inputs.NEW_ARCH && 'true' || 'false' }}
7 changes: 7 additions & 0 deletions .github/workflows/ios-actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ on:
default: mapbox
required: false
type: string
NEW_ARCH:
description: "If build with new architecture or not"
default: false
required: false
type: boolean
secrets:
MAPBOX_ACCESS_TOKEN:
required: true
Expand Down Expand Up @@ -73,6 +78,8 @@ jobs:
run: cd ios && pod --version && pod update MapboxMaps && pod install
env:
CI_MAP_IMPL: ${{ inputs.MAP_IMPL }}
RCT_NEW_ARCH_ENABLED: ${{ inputs.NEW_ARCH && 1 || 0 }}
NO_FLIPPER: 1

- name: Install Detox Dependencies
run: |
Expand Down
27 changes: 27 additions & 0 deletions .github/workflows/on-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,20 @@ jobs:
MAPBOX_ACCESS_TOKEN: ${{ secrets.MAPBOX_ACCESS_TOKEN }}
MAPBOX_DOWNLOAD_TOKEN: ${{ secrets.MAPBOX_DOWNLOAD_TOKEN }}

call_android_workflow_fabric:
name: "Android/Mapbox/Fabric"
needs: [lint_test_generate,has_mapbox_token]
uses: ./.github/workflows/android-actions.yml
with:
NVMRC: ${{ needs.lint_test_generate.outputs.NVMRC }}
MAP_IMPL: mapbox
NEW_ARCH: true
if: needs.has_mapbox_token.outputs.has-mapbox-token == 'true'
secrets:
MAPBOX_ACCESS_TOKEN: ${{ secrets.MAPBOX_ACCESS_TOKEN }}
MAPBOX_DOWNLOAD_TOKEN: ${{ secrets.MAPBOX_DOWNLOAD_TOKEN }}


call_android_workflow_11:
name: "Android/Mapbox11"
needs: [lint_test_generate,has_mapbox_token]
Expand All @@ -101,6 +115,19 @@ jobs:
MAPBOX_ACCESS_TOKEN: ${{ secrets.MAPBOX_ACCESS_TOKEN }}
MAPBOX_DOWNLOAD_TOKEN: ${{ secrets.MAPBOX_DOWNLOAD_TOKEN }}

call_ios_workflow_fabric:
name: "iOS/Mapbox/Fabric"
needs: [lint_test_generate,has_mapbox_token]
uses: ./.github/workflows/ios-actions.yml
if: needs.has_mapbox_token.outputs.has-mapbox-token == 'true'
with:
NVMRC: ${{ needs.lint_test_generate.outputs.NVMRC }}
MAP_IMPL: mapbox
NEW_ARCH: true
secrets:
MAPBOX_ACCESS_TOKEN: ${{ secrets.MAPBOX_ACCESS_TOKEN }}
MAPBOX_DOWNLOAD_TOKEN: ${{ secrets.MAPBOX_DOWNLOAD_TOKEN }}

call_ios_workflow_11:
name: "iOS/Mapbox11"
needs: [lint_test_generate,has_mapbox_token]
Expand Down
5 changes: 0 additions & 5 deletions example/ios/.byebug_history

This file was deleted.

5 changes: 5 additions & 0 deletions example/ios/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ require Pod::Executable.execute_command('node', ['-p',
"react-native/scripts/react_native_pods.rb",
{paths: [process.argv[1]]},
)', __dir__]).strip
prepare_react_native_project!

$RNMapboxMapsImpl = 'mapbox'
if ENV['RNMBX11']
Expand Down Expand Up @@ -50,6 +51,10 @@ if linkage != nil
use_frameworks! :linkage => linkage.to_sym
end


flags = get_default_flags()
use_modular_headers! if flags[:fabric_enabled]

production = ENV["PRODUCTION"] == "1"

# We ignore warning except for RNMapboxMaps
Expand Down
7 changes: 7 additions & 0 deletions example/react-native.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module.exports = {
dependencies: {
'@rnmapbox/maps': {
root: '../',
},
},
};

0 comments on commit 3dfd692

Please sign in to comment.