fix: Fix CI for V3 (#1475)

* fix: Fix CI for "Build Android"

* update versions

* Update Gemfile.lock

* format swift

* fix: Fix swift lint

* Update .swiftlint.yml

* Use C++17 for lint

* fix: Fix C++ lints
This commit is contained in:
Marc Rousavy 2023-02-15 17:24:33 +01:00 committed by GitHub
parent 30b56153db
commit f0ea18115e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
12 changed files with 47 additions and 49 deletions

View File

@ -55,7 +55,5 @@ jobs:
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: | restore-keys: |
${{ runner.os }}-gradle- ${{ runner.os }}-gradle-
- name: Run Gradle Build for android/
run: cd android && ./gradlew assembleDebug --build-cache && cd ..
- name: Run Gradle Build for example/android/ - name: Run Gradle Build for example/android/
run: cd example/android && ./gradlew assembleDebug --build-cache && cd ../.. run: cd example/android && ./gradlew assembleDebug --build-cache && cd ../..

View File

@ -47,7 +47,7 @@ jobs:
- name: Setup Ruby (bundle) - name: Setup Ruby (bundle)
uses: ruby/setup-ruby@v1 uses: ruby/setup-ruby@v1
with: with:
ruby-version: 2.6 ruby-version: 2.6.8
bundler-cache: true bundler-cache: true
working-directory: example/ios working-directory: example/ios

View File

@ -10,7 +10,6 @@
#include <memory> #include <memory>
#include <string> #include <string>
#include <regex>
namespace vision { namespace vision {

View File

@ -90,7 +90,6 @@ jobject JSIJNIConversion::convertJSIValueToJNIObject(jsi::Runtime &runtime, cons
auto dynamic = jsi::dynamicFromValue(runtime, value); auto dynamic = jsi::dynamicFromValue(runtime, value);
auto map = react::ReadableNativeMap::createWithContents(std::move(dynamic)); auto map = react::ReadableNativeMap::createWithContents(std::move(dynamic));
return map.release(); return map.release();
} }
} else { } else {
// unknown jsi type! // unknown jsi type!
@ -98,7 +97,6 @@ jobject JSIJNIConversion::convertJSIValueToJNIObject(jsi::Runtime &runtime, cons
auto stringRepresentation = value.toString(runtime).utf8(runtime); auto stringRepresentation = value.toString(runtime).utf8(runtime);
auto message = "Received unknown JSI value! (" + stringRepresentation + ") Cannot convert to a JNI value."; auto message = "Received unknown JSI value! (" + stringRepresentation + ") Cannot convert to a JNI value.";
throw std::runtime_error(message); throw std::runtime_error(message);
} }
} }

View File

@ -41,4 +41,4 @@ void VisionCameraScheduler::registerNatives() {
}); });
} }
} // namespace vision } // namespace vision

View File

@ -24,7 +24,7 @@ using namespace facebook;
* 4. `trigger()` is a C++ function here that just calls the passed C++ Method from step 1. * 4. `trigger()` is a C++ function here that just calls the passed C++ Method from step 1.
*/ */
class VisionCameraScheduler : public jni::HybridClass<VisionCameraScheduler> { class VisionCameraScheduler : public jni::HybridClass<VisionCameraScheduler> {
public: public:
static auto constexpr kJavaDescriptor = "Lcom/mrousavy/camera/frameprocessor/VisionCameraScheduler;"; static auto constexpr kJavaDescriptor = "Lcom/mrousavy/camera/frameprocessor/VisionCameraScheduler;";
static jni::local_ref<jhybriddata> initHybrid(jni::alias_ref<jhybridobject> jThis); static jni::local_ref<jhybriddata> initHybrid(jni::alias_ref<jhybridobject> jThis);
static void registerNatives(); static void registerNatives();
@ -32,7 +32,7 @@ public:
// schedules the given job to be run on the VisionCamera FP Thread at some future point in time // schedules the given job to be run on the VisionCamera FP Thread at some future point in time
void dispatchAsync(std::function<void()> job); void dispatchAsync(std::function<void()> job);
private: private:
friend HybridBase; friend HybridBase;
jni::global_ref<VisionCameraScheduler::javaobject> javaPart_; jni::global_ref<VisionCameraScheduler::javaobject> javaPart_;
std::queue<std::function<void()>> _jobs; std::queue<std::function<void()>> _jobs;
@ -47,4 +47,4 @@ private:
void trigger(); void trigger();
}; };
} // namespace vision } // namespace vision

