Skip to content

Commit

Permalink
Move to GH Actions (#158)
Browse files Browse the repository at this point in the history
* Revert "feat: implement visionOS CI (#54)"

This reverts commit ae6f903.

* fix: implement GH actions CI
  • Loading branch information
okwasniewski committed Sep 17, 2024
1 parent d56523c commit a916898
Show file tree
Hide file tree
Showing 7 changed files with 142 additions and 44 deletions.
2 changes: 1 addition & 1 deletion .github/actions/test-ios-helloworld/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ runs:
- name: Run yarn
uses: ./.github/actions/yarn-install-with-cache
- name: Setup ruby
uses: ruby/setup-ruby@v1.170.0
uses: ruby/setup-ruby@v1.171.0
with:
ruby-version: ${{ inputs.ruby-version }}
- name: Install iOS dependencies - Configuration ${{ inputs.flavor }}; New Architecture ${{ inputs.architecture }}; JS Engine ${{ inputs.jsengine }}
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/test-ios-rntester/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ runs:
name: hermes-darwin-bin-${{ inputs.flavor }}
path: ${{ inputs.hermes-tarball-artifacts-dir }}
- name: Setup ruby
uses: ruby/setup-ruby@v1.170.0
uses: ruby/setup-ruby@v1.171.0
with:
ruby-version: ${{ inputs.ruby-version }}
- name: Prepare IOS Tests
Expand Down
66 changes: 66 additions & 0 deletions .github/actions/test-visionos-rntester/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: test-visionos-rntester
description: Build visionOS RNTester using JSC
inputs:
use-frameworks:
description: The dependency building and linking strategy to use. Must be one of "StaticLibraries", "DynamicFrameworks"
default: StaticLibraries
architecture:
description: The React Native architecture to Test. RNTester has always Fabric enabled, but we want to run integration test with the old arch setup
default: NewArch
ruby-version:
description: The version of ruby that must be used
default: 2.6.10
flavor:
description: The flavor of the build. Must be one of "Debug", "Release".
default: Debug
react-native-version:
description: The version of react-native
required: true
run-e2e-tests:
description: Whether we want to run E2E tests or not
required: false
default: false

runs:
using: composite
steps:
- name: Setup xcode
uses: ./.github/actions/setup-xcode
with:
xcode-version: "15.4"
- name: Setup node.js
uses: ./.github/actions/setup-node
- name: Run yarn
uses: ./.github/actions/yarn-install-with-cache
- name: Setup ruby
uses: ruby/setup-ruby@v1.171.0
with:
ruby-version: ${{ inputs.ruby-version }}
- name: Setup xcode build cache
uses: ./.github/actions/setup-xcode-build-cache
- name: Install CocoaPods dependencies
shell: bash
run: |
export USE_HERMES=0
if [[ ${{ inputs.use-frameworks }} == "DynamicFrameworks" ]]; then
export USE_FRAMEWORKS=dynamic
fi
if [[ ${{ inputs.architecture }} == "NewArch" ]]; then
export RCT_NEW_ARCH_ENABLED=1
fi
cd packages/rn-tester
bundle install
bundle exec pod install
- name: Build RNTester for visionOS
if: ${{ inputs.run-e2e-tests == 'false' }}
shell: bash
run: |
xcodebuild build \
-workspace packages/rn-tester/RNTesterPods.xcworkspace \
-scheme RNTester-visionOS \
-sdk xrsimulator \
-destination "platform=visionOS Simulator,name=Apple Vision Pro"
53 changes: 42 additions & 11 deletions .github/workflows/test-all.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
name: Test All

# on:
# workflow_dispatch:
# pull_request:
# push:
# tags:
# - 'v*'
# # nightly build @ 2:15 AM UTC
# schedule:
# - cron: '15 2 * * *'
on:
workflow_dispatch:
pull_request:
push:
branches:
- main
- "*-stable"

jobs:
set_release_type:
if: github.repository == 'facebook/react-native'
runs-on: ubuntu-latest
outputs:
RELEASE_TYPE: ${{ steps.set_release_type.outputs.RELEASE_TYPE }}
Expand All @@ -33,6 +32,7 @@ jobs:
fi
prepare_hermes_workspace:
if: github.repository == 'facebook/react-native'
runs-on: ubuntu-latest
env:
HERMES_WS_DIR: /tmp/hermes
Expand All @@ -51,6 +51,7 @@ jobs:
hermes-version-file: ${{ env.HERMES_VERSION_FILE }}

build_hermesc_apple:
if: github.repository == 'facebook/react-native'
runs-on: macos-13
needs: prepare_hermes_workspace
env:
Expand All @@ -65,6 +66,7 @@ jobs:
react-native-version: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }}

