Skip to content

Commit

Permalink
Merge branch 'main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
passy authored Jul 19, 2024
2 parents 7356b83 + 5840e87 commit 58eba93
Show file tree
Hide file tree
Showing 394 changed files with 7,260 additions and 9,592 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/build-and-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: facebook/flipper/build-and-deploy
on:
push:
branches:
- main
env:
ANDROID_PUBLISH_KEY: ${{ secrets.ANDROID_PUBLISH_KEY }}
jobs:
snapshot:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Dependencies
run: |
sudo apt-get update
sudo apt-get install -y sdkmanager
- name: Install JDK
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
cache: gradle
- name: Install Retry
run: scripts/install-retry.sh
- name: Build
run: |
yes | sdkmanager "platforms;android-33" || true
/tmp/retry -m 3 ./gradlew :android:assembleRelease --info
- name: Deploy Snapshot
run: "/tmp/retry -m 3 scripts/publish-android-snapshot.sh"
20 changes: 0 additions & 20 deletions .github/workflows/nodejs-doctor.yml

This file was deleted.

240 changes: 125 additions & 115 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
branches:
- main
paths:
- 'desktop/package.json'
- "desktop/package.json"

jobs:
release:
Expand All @@ -29,7 +29,7 @@ jobs:
with:
token: ${{ secrets.GITHUB_TOKEN }}
ref: ${{ steps.extract-version-commit.outputs.commit }}
version_tag_prefix: 'v'
version_tag_prefix: "v"
version_assertion_command: 'grep -q "\"version\": \"$version\"" desktop/package.json'
- name: Create release
if: ${{ steps.tag-version-commit.outputs.tag != '' }}
Expand All @@ -53,32 +53,42 @@ jobs:
desktop-directory: ./desktop

steps:
- uses: actions/checkout@v3.5.3
with:
ref: ${{ needs.release.outputs.tag }}
- uses: actions/setup-node@v3.6.0
with:
node-version: '18.x'
- name: Install
uses: nick-invision/retry@v2.0.0
with:
timeout_minutes: 10
max_attempts: 3
command: cd ${{env.desktop-directory}} && yarn
- name: Build
run: cd ${{env.desktop-directory}} && yarn build:flipper-server --mac --dmg
- name: List dist artifacts
run: ls -l dist/
- name: Upload x86-64
uses: actions/upload-artifact@v3.1.2
with:
name: 'Flipper-server-mac-x64.dmg'
path: 'dist/Flipper-server-mac-x64.dmg'
- name: Upload aarch64
uses: actions/upload-artifact@v3.1.2
with:
name: 'Flipper-server-mac-aarch64.dmg'
path: 'dist/Flipper-server-mac-aarch64.dmg'
- uses: actions/checkout@v3.5.3
with:
ref: ${{ needs.release.outputs.tag }}
- uses: actions/setup-node@v3.6.0
with:
node-version: "18.x"
- name: Install
uses: nick-invision/retry@v2.0.0
with:
timeout_minutes: 10
max_attempts: 3
command: cd ${{env.desktop-directory}} && yarn
- name: Build
run: cd ${{env.desktop-directory}} && yarn build:flipper-server --mac --dmg --linux --win --tar
- name: List dist artifacts
run: ls -l dist/
- name: Upload Mac x86-64
uses: actions/upload-artifact@v3.1.2
with:
name: "Flipper-server-mac-x64.dmg"
path: "dist/Flipper-server-mac-x64.dmg"
- name: Upload Mac aarch64
uses: actions/upload-artifact@v3.1.2
with:
name: "Flipper-server-mac-aarch64.dmg"
path: "dist/Flipper-server-mac-aarch64.dmg"
- name: Upload Linux x64
uses: actions/upload-artifact@v3.1.2
with:
name: "flipper-server-linux.tar.gz"
path: "dist/flipper-server-linux.tar.gz"
- name: Upload Windows x64
uses: actions/upload-artifact@v3.1.2
with:
name: "flipper-server-windows.tar.gz"
path: "dist/flipper-server-windows.tar.gz"

build-flipper-server:
needs:
Expand All @@ -88,27 +98,27 @@ jobs:
desktop-directory: ./desktop

