Skip to content

Commit c4ce035

Browse files
CedricGuillemetCedricGuillemetMSSergioRZMassonryantrem
authored
New package system (#361)
* rename folder/package * split between iosandroid and ts * gulp with new assembled folder * force publish to use 0.64 * path fixing * fix cmake ios * ios path again * react common path * react-native-permissions * this should fix ios package build * back to permissions 2.1.4 * lipo output path * checked assembled * reusable workflows * duplicate name * Updated windows project settings * check assembled file list * test without files check * test version patch * TS/native separation * fixed bad job name * workflow_call * fix builts * tsc * tsc * shared folder fix * small fixes * build ts * local workflow, file list re-enabled * no version for local workflow * validate assembled and iosAndroid * expectedList * readme and file checks * copyCommonFiles * Updated BabylonReactNative.vcxproj to search include headers into @babylonjs/react-native shared forlder * Fixed issue with windows build for package consumption vs repo build * moved shared * include path * shared for windows * shared folder android * android cmake again * interop ios shared path * Update Package/gulpfile.js Co-authored-by: Ryan Tremblay <[email protected]> * PR feedback * check dir displays directory name * patch react-native package version * release and version separated * typo * default RN version for tsc * PR feedback * podspec * package name patching * undo unnecessary changes * removed workflow * more conflicts * submodule fix * submodule version * submodule path * Removed submodule Modules/@babylonjs/react-native/submodules/BabylonNative * submodule fix 1 * fix module 2 * Removed submodule Modules/@babylonjs/react-native-iosandroid/submodules * fix submodule * cmake variable names Co-authored-by: Cedric Guillemet <[email protected]> Co-authored-by: Sergio Ricardo Zebetto Masson <[email protected]> Co-authored-by: Ryan Tremblay <[email protected]>
1 parent 9054098 commit c4ce035

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+22897
-385
lines changed

.github/workflows/ios_android.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@ on:
66
react-native-version:
77
required: true
88
type: string
9-
Release_Version:
10-
required: true
11-
type: string
129

1310
jobs:
1411
Build:
@@ -34,7 +31,7 @@ jobs:
3431
run: npm install
3532
working-directory: ./Package
3633
- name: Gulp
37-
run: npx gulp --reactNative ${{ inputs.react-native-version }} --releaseVersion ${{ inputs.Release_Version }}
34+
run: npx gulp --reactNative ${{ inputs.react-native-version }} --releaseVersion ${{ github.event.release.name }}
3835
working-directory: ./Package
3936
- name: Upload Assembled iOS Android Folder
4037
uses: actions/upload-artifact@v2

.github/workflows/publish.yml

Lines changed: 65 additions & 89 deletions
Original file line numberDiff line numberDiff line change
@@ -3,94 +3,32 @@ on:
33
release:
44
types: [published]
55

6-
76
jobs:
8-
select-react-native-version:
9-
runs-on: macos-latest
10-
outputs:
11-
version: ${{ steps.stepVersion.outputs.version }}
12-
steps:
13-
- uses: actions-ecosystem/action-regex-match@v2
14-
id: regex-match
15-
with:
16-
text: ${{ github.event.release.name }}
17-
regex: '^(\d+\.)?(\d+)'
18-
- name: Release infos
19-
run: |
20-
echo "- Tag ${GITHUB_REF/refs\/tags\//}"
21-
echo "- Name: ${{ github.event.release.name }}"
22-
echo "- Description: ${{ github.event.release.body }}"
23-
- id: stepVersion
24-
run: echo "::set-output name=version::${{ steps.regex-match.outputs.match }}"
25-
build-android-ios:
26-
runs-on: macos-latest
27-
needs: select-react-native-version
28-
steps:
29-
- name: Checkout Repo
30-
uses: actions/[email protected]
31-
with:
32-
submodules: 'recursive'
33-
- name: Setup CMake
34-
uses: jwlawson/[email protected]
35-
with:
36-
cmake-version: '3.19.6' # See https://gitlab.kitware.com/cmake/cmake/-/issues/22021
37-
- name: Setup Ninja
38-
run: brew install ninja
39-
- name: NPM Install (Playground)
40-
run: npm install
41-
working-directory: ./Apps/Playground
42-
- name: Select React Native Version ${{ needs.select-react-native-version.outputs.version }}
43-
run: npm run select --reactNative ${{ needs.select-react-native-version.outputs.version }}
44-
working-directory: ./Apps/Playground
45-
- name: NPM Install (Binary Package)
46-
run: npm install
47-
working-directory: ./Package
48-
- name: Gulp
49-
run: npx gulp --reactNative ${{ needs.select-react-native-version.outputs.version }}
50-
working-directory: ./Package
51-
- name: Upload Assembled Folder
52-
uses: actions/upload-artifact@v2
53-
with:
54-
name: 'Assembled'
55-
path: Package/Assembled
7+
build-android-ios-064:
8+
uses: ./.github/workflows/ios_android.yml
9+
with:
10+
react-native-version: 0.64
5611

57-
build-windows:
58-
runs-on: windows-2019
59-
needs: select-react-native-version
60-
steps:
61-
- name: Checkout Repo
62-
uses: actions/[email protected]
63-
with:
64-
submodules: 'true'
65-
- name: Setup MSBuild
66-
uses: microsoft/[email protected]
67-
- name: Setup NuGet
68-
uses: nuget/setup-nuget@v1
69-
with:
70-
nuget-version: '5.x'
71-
- name: NPM Install (Playground)
72-
run: npm install
73-
working-directory: ./Apps/Playground
74-
- name: NPM Install (React Native ${{ needs.select-react-native-version.outputs.version }})
75-
run: npm run select --reactNative ${{ needs.select-react-native-version.outputs.version }}
76-
working-directory: ./Apps/Playground
77-
- name: NPM Install (Binary Package)
78-
run: npm install
79-
working-directory: ./Package
80-
- name: Git (Windows)
81-
run: npx gulp initializeSubmodulesWindowsAgent --reactNative ${{ needs.select-react-native-version.outputs.version }}
82-
working-directory: ./Package
83-
- name: Gulp (Windows)
84-
run: npx gulp buildUWPPublish
85-
working-directory: ./Package
86-
- name: Upload Assembled-Windows Folder
87-
uses: actions/upload-artifact@v2
88-
with:
89-
name: 'Assembled-Windows'
90-
path: Package/Assembled-Windows
12+
build-android-ios-065:
13+
uses: ./.github/workflows/ios_android.yml
14+
with:
15+
react-native-version: 0.65
16+
17+
build-windows-064:
18+
uses: ./.github/workflows/windows.yml
19+
with:
20+
react-native-version: 0.64
21+
22+
build-windows-065:
23+
uses: ./.github/workflows/windows.yml
24+
with:
25+
react-native-version: 0.65
26+
27+
build-typescript:
28+
uses: ./.github/workflows/typescript.yml
9129

9230
package:
93-
needs: [select-react-native-version, build-android-ios, build-windows]
31+
needs: [build-typescript, build-android-ios-064, build-android-ios-065, build-windows-064, build-windows-065]
9432
runs-on: macos-latest
9533
steps:
9634
- name: Checkout Repo
@@ -103,11 +41,26 @@ jobs:
10341
with:
10442
name: 'Assembled'
10543
path: Package/Assembled
106-
- name: Download Assembled-Windows Folder
44+
- name: Download Assembled-iOSAndroid 0.64 Folder
45+
uses: actions/download-artifact@v2
46+
with:
47+
name: 'Assembled-iOSAndroid0.64'
48+
path: Package/Assembled-iOSAndroid0.64
49+
- name: Download Assembled-iOSAndroid 0.65 Folder
50+
uses: actions/download-artifact@v2
51+
with:
52+
name: 'Assembled-iOSAndroid0.65'
53+
path: Package/Assembled-iOSAndroid0.65
54+
- name: Download Assembled-Windows 0.64 Folder
10755
uses: actions/download-artifact@v2
10856
with:
109-
name: 'Assembled-Windows'
110-
path: Package/Assembled-Windows
57+
name: 'Assembled-Windows0.64'
58+
path: Package/Assembled-Windows0.64
59+
- name: Download Assembled-Windows 0.65 Folder
60+
uses: actions/download-artifact@v2
61+
with:
62+
name: 'Assembled-Windows0.65'
63+
path: Package/Assembled-Windows0.65
11164
- name: Display structure of downloaded Assembled and Assembled-Windows folders
11265
run: ls -R
11366
- name: Setup Node.js
@@ -123,10 +76,33 @@ jobs:
12376
working-directory: ./Package/Assembled
12477
env:
12578
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
126-
- name: Version & Publish Package @babylonjs/react-native-windows
79+
80+
- name: Version & Publish Package @babylonjs/react-native-iosandroid-0-64
81+
run: |
82+
npm version --no-git-tag-version ${GITHUB_REF/refs\/tags\//}
83+
npm publish --access public
84+
working-directory: ./Package/Assembled-iOSAndroid0.64
85+
env:
86+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
87+
- name: Version & Publish Package @babylonjs/react-native-iosandroid-0-65
88+
run: |
89+
npm version --no-git-tag-version ${GITHUB_REF/refs\/tags\//}
90+
npm publish --access public
91+
working-directory: ./Package/Assembled-iOSAndroid0.65
92+
env:
93+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
94+
95+
- name: Version & Publish Package @babylonjs/react-native-windows-0-64
12796
run: |
12897
npm version --no-git-tag-version ${GITHUB_REF/refs\/tags\//}
12998
npm publish --access public
130-
working-directory: ./Package/Assembled-Windows
99+
working-directory: ./Package/Assembled-Windows0.64
131100
env:
132101
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
102+
- name: Version & Publish Package @babylonjs/react-native-windows-0-65
103+
run: |
104+
npm version --no-git-tag-version ${GITHUB_REF/refs\/tags\//}
105+
npm publish --access public
106+
working-directory: ./Package/Assembled-Windows0.64
107+
env:
108+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

.github/workflows/publish_no_release.yml

Lines changed: 0 additions & 120 deletions
This file was deleted.

.github/workflows/typescript.yml

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
11
name: 'build Typescript'
22

3-
on:
4-
workflow_call:
5-
inputs:
6-
Release_Version:
7-
required: true
8-
type: string
3+
on: [workflow_call]
94

105
jobs:
116
Build:
@@ -25,7 +20,7 @@ jobs:
2520
run: npm install
2621
working-directory: ./Package
2722
- name: Gulp
28-
run: npx gulp buildTS --releaseVersion ${{ inputs.Release_Version }}
23+
run: npx gulp buildTS --releaseVersion ${{ github.event.release.name }}
2924
working-directory: ./Package
3025
- name: Upload Assembled Folder
3126
uses: actions/upload-artifact@v2

.github/workflows/windows.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@ on:
66
react-native-version:
77
required: true
88
type: string
9-
Release_Version:
10-
required: true
11-
type: string
129

1310
jobs:
1411
Build:
@@ -34,7 +31,7 @@ jobs:
3431
run: npm install
3532
working-directory: ./Package
3633
- name: Git (Windows)
37-
run: npx gulp initializeSubmodulesWindowsAgent --reactNative ${{ inputs.react-native-version }} --releaseVersion ${{ inputs.Release_Version }}
34+
run: npx gulp initializeSubmodulesWindowsAgent --reactNative ${{ inputs.react-native-version }} --releaseVersion ${{ github.event.release.name }}
3835
working-directory: ./Package
3936
- name: Gulp (Windows)
4037
run: npx gulp buildUWPPublish

.gitmodules

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
[submodule "Core/react-native-babylon/submodules/BabylonNative"]
2-
path = Modules/@babylonjs/react-native/submodules/BabylonNative
1+
[submodule "Modules/@babylonjs/react-native-iosandroid/submodules/BabylonNative"]
2+
path = Modules/@babylonjs/react-native-iosandroid/submodules/BabylonNative
33
url = https://github.com/BabylonJS/BabylonNative.git

Apps/Playground/0.64/ios/Playground.xcworkspace/contents.xcworkspacedata

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Apps/Playground/0.64/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
"@babylonjs/core": "5.0.0-rc.4",
1818
"@babylonjs/loaders": "5.0.0-rc.4",
1919
"@babylonjs/react-native": "file:../../../Modules/@babylonjs/react-native",
20+
"@babylonjs/react-native-iosandroid": "file:../../../Modules/@babylonjs/react-native-iosandroid",
2021
"@babylonjs/react-native-windows": "file:../../../Modules/@babylonjs/react-native-windows",
2122
"@babylonjs/playground-shared": "file:../playground-shared",
2223
"@react-native-community/slider": "4.0.0-rc.3",

Apps/Playground/0.64/scripts/tools.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ const chalk = require('chalk');
44

55
function iosCmake() {
66
console.log(chalk.black.bgCyan('Running CMake for iOS...'));
7-
shelljs.exec('cmake -G Xcode -DCMAKE_TOOLCHAIN_FILE=../submodules/BabylonNative/Dependencies/ios-cmake/ios.toolchain.cmake -DPLATFORM=OS64COMBINED -DENABLE_ARC=0 -DENABLE_BITCODE=1 -DDEPLOYMENT_TARGET=12 -DENABLE_PCH=OFF .', {cwd: 'node_modules/@babylonjs/react-native/ios'});
7+
shelljs.exec('cmake -G Xcode -DCMAKE_TOOLCHAIN_FILE=../submodules/BabylonNative/Dependencies/ios-cmake/ios.toolchain.cmake -DPLATFORM=OS64COMBINED -DENABLE_ARC=0 -DENABLE_BITCODE=1 -DDEPLOYMENT_TARGET=12 -DENABLE_PCH=OFF .', {cwd: 'node_modules/@babylonjs/react-native-iosandroid/ios'});
88
}
99

1010
function postInstall() {

0 commit comments

Comments
 (0)