build_apple_slices_hermes:
if: github.repository == 'facebook/react-native'
runs-on: macos-14
needs: [build_hermesc_apple, prepare_hermes_workspace]
env:
Expand All @@ -91,6 +93,7 @@ jobs:
react-native-version: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }}

build_hermes_macos:
if: github.repository == 'facebook/react-native'
runs-on: macos-13
needs: [build_apple_slices_hermes, prepare_hermes_workspace]
env:
Expand All @@ -112,6 +115,7 @@ jobs:
flavor: ${{ matrix.flavor }}

test_ios_rntester_ruby_3_2_0:
if: github.repository == 'facebook/react-native'
runs-on: macos-13
needs:
[build_apple_slices_hermes, prepare_hermes_workspace, build_hermes_macos]
Expand All @@ -129,6 +133,7 @@ jobs:
react-native-version: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }}

test_ios_rntester_dynamic_frameworks:
if: github.repository == 'facebook/react-native'
runs-on: macos-13
needs:
[build_apple_slices_hermes, prepare_hermes_workspace, build_hermes_macos]
Expand All @@ -152,6 +157,7 @@ jobs:
react-native-version: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }}

test_ios_rntester:
if: github.repository == 'facebook/react-native'
runs-on: macos-13
needs:
[build_apple_slices_hermes, prepare_hermes_workspace, build_hermes_macos]
Expand All @@ -162,7 +168,6 @@ jobs:
strategy:
fail-fast: false
matrix:
jsengine: [Hermes, JSC]
architecture: [NewArch, OldArch]
steps:
- name: Checkout
Expand All @@ -177,6 +182,26 @@ jobs:
hermes-version: ${{ needs.prepare_hermes_workspace.outputs.hermes-version }}
react-native-version: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }}

test_visionos_rntester:
runs-on: macos-14-xlarge
continue-on-error: true
strategy:
fail-fast: false
matrix:
architecture: [NewArch, OldArch]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Run it
uses: ./.github/actions/test-visionos-rntester
with:
jsengine: ${{ matrix.jsengine }}
architecture: ${{ matrix.architecture }}
run-unit-tests: "false"
use-frameworks: StaticLibraries
hermes-version: ${{ needs.prepare_hermes_workspace.outputs.hermes-version }}
react-native-version: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }}

test_e2e_ios_rntester:
if: ${{ github.ref == 'refs/heads/main' || contains(github.ref, 'stable') }}
runs-on: macos-13
Expand Down Expand Up @@ -234,7 +259,7 @@ jobs:
- name: Run yarn
uses: ./.github/actions/yarn-install-with-cache
- name: Setup ruby
uses: ruby/setup-ruby@v1.170.0
uses: ruby/setup-ruby@v1.171.0
with:
ruby-version: 2.6.10
- name: Download Hermes
Expand Down Expand Up @@ -338,6 +363,7 @@ jobs:
install-java: 'false'

build_hermesc_linux:
if: github.repository == 'facebook/react-native'
runs-on: ubuntu-latest
needs: prepare_hermes_workspace
env:
Expand All @@ -353,6 +379,7 @@ jobs:
react-native-version: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }}

build_hermesc_windows:
if: github.repository == 'facebook/react-native'
runs-on: windows-2019
needs: prepare_hermes_workspace
env:
Expand All @@ -372,6 +399,7 @@ jobs:
react-native-version: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }}

