Skip to content

Commit

Permalink
chore: update 0.x tooling to match 1.x/main (#419)
Browse files Browse the repository at this point in the history
  • Loading branch information
boorad authored Sep 1, 2024
1 parent 2ccefbc commit 0e98b29
Show file tree
Hide file tree
Showing 87 changed files with 1,645 additions and 17,235 deletions.
49 changes: 20 additions & 29 deletions .github/workflows/build-android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,29 +8,33 @@ on:
- '.github/workflows/build-android.yml'
- 'android/**'
- 'example/android/**'
- 'yarn.lock'
- 'example/yarn.lock'
- 'bun.lockb'
- 'example/bun.lockb'
pull_request:
paths:
- '.github/workflows/build-android.yml'
- 'android/**'
- 'example/android/**'
- 'yarn.lock'
- 'example/yarn.lock'
- 'bun.lockb'
- 'example/bun.lockb'

jobs:
build_android_example:
name: Build Android Example App
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Checkout Code
uses: actions/checkout@v4

- name: Clear up some disk space
run: |
sudo rm -rf /usr/share/dotnet
sudo rm -rf /opt/ghc
sudo rm -rf "/usr/local/share/boost"
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: 1.1.26

- name: Setup JDK
uses: actions/setup-java@v4
Expand All @@ -41,28 +45,18 @@ jobs:

- name: Setup Android SDK
uses: android-actions/setup-android@v3

- uses: actions/setup-node@v4
with:
node-version: 20
- run: corepack enable
accept-android-sdk-licenses: true
log-accepted-android-sdk-licenses: false

- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
- name: Bootstrap JS (rnqc)
run: |
bun install
- name: Restore node_modules from cache
uses: actions/cache@v4
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install node_modules
run: yarn install --frozen-lockfile
- name: Install node_modules for example/
run: yarn install --frozen-lockfile --cwd example
- name: Bootstrap JS (example)
working-directory: example
run: |
bun install
- name: Restore Gradle cache
uses: actions/cache@v4
Expand All @@ -74,8 +68,5 @@ jobs:
restore-keys: |
${{ runner.os }}-gradle-
- name: Run Gradle Build for android/
run: cd android && ./gradlew assembleDebug && cd ..

- name: Run Gradle Build for example/android/
run: cd example/android && ./gradlew assembleDebug --build-cache && cd ../..
36 changes: 17 additions & 19 deletions .github/workflows/build-ios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,27 +22,19 @@ jobs:
runs-on: macOS-latest
defaults:
run:
working-directory: example/ios
working-directory: example
steps:
- uses: actions/checkout@v4
- name: Checkout Code
uses: actions/checkout@v4

- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
- name: Restore node_modules from cache
uses: actions/cache@v4
id: yarn-cache
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install node_modules for example/
run: yarn install --frozen-lockfile --cwd ..
bun-version: 1.1.26

# - name: Restore buildcache
# uses: mikehardy/buildcache-action@v2
# continue-on-error: true
- name: Bootstrap JS
run: |
bun install
- name: Setup Ruby (bundle)
uses: ruby/setup-ruby@v1
Expand All @@ -61,14 +53,20 @@ jobs:
key: ${{ runner.os }}-pods-${{ hashFiles('**/Podfile.lock') }}
restore-keys: |
${{ runner.os }}-pods-
- name: Install Gems
working-directory: example
working-directory: example/ios
run: bundle config set deployment 'true' && bundle install

- name: Install Pods
run: yarn pods
run: bun pods

- name: Install xcpretty
working-directory: example/ios
run: gem install xcpretty

- name: Build App
working-directory: example/ios
run: "set -o pipefail && xcodebuild \
CC=clang CPLUSPLUS=clang++ LD=clang LDPLUSPLUS=clang++ \
-derivedDataPath build -UseModernBuildSystem=YES \
Expand Down
68 changes: 0 additions & 68 deletions .github/workflows/release-publish.yml

This file was deleted.

55 changes: 22 additions & 33 deletions .github/workflows/validate-android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,19 @@ jobs:
validate_android:
name: Gradle Lint
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./android
steps:
- uses: actions/checkout@v4
- name: Checkout Code
uses: actions/checkout@v4

- name: Clear up some disk space
run: |
sudo rm -rf /usr/share/dotnet
sudo rm -rf /opt/ghc
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: 1.1.26

- name: Setup JDK
uses: actions/setup-java@v4
Expand All @@ -33,28 +41,18 @@ jobs:

- name: Setup Android SDK
uses: android-actions/setup-android@v3

- uses: actions/setup-node@v4
with:
node-version: 20
- run: corepack enable
accept-android-sdk-licenses: true
log-accepted-android-sdk-licenses: false

- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
- name: Bootstrap JS (rnqc)
run: |
bun install
- name: Restore node_modules from cache
uses: actions/cache@v4
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install node_modules
run: yarn install --frozen-lockfile --cwd ..
- name: Install node_modules for example/
run: yarn install --frozen-lockfile --cwd ../example
- name: Bootstrap JS (example)
working-directory: example
run: |
bun install
- name: Restore Gradle cache
uses: actions/cache@v4
Expand All @@ -67,19 +65,10 @@ jobs:
${{ runner.os }}-gradle-
- name: Run Gradle Lint
run: cd ../example/android && ./gradlew lint
run: cd example/android && ./gradlew lint

- name: Parse Gradle Lint Report
uses: yutailang0119/action-android-lint@v4
with:
# ignore-warnings: true
report-path: example/android/app/build/reports/*.xml
# ktlint:
# name: Kotlin Lint
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - name: Run KTLint
# uses: mrousavy/[email protected]
# with:
# github_token: ${{ secrets.github_token }}
9 changes: 6 additions & 3 deletions .github/workflows/validate-cpp.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Validate C++
name: 'Validate C++'

on:
push:
Expand All @@ -19,8 +19,11 @@ jobs:
name: C++ Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: reviewdog/action-cpplint@master
- name: Checkout Code
uses: actions/checkout@v4

- name: Run C++ Lint
uses: reviewdog/action-cpplint@master
with:
github_token: ${{ secrets.github_token }}
reporter: github-pr-review
Expand Down
Loading

0 comments on commit 0e98b29

Please sign in to comment.