Skip to content

Commit

Permalink
Fix builds and linting (#567)
Browse files Browse the repository at this point in the history
* Update build.yml
* macos/linux specific bootstrapping
* Linux doesn't need ruby
* Avoid double-run of workflows
  • Loading branch information
scarlac authored Jul 27, 2023
1 parent bd21134 commit 5f6d94a
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 13 deletions.
15 changes: 7 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
name: Build
on: [push, pull_request]
on:
pull_request:
types: [opened, reopened]
push:
jobs:
build-example-ios:
name: build-example-ios
Expand All @@ -14,24 +17,20 @@ jobs:
- name: Install modules
run: yarn
- name: Install example
run: yarn bootstrap
run: yarn bootstrap-macos
- name: Build
run: cd example/ios && xcodebuild -workspace CameraKitExample.xcworkspace -configuration Debug -scheme CameraKitExample -sdk iphoneos build CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO
build-example-android:
name: build-example-android
runs-on: ubuntu-latest
runs-on: ubuntu-latest # using linux runner for speed
steps:
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '2.7.4'
- name: Checkout
uses: actions/checkout@v3
- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v1
- name: Install modules
run: yarn
- name: Install example
run: yarn bootstrap
run: yarn bootstrap-linux
- name: Build
run: cd example/android && ./gradlew assembleDebug
11 changes: 7 additions & 4 deletions .github/workflows/linter.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
name: Linter
on: [push, pull_request]
on:
pull_request:
types: [opened, reopened]
push:
jobs:
eslint:
name: ESLint
runs-on: ubuntu-latest
runs-on: ubuntu-latest # using linux runner for speed
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Install modules
run: yarn
- name: Install example
run: yarn bootstrap
run: yarn bootstrap-linux
- name: Lint
run: yarn lint
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
"release:beta": "yarn clean && yarn build && yarn publish --tag beta --verbose",
"release:local": "yarn clean && yarn build && tmp=$(mktemp) && yarn pack --filename $tmp.tar.gz && open -R $tmp.tar.gz",
"start": "watchman watch-del-all && node node_modules/react-native/local-cli/cli.js start",
"bootstrap": "cd example/ && bundle install && yarn && cd ios/ && bundle exec pod install"
"bootstrap-macos": "cd example/ && bundle install && yarn && cd ios/ && bundle exec pod install",
"bootstrap-linux": "cd example/ && yarn"
},
"main": "dist/index.js",
"module": "dist/index.js",
Expand Down

0 comments on commit 5f6d94a

Please sign in to comment.