steps:
- uses: actions/checkout@v3.5.3
with:
ref: ${{ needs.release.outputs.tag }}
- uses: actions/setup-node@v3.6.0
with:
node-version: '18.x'
- name: Install
uses: nick-invision/retry@v2.0.0
with:
timeout_minutes: 10
max_attempts: 3
command: cd ${{env.desktop-directory}} && yarn
- name: Build
run: cd ${{env.desktop-directory}} && yarn build:flipper-server
- name: List dist artifacts
run: ls -l dist/
- name: Upload flipper-server
uses: actions/upload-artifact@v3.1.2
with:
name: 'flipper-server.tgz'
path: 'dist/flipper-server.tgz'
- uses: actions/checkout@v3.5.3
with:
ref: ${{ needs.release.outputs.tag }}
- uses: actions/setup-node@v3.6.0
with:
node-version: "18.x"
- name: Install
uses: nick-invision/retry@v2.0.0
with:
timeout_minutes: 10
max_attempts: 3
command: cd ${{env.desktop-directory}} && yarn
- name: Build
run: cd ${{env.desktop-directory}} && yarn build:flipper-server
- name: List dist artifacts
run: ls -l dist/
- name: Upload flipper-server
uses: actions/upload-artifact@v3.1.2
with:
name: "flipper-server.tgz"
path: "dist/flipper-server.tgz"

publish:
needs:
Expand All @@ -118,76 +128,76 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3.5.3
with:
ref: ${{ needs.release.outputs.tag }}
- name: Download Flipper Server x86-64
if: ${{ needs.release.outputs.tag != '' }}
uses: actions/download-artifact@v1
with:
name: 'Flipper-server-mac-x64.dmg'
path: 'Flipper-server-mac-x64.dmg'
- name: Download Flipper Server aarch64
if: ${{ needs.release.outputs.tag != '' }}
uses: actions/download-artifact@v1
with:
name: 'Flipper-server-mac-aarch64.dmg'
path: 'Flipper-server-mac-aarch64.dmg'
- name: Download Flipper Server
if: ${{ needs.release.outputs.tag != '' }}
uses: actions/download-artifact@v1
with:
name: 'flipper-server.tgz'
path: 'flipper-server.tgz'
- name: GitHub Upload Release Artifacts
if: ${{ needs.release.outputs.tag != '' }}
uses: aigoncharov/github-upload-release-artifacts-action@2.2.3
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
created_tag: ${{ needs.release.outputs.tag }}
args: flipper-server.tgz/flipper-server.tgz Flipper-server-mac-x64.dmg/Flipper-server-mac-x64.dmg Flipper-server-mac-aarch64.dmg/Flipper-server-mac-aarch64.dmg
- name: Set up npm token
run: echo "//registry.yarnpkg.com/:_authToken=${{ secrets.FLIPPER_NPM_TOKEN }}" >> ~/.npmrc
- name: Publish flipper-server on NPM
if: ${{ needs.release.outputs.tag != '' }}
run: |
tar zxvf flipper-server.tgz/flipper-server.tgz
cd package
yarn publish
- name: Open issue on failure
if: failure()
uses: JasonEtco/create-an-issue@v2.9.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
REPOSITORY: ${{ github.repository }}
RUN_ID: ${{ github.run_id }}
WORKFLOW_NAME: "Publish"
with:
filename: .github/action-failure-template.md
- uses: actions/checkout@v3.5.3
with:
ref: ${{ needs.release.outputs.tag }}
- name: Download Flipper Server x86-64
if: ${{ needs.release.outputs.tag != '' }}
uses: actions/download-artifact@v1
with:
name: "Flipper-server-mac-x64.dmg"
path: "Flipper-server-mac-x64.dmg"
- name: Download Flipper Server aarch64
if: ${{ needs.release.outputs.tag != '' }}
uses: actions/download-artifact@v1
with:
name: "Flipper-server-mac-aarch64.dmg"
path: "Flipper-server-mac-aarch64.dmg"
- name: Download Flipper Server
if: ${{ needs.release.outputs.tag != '' }}
uses: actions/download-artifact@v1
with:
name: "flipper-server.tgz"
path: "flipper-server.tgz"
- name: GitHub Upload Release Artifacts
if: ${{ needs.release.outputs.tag != '' }}
uses: aigoncharov/github-upload-release-artifacts-action@2.2.3
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
created_tag: ${{ needs.release.outputs.tag }}
args: flipper-server.tgz/flipper-server.tgz Flipper-server-mac-x64.dmg/Flipper-server-mac-x64.dmg Flipper-server-mac-aarch64.dmg/Flipper-server-mac-aarch64.dmg
- name: Set up npm token
run: echo "//registry.yarnpkg.com/:_authToken=${{ secrets.FLIPPER_NPM_TOKEN }}" >> ~/.npmrc
- name: Publish flipper-server on NPM
if: ${{ needs.release.outputs.tag != '' }}
run: |
tar zxvf flipper-server.tgz/flipper-server.tgz
cd package
yarn publish
- name: Open issue on failure
if: failure()
uses: JasonEtco/create-an-issue@v2.9.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
REPOSITORY: ${{ github.repository }}
RUN_ID: ${{ github.run_id }}
WORKFLOW_NAME: "Publish"
with:
filename: .github/action-failure-template.md