build_android:
if: github.repository == 'facebook/react-native'
runs-on: 8-core-ubuntu
needs: [set_release_type]
container:
Expand Down Expand Up @@ -512,6 +540,7 @@ jobs:
compression-level: 0

test_ios_helloworld_with_ruby_3_2_0:
if: github.repository == 'facebook/react-native'
runs-on: macos-13
needs: [prepare_hermes_workspace, build_hermes_macos] # prepare_hermes_workspace must be there because we need its reference to retrieve a couple of outputs
env:
Expand All @@ -530,6 +559,7 @@ jobs:
react-native-version: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }}

test_ios_helloworld:
if: github.repository == 'facebook/react-native'
runs-on: macos-13
needs: [prepare_hermes_workspace, build_hermes_macos] # prepare_hermes_workspace must be there because we need its reference to retrieve a couple of outputs
strategy:
Expand Down Expand Up @@ -573,6 +603,7 @@ jobs:

lint:
runs-on: ubuntu-latest
if: github.repository == 'facebook/react-native'
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ async function runServer(
let reportEvent: (event: TerminalReportableEvent) => void;
const terminal = new Terminal(process.stdout);
const ReporterImpl = getReporterImpl(args.customLogReporterPath);
// $FlowIgnore fix this
const terminalReporter = new ReporterImpl(terminal);
const reporter: Reporter = {
update(event: TerminalReportableEvent) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9773,7 +9773,7 @@ exports[`public API should not change unintentionally Libraries/WebSocket/WebSoc
exports[`public API should not change unintentionally Libraries/WebSocket/WebSocketInterceptor.js 1`] = `"UNTYPED MODULE"`;

exports[`public API should not change unintentionally Libraries/WindowManager/NativeWindowManager.js 1`] = `
"export * from \\"../../src/private/specs/visionos_modules/NativeWindowManager\\";
"export * from \\"../../visionos_modules/NativeWindowManager\\";
declare export default typeof NativeWindowManager;
"
`;
Expand All @@ -9795,7 +9795,7 @@ declare module.exports: WindowManager;
`;

exports[`public API should not change unintentionally Libraries/XR/NativeXRModule.js 1`] = `
"export * from \\"../../src/private/specs/visionos_modules/NativeXRModule\\";
"export * from \\"../../visionos_modules/NativeXRModule\\";
declare export default typeof NativeXRModule;
"
`;
Expand Down
58 changes: 29 additions & 29 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2049,17 +2049,17 @@
resolved "https://registry.yarnpkg.com/@react-native/assets-registry/-/assets-registry-0.74.0.tgz#560bec29b2699c4d4cbfecfb4c2c5025397aac23"
integrity sha512-I8Yy6bCKU5R4qZX4jfXsAPsHyuGHlulbnbG3NqO9JgZ3T2DJxJiZE39rHORP0trLnRh0rIeRcs4Mc14fAE6hrw==

"@react-native/babel-plugin-codegen@0.74.85":
version "0.74.85"
resolved "https://registry.yarnpkg.com/@react-native/babel-plugin-codegen/-/babel-plugin-codegen-0.74.85.tgz#067224bf5099ee2679babd700c7115822a747004"
integrity sha512-48TSDclRB5OMXiImiJkLxyCfRyLsqkCgI8buugCZzvXcYslfV7gCvcyFyQldtcOmerV+CK4RAj7QS4hmB5Mr8Q==
"@react-native/babel-plugin-codegen@0.74.86":
version "0.74.86"
resolved "https://registry.yarnpkg.com/@react-native/babel-plugin-codegen/-/babel-plugin-codegen-0.74.86.tgz#4edbb8887c5cedefd52e8fda973b1da97c779db4"
integrity sha512-fO7exk0pdsOSsK3fvDz4YKe5nMeAMrsIGi525pft/L+dedjdeiWYmEoQVc9NElxwwNCldwRY6eNMw6IhKyjzLA==
dependencies:
"@react-native/codegen" "0.74.85"
"@react-native/codegen" "0.74.86"

"@react-native/babel-preset@0.74.85":
version "0.74.85"
resolved "https://registry.yarnpkg.com/@react-native/babel-preset/-/babel-preset-0.74.85.tgz#3ce6ca77a318dec226fd9e3fff9c2ef7b0aa66e3"
integrity sha512-yMHUlN8INbK5BBwiBuQMftdWkpm1IgCsoJTKcGD2OpSgZhwwm8RUSvGhdRMzB2w7bsqqBmaEMleGtW6aCR7B9w==
"@react-native/babel-preset@0.74.86":
version "0.74.86"
resolved "https://registry.yarnpkg.com/@react-native/babel-preset/-/babel-preset-0.74.86.tgz#8bb3fbd49ce11470eb8022dea2c1e51bfa8dedd4"
integrity sha512-6A+1NVAHugbBLFNU4iaYrq2lx8P7pINyqoyTtVAqd375PShRmLwu6GvuF3b/4avC97s6LmBljVTJ1xVHukA42g==
dependencies:
"@babel/core" "^7.20.0"
"@babel/plugin-proposal-async-generator-functions" "^7.0.0"
Expand Down Expand Up @@ -2101,7 +2101,7 @@
"@babel/plugin-transform-typescript" "^7.5.0"
"@babel/plugin-transform-unicode-regex" "^7.0.0"
"@babel/template" "^7.0.0"
"@react-native/babel-plugin-codegen" "0.74.85"
"@react-native/babel-plugin-codegen" "0.74.86"
babel-plugin-transform-flow-enums "^0.0.2"
react-refresh "^0.14.0"

Expand All @@ -2115,10 +2115,10 @@
jscodeshift "^0.14.0"
nullthrows "^1.1.1"

"@react-native/codegen@0.74.85":
version "0.74.85"
resolved "https://registry.yarnpkg.com/@react-native/codegen/-/codegen-0.74.85.tgz#568464071c0b9be741da1a1ab43b1df88180ca5d"
integrity sha512-N7QwoS4Hq/uQmoH83Ewedy6D0M7xbQsOU3OMcQf0eY3ltQ7S2hd9/R4UTalQWRn1OUJfXR6OG12QJ4FStKgV6Q==
"@react-native/codegen@0.74.86":
version "0.74.86"
resolved "https://registry.yarnpkg.com/@react-native/codegen/-/codegen-0.74.86.tgz#90933f5ee555ffb95ca27372ba1e836f698c3192"
integrity sha512-BOwABta9035GJ/zLMkxQfgPMr47u1/1HqNIMk10FqmTe0jmROOxKEAeP4FbeS5L1voO4ug3dqr+mcuHrG+HNhA==
dependencies:
"@babel/parser" "^7.20.0"
glob "^7.1.1"
Expand All @@ -2145,18 +2145,18 @@
node-fetch "^2.2.0"
readline "^1.3.0"

"@react-native/debugger-frontend@0.74.85":
version "0.74.85"
resolved "https://registry.yarnpkg.com/@react-native/debugger-frontend/-/debugger-frontend-0.74.85.tgz#a7af94a7b81cb59f241fd1771d1b083445329700"
integrity sha512-gUIhhpsYLUTYWlWw4vGztyHaX/kNlgVspSvKe2XaPA7o3jYKUoNLc3Ov7u70u/MBWfKdcEffWq44eSe3j3s5JQ==
"@react-native/debugger-frontend@0.74.86":
version "0.74.86"
resolved "https://registry.yarnpkg.com/@react-native/debugger-frontend/-/debugger-frontend-0.74.86.tgz#87a3c7dfb12ee6e981165e304bbbe20e9b1fa009"
integrity sha512-Spq1kFX4qvPmT4HuTwpi1ALFtojlJ6s4GpWU2OnpevC/z7ks36lhD3J0rd0D9U5bkxtTYLcg31fPv7nGFC7XZg==

"@react-native/dev-middleware@^0.74.0":
version "0.74.85"
resolved "https://registry.yarnpkg.com/@react-native/dev-middleware/-/dev-middleware-0.74.85.tgz#eca35aceb882b1111385f7c20f1aad7a33a2734e"
integrity sha512-BRmgCK5vnMmHaKRO+h8PKJmHHH3E6JFuerrcfE3wG2eZ1bcSr+QTu8DAlpxsDWvJvHpCi8tRJGauxd+Ssj/c7w==
version "0.74.86"
resolved "https://registry.yarnpkg.com/@react-native/dev-middleware/-/dev-middleware-0.74.86.tgz#b95f936c141dd44309a9ec558ed5ce034e270bc4"
integrity sha512-sc0tYxYt6dkUbNFI1IANzKO67M41BhjbJ6k/CHoFi/tGoNmHzg9IUZ89V4g3H8hn/VW9dETnPOFna1VO0sWrXg==
dependencies:
"@isaacs/ttlcache" "^1.4.1"
"@react-native/debugger-frontend" "0.74.85"
"@react-native/debugger-frontend" "0.74.86"
"@rnx-kit/chromium-edge-launcher" "^1.0.0"
chrome-launcher "^0.15.2"
connect "^3.6.5"
Expand All @@ -2180,12 +2180,12 @@
integrity sha512-DMpn5l1TVkIBFe9kE54pwOI2fQYbQNZ6cto0IuCUxQVUFJBcFMJ6Gbk8jhz8tvcWuDW3xVK9AWq9DJTkuchWsQ==

"@react-native/metro-babel-transformer@^0.74.0":
version "0.74.85"
resolved "https://registry.yarnpkg.com/@react-native/metro-babel-transformer/-/metro-babel-transformer-0.74.85.tgz#d530d9a6bd319ece226a2d6aaa00b464a1928089"
integrity sha512-JIrXqEwhTvWPtGArgMptIPGstMdXQIkwSjKVYt+7VC4a9Pw1GurIWanIJheEW6ZuCVvTc0VZkwglFz9JVjzDjA==
version "0.74.86"
resolved "https://registry.yarnpkg.com/@react-native/metro-babel-transformer/-/metro-babel-transformer-0.74.86.tgz#d67d3bf1699fcf834a70155635b30ae9f667b6dd"
integrity sha512-/9qN5zcnTHGDkC4jWibnoGmRnzDXiurl5wmkvspgnsdrJINN6eGpK8sdIn6nrHFOuPlp3Metqw3HkxbuAfNUXw==
dependencies:
"@babel/core" "^7.20.0"
"@react-native/babel-preset" "0.74.85"
"@react-native/babel-preset" "0.74.86"
hermes-parser "0.19.1"
nullthrows "^1.1.1"

Expand Down Expand Up @@ -2419,9 +2419,9 @@
integrity sha512-fAtCfv4jJg+ExtXhvCkCqUKZ+4ok/JQk01qDKhL5BDDoS3AxKXhV5/MAVUZyQnSEd2GT92fkgZl0pz0Q0AzcIQ==

"@types/node@^18.0.0":
version "18.19.42"
resolved "https://registry.yarnpkg.com/@types/node/-/node-18.19.42.tgz#b54ed4752c85427906aab40917b0f7f3d724bf72"
integrity sha512-d2ZFc/3lnK2YCYhos8iaNIYu9Vfhr92nHiyJHRltXWjXUBjEE+A4I58Tdbnw4VhggSW+2j5y5gTrLs4biNnubg==
version "18.19.43"
resolved "https://registry.yarnpkg.com/@types/node/-/node-18.19.43.tgz#fe01bb599b60bb3279c26d0fdb751d2f3e299ae0"
integrity sha512-Mw/YlgXnyJdEwLoFv2dpuJaDFriX+Pc+0qOBJ57jC1H6cDxIj2xc5yUrdtArDVG0m+KV6622a4p2tenEqB3C/g==
dependencies:
undici-types "~5.26.4"

Expand Down

0 comments on commit a916898

Please sign in to comment.