View File

@ -1,4 +1,4 @@
source "https://rubygems.org" source "https://rubygems.org"
gem 'cocoapods', '1.10.2' gem 'cocoapods', '1.11.3'
gem 'cocoapods-check' gem 'cocoapods-check'

View File

@ -1,24 +1,25 @@
GEM GEM
remote: https://rubygems.org/ remote: https://rubygems.org/
specs: specs:
CFPropertyList (3.0.4) CFPropertyList (3.0.6)
rexml rexml
activesupport (5.2.6) activesupport (6.1.7.2)
concurrent-ruby (~> 1.0, >= 1.0.2) concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 0.7, < 2) i18n (>= 1.6, < 2)
minitest (~> 5.1) minitest (>= 5.1)
tzinfo (~> 1.1) tzinfo (~> 2.0)
addressable (2.8.0) zeitwerk (~> 2.3)
public_suffix (>= 2.0.2, < 5.0) addressable (2.8.1)
public_suffix (>= 2.0.2, < 6.0)
algoliasearch (1.27.5) algoliasearch (1.27.5)
httpclient (~> 2.8, >= 2.8.3) httpclient (~> 2.8, >= 2.8.3)
json (>= 1.5.1) json (>= 1.5.1)
atomos (0.1.3) atomos (0.1.3)
claide (1.0.3) claide (1.1.0)
cocoapods (1.10.2) cocoapods (1.11.3)
addressable (~> 2.6) addressable (~> 2.8)
claide (>= 1.0.2, < 2.0) claide (>= 1.0.2, < 2.0)
cocoapods-core (= 1.10.2) cocoapods-core (= 1.11.3)
cocoapods-deintegrate (>= 1.0.3, < 2.0) cocoapods-deintegrate (>= 1.0.3, < 2.0)
cocoapods-downloader (>= 1.4.0, < 2.0) cocoapods-downloader (>= 1.4.0, < 2.0)
cocoapods-plugins (>= 1.0.0, < 2.0) cocoapods-plugins (>= 1.0.0, < 2.0)
@ -29,24 +30,24 @@ GEM
escape (~> 0.0.4) escape (~> 0.0.4)
fourflusher (>= 2.3.0, < 3.0) fourflusher (>= 2.3.0, < 3.0)
gh_inspector (~> 1.0) gh_inspector (~> 1.0)
molinillo (~> 0.6.6) molinillo (~> 0.8.0)
nap (~> 1.0) nap (~> 1.0)
ruby-macho (~> 1.4) ruby-macho (>= 1.0, < 3.0)
xcodeproj (>= 1.19.0, < 2.0) xcodeproj (>= 1.21.0, < 2.0)
cocoapods-check (1.1.0) cocoapods-check (1.1.0)
cocoapods (~> 1.0) cocoapods (~> 1.0)
cocoapods-core (1.10.2) cocoapods-core (1.11.3)
activesupport (> 5.0, < 6) activesupport (>= 5.0, < 7)
addressable (~> 2.6) addressable (~> 2.8)
algoliasearch (~> 1.0) algoliasearch (~> 1.0)
concurrent-ruby (~> 1.1) concurrent-ruby (~> 1.1)
fuzzy_match (~> 2.0.4) fuzzy_match (~> 2.0.4)
nap (~> 1.0) nap (~> 1.0)
netrc (~> 0.11) netrc (~> 0.11)
public_suffix public_suffix (~> 4.0)
typhoeus (~> 1.0) typhoeus (~> 1.0)
cocoapods-deintegrate (1.0.5) cocoapods-deintegrate (1.0.5)
cocoapods-downloader (1.5.1) cocoapods-downloader (1.6.3)
cocoapods-plugins (1.0.0) cocoapods-plugins (1.0.0)
nap nap
cocoapods-search (1.0.1) cocoapods-search (1.0.1)
@ -55,45 +56,45 @@ GEM
netrc (~> 0.11) netrc (~> 0.11)
cocoapods-try (1.2.0) cocoapods-try (1.2.0)
colored2 (3.1.2) colored2 (3.1.2)
concurrent-ruby (1.1.9) concurrent-ruby (1.2.0)
escape (0.0.4) escape (0.0.4)
ethon (0.14.0) ethon (0.16.0)
ffi (>= 1.15.0) ffi (>= 1.15.0)
ffi (1.15.4) ffi (1.15.5)
fourflusher (2.3.1) fourflusher (2.3.1)
fuzzy_match (2.0.4) fuzzy_match (2.0.4)
gh_inspector (1.1.3) gh_inspector (1.1.3)
httpclient (2.8.3) httpclient (2.8.3)
i18n (1.8.10) i18n (1.12.0)
concurrent-ruby (~> 1.0) concurrent-ruby (~> 1.0)
json (2.5.1) json (2.6.3)
minitest (5.14.4) minitest (5.17.0)
molinillo (0.6.6) molinillo (0.8.0)
nanaimo (0.3.0) nanaimo (0.3.0)
nap (1.1.0) nap (1.1.0)
netrc (0.11.0) netrc (0.11.0)
public_suffix (4.0.6) public_suffix (4.0.7)
rexml (3.2.5) rexml (3.2.5)
ruby-macho (1.4.0) ruby-macho (2.5.1)
thread_safe (0.3.6)
typhoeus (1.4.0) typhoeus (1.4.0)
ethon (>= 0.9.0) ethon (>= 0.9.0)
tzinfo (1.2.9) tzinfo (2.0.6)
thread_safe (~> 0.1) concurrent-ruby (~> 1.0)
xcodeproj (1.21.0) xcodeproj (1.22.0)
CFPropertyList (>= 2.3.3, < 4.0) CFPropertyList (>= 2.3.3, < 4.0)
atomos (~> 0.1.3) atomos (~> 0.1.3)
claide (>= 1.0.2, < 2.0) claide (>= 1.0.2, < 2.0)
colored2 (~> 3.1) colored2 (~> 3.1)
nanaimo (~> 0.3.0) nanaimo (~> 0.3.0)
rexml (~> 3.2.4) rexml (~> 3.2.4)
zeitwerk (2.6.7)
PLATFORMS PLATFORMS
ruby ruby
x86_64-darwin-19 x86_64-darwin-19
DEPENDENCIES DEPENDENCIES
cocoapods (= 1.10.2) cocoapods (= 1.11.3)
cocoapods-check cocoapods-check
BUNDLED WITH BUNDLED WITH