dispatch:
needs:
- release
runs-on: ubuntu-latest

steps:
- name: Publish Workflow Dispatch
if: ${{ needs.release.outputs.tag != '' }}
uses: benc-uk/workflow-dispatch@v1.2.2
with:
workflow: Publish Pods
ref: ${{ needs.release.outputs.tag }}
- name: Publish NPM
if: ${{ needs.release.outputs.tag != '' }}
uses: benc-uk/workflow-dispatch@v1.2.2
with:
workflow: Publish NPM
ref: ${{ needs.release.outputs.tag }}
- name: Publish Android
if: ${{ needs.release.outputs.tag != '' }}
uses: benc-uk/workflow-dispatch@v1.2.2
with:
workflow: Publish Android
ref: ${{ needs.release.outputs.tag }}
inputs: '{"tag": "${{ needs.release.outputs.tag }}"}'
- name: Publish Workflow Dispatch
if: ${{ needs.release.outputs.tag != '' }}
uses: benc-uk/workflow-dispatch@v1.2.2
with:
workflow: Publish Pods
ref: ${{ needs.release.outputs.tag }}
- name: Publish NPM
if: ${{ needs.release.outputs.tag != '' }}
uses: benc-uk/workflow-dispatch@v1.2.2
with:
workflow: Publish NPM
ref: ${{ needs.release.outputs.tag }}
- name: Publish Android
if: ${{ needs.release.outputs.tag != '' }}
uses: benc-uk/workflow-dispatch@v1.2.2
with:
workflow: Publish Android
ref: ${{ needs.release.outputs.tag }}
inputs: '{"tag": "${{ needs.release.outputs.tag }}"}'
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
}
],
"[typescriptreact]": {
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[typescript]": {
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
Expand Down
2 changes: 1 addition & 1 deletion Flipper.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.

flipperkit_version = '0.233.0'
flipperkit_version = '0.250.0'
Pod::Spec.new do |spec|
spec.name = 'Flipper'
spec.cocoapods_version = '>= 1.10'
Expand Down
4 changes: 3 additions & 1 deletion FlipperKit.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# LICENSE file in the root directory of this source tree.

folly_compiler_flags = '-DDEBUG=1 -DFLIPPER_OSS=1 -DFB_SONARKIT_ENABLED=1 -DFOLLY_HAVE_BACKTRACE=1 -DFOLLY_HAVE_CLOCK_GETTIME=1 -DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -DFOLLY_HAVE_LIBGFLAGS=0 -DFOLLY_HAVE_LIBJEMALLOC=0 -DFOLLY_HAVE_PREADV=0 -DFOLLY_HAVE_PWRITEV=0 -DFOLLY_HAVE_TFO=0 -DFOLLY_USE_SYMBOLIZER=0'
flipperkit_version = '0.233.0'
flipperkit_version = '0.250.0'
Pod::Spec.new do |spec|
spec.name = 'FlipperKit'
spec.version = flipperkit_version
Expand All @@ -18,6 +18,7 @@ Pod::Spec.new do |spec|
spec.module_name = 'FlipperKit'
spec.platforms = { :ios => "11.0" }
spec.default_subspecs = "Core"
spec.frameworks = 'AVFoundation'

# This subspec is necessary since FBDefines.h is imported as <FBDefines/FBDefines.h>
# inside SKMacros.h, which is a public header file. Defining this directory as a
Expand Down Expand Up @@ -77,6 +78,7 @@ Pod::Spec.new do |spec|
ss.dependency 'FlipperKit/FKPortForwarding'
ss.dependency 'Flipper', '~>'+flipperkit_version
ss.dependency 'SocketRocket', '~> 0.7.0'
ss.dependency 'SSZipArchive', '~> 2.4.3'
ss.compiler_flags = folly_compiler_flags
ss.source_files = 'iOS/FlipperKit/*.{h,m,mm}', 'iOS/FlipperKit/CppBridge/*.{h,mm}'
ss.public_header_files = 'iOS/FlipperKit/**/{FlipperDiagnosticsViewController,FlipperStateUpdateListener,FlipperClient,FlipperPlugin,FlipperConnection,FlipperResponder,SKMacros,FlipperKitCertificateProvider}.h'
Expand Down
Loading

0 comments on commit 58eba93

Please sign in to comment.