Skip to content

Commit

Permalink
Create new package to support React Native 0.69 (#442)
Browse files Browse the repository at this point in the history
* First pass Playground project generation.

* Missing dependencies and configurations.  Works on iOS.

* Downgrade Gradle and NDK version version, add java source files.

* Add support for M1 chips disable AA in playground to fix rendering error on Samsung devices.  Fix .gitignore, add back missing files from iOS project.

* Add skeleton for windows support to 0.69 playground

* Upgrade gradle and build tools to fix android build issues on Windows.

* Update .yml files

* Skeleton for PackageTest project.

* Revert "Upgrade gradle and build tools to fix android build issues on Windows."

This reverts commit 1bf5763.

* Add back .gitignore and metro.config.js chjanges

* update for PackageTest  after testing with local packages.

* Update 0.69 gitignore for windows files

* Set up JDK version for 0.69 builds.

* Fix setup-java reference.

* Properly format input for java-version

* Add job to publish 0.69 to publish_preview.yml

* Update README.md

* Update readme, and re-enable AA.

* Remove unneeded compileOptions hook that was causing build errors in the Playground on Mac.
  • Loading branch information
Alex-MSFT authored Aug 8, 2022
1 parent 719cf11 commit fa177df
Show file tree
Hide file tree
Showing 181 changed files with 54,979 additions and 11 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/ios_android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ on:
release-version:
required: true
type: string
java-version:
required: false
type: string
default: '8'

jobs:
Build:
Expand All @@ -22,6 +26,11 @@ jobs:
uses: jwlawson/actions-setup-cmake@v1.8
with:
cmake-version: '3.19.6' # See https://gitlab.kitware.com/cmake/cmake/-/issues/22021
- name: Set up JDK
uses: actions/setup-java@v2
with:
distribution: 'zulu'
java-version: ${{ inputs.java-version }}
- name: Setup Ninja
run: brew install ninja
- name: NPM Install (Playground)
Expand Down
14 changes: 14 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -125,15 +125,29 @@ jobs:
build-android-ios-065:
uses: ./.github/workflows/ios_android.yml
with:
java-version: '8'
react-native-version: 0.65
release-version: 0.0.${GITHUB_SHA::8}

build-android-ios-069:
uses: ./.github/workflows/ios_android.yml
with:
java-version: '11'
react-native-version: 0.69
release-version: 0.0.${GITHUB_SHA::8}

build-windows-065:
uses: ./.github/workflows/windows.yml
with:
react-native-version: 0.65
release-version: 0.0.${GITHUB_SHA::8}

build-windows-069:
uses: ./.github/workflows/windows.yml
with:
react-native-version: 0.69
release-version: 0.0.${GITHUB_SHA::8}

build-typescript:
uses: ./.github/workflows/typescript.yml
with:
Expand Down
43 changes: 41 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,23 @@ jobs:
build-android-ios-064:
uses: ./.github/workflows/ios_android.yml
with:
java-version: '8'
react-native-version: 0.64
release-version: ${GITHUB_REF/refs\/tags\//}

build-android-ios-065:
uses: ./.github/workflows/ios_android.yml
with:
java-version: '8'
react-native-version: 0.65
release-version: ${GITHUB_REF/refs\/tags\//}

build-android-ios-069:
uses: ./.github/workflows/ios_android.yml
with:
java-version: '11'
react-native-version: 0.69
release-version: ${GITHUB_REF/refs\/tags\//}

build-windows-064:
uses: ./.github/workflows/windows.yml
Expand All @@ -28,13 +37,19 @@ jobs:
react-native-version: 0.65
release-version: ${GITHUB_REF/refs\/tags\//}

build-windows-069:
uses: ./.github/workflows/windows.yml
with:
react-native-version: 0.69
release-version: ${GITHUB_REF/refs\/tags\//}

build-typescript:
uses: ./.github/workflows/typescript.yml
with:
release-version: ${GITHUB_REF/refs\/tags\//}

package:
needs: [build-typescript, build-android-ios-064, build-android-ios-065, build-windows-064, build-windows-065]
needs: [build-typescript, build-android-ios-064, build-android-ios-065, build-android-ios-069, build-windows-064, build-windows-065, build-windows-069]
runs-on: macos-latest
steps:
- name: Checkout Repo
Expand All @@ -57,6 +72,11 @@ jobs:
with:
name: 'Assembled-iOSAndroid0.65'
path: Package/Assembled-iOSAndroid0.65
- name: Download Assembled-iOSAndroid 0.69 Folder
uses: actions/download-artifact@v2
with:
name: 'Assembled-iOSAndroid0.69'
path: Package/Assembled-iOSAndroid0.69
- name: Download Assembled-Windows 0.64 Folder
uses: actions/download-artifact@v2
with:
Expand All @@ -67,6 +87,11 @@ jobs:
with:
name: 'Assembled-Windows0.65'
path: Package/Assembled-Windows0.65
- name: Download Assembled-Windows 0.69 Folder
uses: actions/download-artifact@v2
with:
name: 'Assembled-Windows0.69'
path: Package/Assembled-Windows0.69
- name: Display structure of downloaded Assembled and Assembled-Windows folders
run: ls -R
- name: Setup Node.js
Expand Down Expand Up @@ -97,6 +122,13 @@ jobs:
working-directory: ./Package/Assembled-iOSAndroid0.65
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Version & Publish Package @babylonjs/react-native-iosandroid-0-69
run: |
npm version --no-git-tag-version ${GITHUB_REF/refs\/tags\//}
npm publish --access public
working-directory: ./Package/Assembled-iOSAndroid0.69
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Version & Publish Package @babylonjs/react-native-windows-0-64
run: |
Expand All @@ -111,4 +143,11 @@ jobs:
npm publish --access public
working-directory: ./Package/Assembled-Windows0.65
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Version & Publish Package @babylonjs/react-native-windows-0-69
run: |
npm version --no-git-tag-version ${GITHUB_REF/refs\/tags\//}
npm publish --access public
working-directory: ./Package/Assembled-Windows0.69
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
41 changes: 40 additions & 1 deletion .github/workflows/publish_preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,24 @@ jobs:
build-android-ios-064:
uses: ./.github/workflows/ios_android.yml
with:
java-version: '8'
react-native-version: 0.64
release-version: ${{ github.event.inputs.release_version }}

build-android-ios-065:
uses: ./.github/workflows/ios_android.yml
with:
java-version: '8'
react-native-version: 0.65
release-version: ${{ github.event.inputs.release_version }}

build-android-ios-069:
uses: ./.github/workflows/ios_android.yml
with:
java-version: '11'
react-native-version: 0.69
release-version: ${{ github.event.inputs.release_version }}

build-windows-064:
uses: ./.github/workflows/windows.yml
with:
Expand All @@ -38,13 +47,19 @@ jobs:
react-native-version: 0.65
release-version: ${{ github.event.inputs.release_version }}

build-windows-069:
uses: ./.github/workflows/windows.yml
with:
react-native-version: 0.69
release-version: ${{ github.event.inputs.release_version }}

build-typescript:
uses: ./.github/workflows/typescript.yml
with:
release-version: ${{ github.event.inputs.release_version }}

package:
needs: [build-typescript, build-android-ios-064, build-android-ios-065, build-windows-064, build-windows-065]
needs: [build-typescript, build-android-ios-064, build-android-ios-065, build-android-ios-069 build-windows-064, build-windows-065, build-windows-069]
runs-on: macos-latest
steps:
- name: Checkout Repo
Expand All @@ -67,6 +82,11 @@ jobs:
with:
name: 'Assembled-iOSAndroid0.65'
path: Package/Assembled-iOSAndroid0.65
- name: Download Assembled-iOSAndroid 0.69 Folder
uses: actions/download-artifact@v2
with:
name: 'Assembled-iOSAndroid0.69'
path: Package/Assembled-iOSAndroid0.69
- name: Download Assembled-Windows 0.64 Folder
uses: actions/download-artifact@v2
with:
Expand All @@ -77,6 +97,11 @@ jobs:
with:
name: 'Assembled-Windows0.65'
path: Package/Assembled-Windows0.65
- name: Download Assembled-Windows 0.69 Folder
uses: actions/download-artifact@v2
with:
name: 'Assembled-Windows0.69'
path: Package/Assembled-Windows0.69
- name: Display structure of downloaded Assembled and Assembled-Windows folders
run: ls -R
- name: Setup Node.js
Expand Down Expand Up @@ -107,6 +132,13 @@ jobs:
working-directory: ./Package/Assembled-iOSAndroid0.65
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Version & Publish Package @babylonjs/react-native-iosandroid-0-69
run: |
npm version --no-git-tag-version ${{ github.event.inputs.release_version }}
npm publish --access public --tag ${{ github.event.inputs.NPM_tag }}
working-directory: ./Package/Assembled-iOSAndroid0.69
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Version & Publish Package @babylonjs/react-native-windows-0-64
run: |
Expand All @@ -120,5 +152,12 @@ jobs:
npm version --no-git-tag-version ${{ github.event.inputs.release_version }}
npm publish --access public --tag ${{ github.event.inputs.NPM_tag }}
working-directory: ./Package/Assembled-Windows0.65
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Version & Publish Package @babylonjs/react-native-windows-0-69
run: |
npm version --no-git-tag-version ${{ github.event.inputs.release_version }}
npm publish --access public --tag ${{ github.event.inputs.NPM_tag }}
working-directory: ./Package/Assembled-Windows0.69
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
6 changes: 6 additions & 0 deletions Apps/PackageTest/0.69.0/.buckconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@

[android]
target = Google Inc.:Google APIs:23

[maven_repositories]
central = https://repo1.maven.org/maven2
2 changes: 2 additions & 0 deletions Apps/PackageTest/0.69.0/.bundle/config
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
BUNDLE_PATH: "vendor/bundle"
BUNDLE_FORCE_RUBY_PLATFORM: 1
16 changes: 16 additions & 0 deletions Apps/PackageTest/0.69.0/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
module.exports = {
root: true,
extends: '@react-native-community',
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint'],
overrides: [
{
files: ['*.ts', '*.tsx'],
rules: {
'@typescript-eslint/no-shadow': ['error'],
'no-shadow': 'off',
'no-undef': 'off',
},
},
],
};
63 changes: 63 additions & 0 deletions Apps/PackageTest/0.69.0/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# OSX
#
.DS_Store

# Xcode
#
build/
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata
*.xccheckout
*.moved-aside
DerivedData
*.hmap
*.ipa
*.xcuserstate
ios/.xcode.env.local

# Android/IntelliJ
#
build/
.idea
.gradle
local.properties
*.iml
*.hprof

# node.js
#
node_modules/
npm-debug.log
yarn-error.log

# BUCK
buck-out/
\.buckd/
*.keystore
!debug.keystore

# fastlane
#
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
# screenshots whenever they are needed.
# For more information about the recommended setup visit:
# https://docs.fastlane.tools/best-practices/source-control/

**/fastlane/report.xml
**/fastlane/Preview.html
**/fastlane/screenshots
**/fastlane/test_output

# Bundle artifact
*.jsbundle

# Ruby / CocoaPods
/ios/Pods/
/vendor/bundle/
7 changes: 7 additions & 0 deletions Apps/PackageTest/0.69.0/.prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module.exports = {
arrowParens: 'avoid',
bracketSameLine: true,
bracketSpacing: false,
singleQuote: true,
trailingComma: 'all',
};
1 change: 1 addition & 0 deletions Apps/PackageTest/0.69.0/.ruby-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2.7.5
1 change: 1 addition & 0 deletions Apps/PackageTest/0.69.0/.watchmanconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
6 changes: 6 additions & 0 deletions Apps/PackageTest/0.69.0/Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
source 'https://rubygems.org'

# You may use http://rbenv.org/ or https://rvm.io/ to install and use this version
ruby '2.7.5'

gem 'cocoapods', '~> 1.11', '>= 1.11.2'
14 changes: 14 additions & 0 deletions Apps/PackageTest/0.69.0/__tests__/App-test.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/**
* @format
*/

import 'react-native';
import React from 'react';
import App from '../App';

// Note: test renderer must be required after react-native.
import renderer from 'react-test-renderer';

it('renders correctly', () => {
renderer.create(<App />);
});
Loading

0 comments on commit fa177df

Please sign in to comment.