forked from natario1/CameraView
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from natario1/main
Pull from latest main branch
- Loading branch information
Showing
429 changed files
with
32,196 additions
and
11,042 deletions.
There are no files selected for viewing
File renamed without changes.
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 @@ | ||
Contributing guidelines are [hosted here](https://natario1.github.io/CameraView/extra/contributing). |
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,12 @@ | ||
# These are supported funding model platforms | ||
|
||
github: [natario1] | ||
patreon: # Replace with a single Patreon username | ||
open_collective: cameraview | ||
ko_fi: # Replace with a single Ko-fi username | ||
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel | ||
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry | ||
liberapay: # Replace with a single Liberapay username | ||
issuehunt: # Replace with a single IssueHunt username | ||
otechie: # Replace with a single Otechie username | ||
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] |
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 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 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,10 +1,14 @@ | ||
### Before you go | ||
Unless this is a simple fix (typos, bugs with obvious solution), please open an issue first. | ||
If the edited files were covered by tests, updated tests are required for merging. Please look into the tests folders and make sure you cover new code. | ||
Unless this is a simple fix (typos, bugs with obvious solution), please open an issue first so that | ||
we can discuss the best approach to address the problem. Without a reference issue and discussion, | ||
unfortunately, this PR will likely be ignored. | ||
|
||
If the edited files were covered by tests, updated tests are required for merging. | ||
Please look into the tests folders and make sure you cover new code. | ||
|
||
- Fixes ... (*issue number*) | ||
- Tests: ... (*yes/no*) | ||
- Docs updated: ... (*yes/no*) | ||
|
||
### Solution | ||
If applicable, briefly describe how the issue was addressed. | ||
If applicable, describe briefly how the issue was addressed. |
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,119 @@ | ||
# https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions | ||
# Renaming ? Change the README badge. | ||
name: Build | ||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
jobs: | ||
ANDROID_BASE_CHECKS: | ||
name: Base Checks | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-java@v2 | ||
with: | ||
java-version: 11 | ||
distribution: temurin | ||
cache: gradle | ||
- name: Perform base checks | ||
run: ./gradlew demo:assembleDebug cameraview:publishToDirectory --stacktrace | ||
ANDROID_UNIT_TESTS: | ||
name: Unit Tests | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-java@v2 | ||
with: | ||
java-version: 11 | ||
distribution: temurin | ||
cache: gradle | ||
- name: Execute unit tests | ||
run: ./gradlew cameraview:runUnitTests --stacktrace | ||
- name: Upload unit tests artifact | ||
uses: actions/upload-artifact@v1 | ||
with: | ||
name: unit_tests | ||
path: ./cameraview/build/coverage_input/unit_tests | ||
ANDROID_EMULATOR_TESTS: | ||
name: Emulator Tests | ||
runs-on: macos-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
# TODO 29 fails due to Mockito issues, probably reproducible locally | ||
# 22-28 work (some of them, with SdkExclude restrictions) | ||
EMULATOR_API: [22, 23, 24, 25, 26, 27, 28] | ||
include: | ||
- EMULATOR_API: 28 | ||
EMULATOR_ARCH: x86_64 | ||
- EMULATOR_API: 27 | ||
EMULATOR_ARCH: x86_64 | ||
- EMULATOR_API: 26 | ||
EMULATOR_ARCH: x86_64 | ||
- EMULATOR_API: 25 | ||
EMULATOR_ARCH: x86 | ||
- EMULATOR_API: 24 | ||
EMULATOR_ARCH: x86 | ||
- EMULATOR_API: 23 | ||
EMULATOR_ARCH: x86 | ||
- EMULATOR_API: 22 | ||
EMULATOR_ARCH: x86 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-java@v2 | ||
with: | ||
java-version: 11 | ||
distribution: temurin | ||
cache: gradle | ||
- name: Execute emulator tests | ||
timeout-minutes: 30 | ||
uses: reactivecircus/[email protected] | ||
with: | ||
api-level: ${{ matrix.EMULATOR_API }} | ||
arch: ${{ matrix.EMULATOR_ARCH }} | ||
disable-animations: true | ||
profile: Nexus 5X | ||
emulator-options: -no-snapshot -no-window -no-boot-anim -camera-back emulated -camera-front emulated -gpu swiftshader_indirect | ||
script: ./.github/workflows/emulator_script.sh | ||
- name: Upload emulator tests artifact | ||
uses: actions/upload-artifact@v1 | ||
with: | ||
name: emulator_tests_${{ matrix.EMULATOR_API }} | ||
path: ./cameraview/build/coverage_input/android_tests | ||
CODE_COVERAGE: | ||
name: Code Coverage Report | ||
runs-on: ubuntu-latest | ||
needs: [ANDROID_UNIT_TESTS, ANDROID_EMULATOR_TESTS] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-java@v2 | ||
with: | ||
java-version: 11 | ||
distribution: temurin | ||
cache: gradle | ||
- name: Download unit tests artifact | ||
uses: actions/download-artifact@v1 | ||
with: | ||
name: unit_tests | ||
path: ./cameraview/build/coverage_input/unit_tests | ||
- name: Download emulator tests artifact | ||
uses: actions/download-artifact@v1 | ||
with: | ||
# 27 is the EMULATOR_API with less SdkExclude annotations, and should have | ||
# the best possible coverage. | ||
name: emulator_tests_27 | ||
path: ./cameraview/build/coverage_input/android_tests | ||
- name: Create merged coverage report | ||
run: ./gradlew cameraview:computeCoverage | ||
- name: Upload merged coverage report (GitHub) | ||
uses: actions/upload-artifact@v1 | ||
with: | ||
name: report | ||
path: ./cameraview/build/coverage_output/xml | ||
- name: Upload merged coverage report (Codecov) | ||
uses: codecov/codecov-action@v1 | ||
with: | ||
file: ./cameraview/build/coverage_output/xml/* | ||
fail_ci_if_error: 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions | ||
name: Deploy | ||
on: | ||
release: | ||
types: [published] | ||
jobs: | ||
MAVEN_UPLOAD: | ||
name: Maven Upload | ||
runs-on: ubuntu-latest | ||
env: | ||
SIGNING_KEY: ${{ secrets.SIGNING_KEY }} | ||
SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }} | ||
SONATYPE_USER: ${{ secrets.SONATYPE_USER }} | ||
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-java@v2 | ||
with: | ||
java-version: 11 | ||
distribution: temurin | ||
cache: gradle | ||
- name: Perform maven upload | ||
run: ./gradlew publishToSonatype |
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,14 @@ | ||
#!/usr/bin/env bash | ||
# Core | ||
ADB_TAGS="CameraView:I CameraCallbacks:I CameraOrchestrator:I CameraEngine:I" | ||
ADB_TAGS="$ADB_TAGS CameraUtils:I WorkerHandler:I" | ||
# Recorders | ||
ADB_TAGS="$ADB_TAGS VideoRecorder:I FullVideoRecorder:I SnapshotVideoRecorder:I" | ||
ADB_TAGS="$ADB_TAGS FullPictureRecorder:I SnapshotPictureRecorder:I DeviceEncoders:I" | ||
# Video encoders | ||
ADB_TAGS="$ADB_TAGS MediaEncoderEngine:I MediaEncoder:I AudioMediaEncoder:I VideoMediaEncoder:I TextureMediaEncoder:I" | ||
# Debugging | ||
ADB_TAGS="$ADB_TAGS CameraIntegrationTest:I MessageQueue:W MPEG4Writer:I" | ||
adb logcat -c | ||
adb logcat $ADB_TAGS *:E -v color & | ||
./gradlew cameraview:runAndroidTests |
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,25 @@ | ||
# https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions | ||
# Renaming ? Change the README badge. | ||
name: Snapshot | ||
on: | ||
push: | ||
branches: | ||
- main | ||
jobs: | ||
SNAPSHOT: | ||
name: Publish Snapshot | ||
runs-on: ubuntu-latest | ||
env: | ||
SIGNING_KEY: ${{ secrets.SIGNING_KEY }} | ||
SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }} | ||
SONATYPE_USER: ${{ secrets.SONATYPE_USER }} | ||
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-java@v2 | ||
with: | ||
java-version: 11 | ||
distribution: temurin | ||
cache: gradle | ||
- name: Publish sonatype snapshot | ||
run: ./gradlew publishToSonatypeSnapshot |
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,23 @@ | ||
<component name="ProjectRunConfigurationManager"> | ||
<configuration default="false" name="runAndroidTests" type="GradleRunConfiguration" factoryName="Gradle"> | ||
<ExternalSystemSettings> | ||
<option name="executionName" /> | ||
<option name="externalProjectPath" value="$PROJECT_DIR$/cameraview" /> | ||
<option name="externalSystemIdString" value="GRADLE" /> | ||
<option name="scriptParameters" value="" /> | ||
<option name="taskDescriptions"> | ||
<list /> | ||
</option> | ||
<option name="taskNames"> | ||
<list> | ||
<option value="runAndroidTests" /> | ||
</list> | ||
</option> | ||
<option name="vmOptions" value="" /> | ||
</ExternalSystemSettings> | ||
<ExternalSystemDebugServerProcess>false</ExternalSystemDebugServerProcess> | ||
<ExternalSystemReattachDebugProcess>true</ExternalSystemReattachDebugProcess> | ||
<DebugAllEnabled>false</DebugAllEnabled> | ||
<method v="2" /> | ||
</configuration> | ||
</component> |
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,23 @@ | ||
<component name="ProjectRunConfigurationManager"> | ||
<configuration default="false" name="runUnitTests" type="GradleRunConfiguration" factoryName="Gradle"> | ||
<ExternalSystemSettings> | ||
<option name="executionName" /> | ||
<option name="externalProjectPath" value="$PROJECT_DIR$/cameraview" /> | ||
<option name="externalSystemIdString" value="GRADLE" /> | ||
<option name="scriptParameters" value="" /> | ||
<option name="taskDescriptions"> | ||
<list /> | ||
</option> | ||
<option name="taskNames"> | ||
<list> | ||
<option value="runUnitTests" /> | ||
</list> | ||
</option> | ||
<option name="vmOptions" value="" /> | ||
</ExternalSystemSettings> | ||
<ExternalSystemDebugServerProcess>false</ExternalSystemDebugServerProcess> | ||
<ExternalSystemReattachDebugProcess>true</ExternalSystemReattachDebugProcess> | ||
<DebugAllEnabled>false</DebugAllEnabled> | ||
<method v="2" /> | ||
</configuration> | ||
</component> |
Oops, something went wrong.