-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Upgrade project structure and update native trackers to version 5 (close
- Loading branch information
1 parent
c151a65
commit f6b1b75
Showing
256 changed files
with
19,467 additions
and
44,830 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# EditorConfig helps developers define and maintain consistent | ||
# coding styles between different editors and IDEs | ||
# editorconfig.org | ||
|
||
root = true | ||
|
||
[*] | ||
|
||
indent_style = space | ||
indent_size = 2 | ||
|
||
end_of_line = lf | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
*.pbxproj -text | ||
*.pbxproj -text | ||
# specific for windows script files | ||
*.bat text eol=crlf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: Setup | ||
description: Setup Node.js and install dependencies | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- name: Setup Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version-file: .nvmrc | ||
|
||
- name: Cache dependencies | ||
id: yarn-cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: | | ||
**/node_modules | ||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}-${{ hashFiles('**/package.json') }} | ||
restore-keys: | | ||
${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | ||
${{ runner.os }}-yarn- | ||
- name: Install dependencies | ||
if: steps.yarn-cache.outputs.cache-hit != 'true' | ||
run: | | ||
yarn install --cwd example --frozen-lockfile | ||
yarn install --frozen-lockfile | ||
shell: bash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,108 +1,150 @@ | ||
name: build | ||
name: Build | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
tags: | ||
- '*.*.*' | ||
pull_request: | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-20.04 | ||
|
||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup Node | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: 16 | ||
- name: Setup | ||
uses: ./.github/actions/setup | ||
|
||
- name: Install node modules | ||
run: npm ci | ||
- name: Lint files | ||
run: yarn lint | ||
|
||
- name: Compile TypeScript | ||
run: npm run compile | ||
- name: Typecheck files | ||
run: yarn typecheck | ||
|
||
- name: Lint | ||
run: npm run lint | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Tests | ||
run: npm run test | ||
- name: Setup | ||
uses: ./.github/actions/setup | ||
|
||
build_android: | ||
needs: ["test"] | ||
runs-on: ubuntu-20.04 | ||
- name: Run unit tests | ||
run: yarn test --maxWorkers=2 --coverage | ||
|
||
build-library: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Validate Gradle Wrapper | ||
uses: gradle/wrapper-validation-action@v1 | ||
|
||
- name: Setup Node | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: 16 | ||
|
||
- name: Build tracker dist files | ||
run: | | ||
npm ci | ||
npm run build | ||
- name: Install node_modules in DemoApp | ||
working-directory: DemoApp | ||
run: | | ||
yarn install --frozen-lockfile --network-timeout 100000 | ||
- name: Lint DemoApp | ||
working-directory: DemoApp | ||
run: yarn lint | ||
|
||
- name: Build DemoApp | ||
working-directory: DemoApp/android | ||
run: | | ||
./gradlew assembleDebug | ||
build_ios: | ||
needs: ["test"] | ||
runs-on: macos-latest | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup | ||
uses: ./.github/actions/setup | ||
|
||
- name: Build package | ||
run: yarn prepack | ||
|
||
build-android: | ||
runs-on: ubuntu-latest | ||
env: | ||
TURBO_CACHE_DIR: .turbo/android | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup | ||
uses: ./.github/actions/setup | ||
|
||
- name: Cache turborepo for Android | ||
uses: actions/cache@v3 | ||
with: | ||
path: ${{ env.TURBO_CACHE_DIR }} | ||
key: ${{ runner.os }}-turborepo-android-${{ hashFiles('**/yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-turborepo-android- | ||
- name: Check turborepo cache for Android | ||
run: | | ||
TURBO_CACHE_STATUS=$(node -p "($(yarn --silent turbo run build:android --cache-dir="${{ env.TURBO_CACHE_DIR }}" --dry=json)).tasks.find(t => t.task === 'build:android').cache.status") | ||
if [[ $TURBO_CACHE_STATUS == "HIT" ]]; then | ||
echo "turbo_cache_hit=1" >> $GITHUB_ENV | ||
fi | ||
- name: Install JDK | ||
if: env.turbo_cache_hit != 1 | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: 'zulu' | ||
java-version: '11' | ||
|
||
- name: Finalize Android SDK | ||
if: env.turbo_cache_hit != 1 | ||
run: | | ||
/bin/bash -c "yes | $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --licenses > /dev/null" | ||
- name: Cache Gradle | ||
if: env.turbo_cache_hit != 1 | ||
uses: actions/cache@v3 | ||
with: | ||
path: | | ||
~/.gradle/wrapper | ||
~/.gradle/caches | ||
key: ${{ runner.os }}-gradle-${{ hashFiles('example/android/gradle/wrapper/gradle-wrapper.properties') }} | ||
restore-keys: | | ||
${{ runner.os }}-gradle- | ||
- name: Build example for Android | ||
run: | | ||
yarn turbo run build:android --cache-dir="${{ env.TURBO_CACHE_DIR }}" | ||
build-ios: | ||
runs-on: macos-latest | ||
env: | ||
TURBO_CACHE_DIR: .turbo/ios | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup Node | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: 16 | ||
|
||
- name: Build tracker dist files | ||
run: | | ||
npm ci | ||
npm run build | ||
- name: Install node_modules in DemoApp | ||
working-directory: DemoApp | ||
run: | | ||
yarn install --frozen-lockfile --network-timeout 100000 | ||
- name: Install Pods | ||
working-directory: DemoApp/ios | ||
run: | | ||
pod install | ||
- name: Build DemoApp | ||
working-directory: DemoApp/ios | ||
run: | | ||
xcodebuild \ | ||
-workspace DemoApp.xcworkspace \ | ||
-scheme DemoApp \ | ||
-sdk iphonesimulator \ | ||
-configuration Debug \ | ||
-destination 'platform=iOS Simulator,name=iPhone 12' \ | ||
-derivedDataPath ios/build -UseModernBuildSystem=YES \ | ||
clean build \ | ||
CODE_SIGNING_ALLOWED=NO | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup | ||
uses: ./.github/actions/setup | ||
|
||
- name: Cache turborepo for iOS | ||
uses: actions/cache@v3 | ||
with: | ||
path: ${{ env.TURBO_CACHE_DIR }} | ||
key: ${{ runner.os }}-turborepo-ios-${{ hashFiles('**/yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-turborepo-ios- | ||
- name: Check turborepo cache for iOS | ||
run: | | ||
TURBO_CACHE_STATUS=$(node -p "($(yarn --silent turbo run build:ios --cache-dir="${{ env.TURBO_CACHE_DIR }}" --dry=json)).tasks.find(t => t.task === 'build:ios').cache.status") | ||
if [[ $TURBO_CACHE_STATUS == "HIT" ]]; then | ||
echo "turbo_cache_hit=1" >> $GITHUB_ENV | ||
fi | ||
- name: Cache cocoapods | ||
if: env.turbo_cache_hit != 1 | ||
id: cocoapods-cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: | | ||
**/ios/Pods | ||
key: ${{ runner.os }}-cocoapods-${{ hashFiles('example/ios/Podfile.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-cocoapods- | ||
- name: Install cocoapods | ||
if: env.turbo_cache_hit != 1 && steps.cocoapods-cache.outputs.cache-hit != 'true' | ||
run: | | ||
yarn example pods | ||
env: | ||
NO_FLIPPER: 1 | ||
|
||
- name: Build example for iOS | ||
run: | | ||
yarn turbo run build:ios --cache-dir="${{ env.TURBO_CACHE_DIR }}" |
Oops, something went wrong.