View File

@ -22,8 +22,6 @@ opt_in_rules:
- vertical_whitespace_opening_braces - vertical_whitespace_opening_braces
- vertical_whitespace_closing_braces - vertical_whitespace_closing_braces
- vertical_parameter_alignment_on_call - vertical_parameter_alignment_on_call
- unused_import
- unused_declaration
- untyped_error_in_catch - untyped_error_in_catch
- unowned_variable_capture - unowned_variable_capture
- unavailable_function - unavailable_function
@ -37,7 +35,10 @@ opt_in_rules:
- redundant_nil_coalescing - redundant_nil_coalescing
- attributes - attributes
- convenience_type - convenience_type
analyzer_rules:
- explicit_self - explicit_self
- unused_declaration
- unused_import
excluded: # paths to ignore during linting. Takes precedence over `included`. excluded: # paths to ignore during linting. Takes precedence over `included`.
- Pods - Pods

View File

@ -144,7 +144,8 @@ extension CameraView {
} else { } else {
ReactLogger.log(level: .error, message: "Cannot resume interrupted Audio Session!") ReactLogger.log(level: .error, message: "Cannot resume interrupted Audio Session!")
} }
@unknown default: () @unknown default:
()
} }
} }
} }

View File

@ -212,7 +212,7 @@ extension CameraView: AVCaptureVideoDataOutputSampleBufferDelegate, AVCaptureAud
if let frameProcessor = frameProcessorCallback, captureOutput is AVCaptureVideoDataOutput { if let frameProcessor = frameProcessorCallback, captureOutput is AVCaptureVideoDataOutput {
// Call the JavaScript Frame Processor func (worklet) // Call the JavaScript Frame Processor func (worklet)
let frame = Frame(buffer: sampleBuffer, orientation: self.bufferOrientation) let frame = Frame(buffer: sampleBuffer, orientation: bufferOrientation)
frameProcessor(frame) frameProcessor(frame)
} }
} }

View File

@ -34,7 +34,7 @@ final class CameraViewManager: RCTViewManager {
// Runs on JS Thread // Runs on JS Thread
runtimeManager = FrameProcessorRuntimeManager() runtimeManager = FrameProcessorRuntimeManager()
runtimeManager!.installFrameProcessorBindings() runtimeManager!.installFrameProcessorBindings()
return NSNumber(booleanLiteral: true) return true as NSNumber
} }
@objc @objc