-
Notifications
You must be signed in to change notification settings - Fork 9
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 #80 from adobe/staging
staging -> main for v3.0.0 release
- Loading branch information
Showing
109 changed files
with
1,345 additions
and
813 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 |
---|---|---|
@@ -1,98 +1,189 @@ | ||
version: 2.1 | ||
# | ||
# Copyright 2023 Adobe. All rights reserved. | ||
# This file is licensed to you under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. You may obtain a copy | ||
# of the License at http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software distributed under | ||
# the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS | ||
# OF ANY KIND, either express or implied. See the License for the specific language | ||
# governing permissions and limitations under the License. | ||
# | ||
|
||
version: 2.1 | ||
orbs: | ||
android: circleci/[email protected] | ||
# Use the circleci android orb version that supports OpenJDK17 required by AGP 8.2+ | ||
android: circleci/[email protected] | ||
codecov: codecov/[email protected] | ||
|
||
parameters: | ||
gradle-cache-prefix: | ||
type: string | ||
default: v1 | ||
build-cache-prefix: | ||
type: string | ||
default: v1 | ||
build-path: | ||
type: string | ||
default: "code/edgemedia/build" | ||
|
||
# Workflows orchestrate a set of jobs to be run; | ||
workflows: | ||
version: 2 | ||
build-test-deploy: | ||
jobs: | ||
- validate-code | ||
- build-and-unit-test: | ||
requires: | ||
- validate-code | ||
- functional-test: | ||
requires: | ||
- validate-code | ||
- build-test-app: | ||
requires: | ||
- validate-code | ||
filters: | ||
branches: | ||
only: | ||
- main | ||
- staging | ||
|
||
jobs: | ||
build-and-unit-test: | ||
validate-code: | ||
executor: | ||
name: android/android-machine | ||
resource-class: large | ||
tag: 2022.01.1 | ||
name: android/android-docker | ||
resource-class: medium | ||
tag: 2024.01.1 | ||
|
||
steps: | ||
- checkout | ||
|
||
- android/restore-gradle-cache: | ||
cache-prefix: << pipeline.parameters.gradle-cache-prefix >> | ||
|
||
- android/restore-build-cache: | ||
cache-prefix: << pipeline.parameters.build-cache-prefix >> | ||
|
||
- run: | ||
name: Check format | ||
name: Check Format | ||
command: make checkformat | ||
|
||
- run: | ||
name: Check style | ||
name: Check Style | ||
command: make checkstyle | ||
|
||
- android/save-gradle-cache: | ||
cache-prefix: << pipeline.parameters.gradle-cache-prefix >> | ||
|
||
- android/save-build-cache: | ||
cache-prefix: << pipeline.parameters.build-cache-prefix >> | ||
|
||
- store_artifacts: | ||
path: << pipeline.parameters.build-path >>/reports | ||
|
||
build-and-unit-test: | ||
executor: | ||
name: android/android-docker | ||
resource-class: medium | ||
tag: 2024.01.1 | ||
|
||
steps: | ||
- checkout | ||
|
||
- android/restore-gradle-cache: | ||
cache-prefix: << pipeline.parameters.gradle-cache-prefix >> | ||
|
||
- android/restore-build-cache: | ||
cache-prefix: << pipeline.parameters.build-cache-prefix >> | ||
|
||
- run: | ||
name: Assemble phone release | ||
command: make assemble-phone-release | ||
|
||
- run: | ||
name: JavaDoc | ||
name: Javadoc | ||
command: make javadoc | ||
|
||
- run: | ||
name: Download Codecov Uploader | ||
command: | | ||
curl -s https://codecov.io/bash > codecov; | ||
VERSION=$(grep 'VERSION=\"[0-9\.]*\"' codecov | cut -d'"' -f2); | ||
for i in 1 256 512 | ||
do | ||
shasum -a $i -c --ignore-missing <(curl -s "https://raw.githubusercontent.com/codecov/codecov-bash/${VERSION}/SHA${i}SUM") || | ||
shasum -a $i -c <(curl -s "https://raw.githubusercontent.com/codecov/codecov-bash/${VERSION}/SHA${i}SUM" | grep -w "codecov") | ||
done | ||
- store_artifacts: | ||
path: << pipeline.parameters.build-path >>/docs/javadoc | ||
|
||
- run: | ||
name: Run unit tests | ||
command: make unit-test-coverage | ||
name: Assemble Phone | ||
command: make assemble-phone | ||
|
||
- android/run-tests: | ||
test-command: make unit-test-coverage | ||
|
||
- android/save-gradle-cache: | ||
cache-prefix: << pipeline.parameters.gradle-cache-prefix >> | ||
|
||
- android/save-build-cache: | ||
cache-prefix: << pipeline.parameters.build-cache-prefix >> | ||
|
||
- store_artifacts: | ||
path: code/edgemedia/build/reports/tests | ||
path: << pipeline.parameters.build-path >>/reports/tests | ||
|
||
- store_test_results: | ||
path: code/edgemedia/build/test-results/testPhoneDebugUnitTest | ||
path: << pipeline.parameters.build-path >>/test-results/testPhoneDebugUnitTest | ||
|
||
- run: | ||
name: Upload unit test coverage | ||
command: | | ||
bash ./codecov -v -X s3 -c -D "./code/edgemedia/build/reports/coverage/test/phone/debug" -F unit-tests | ||
- codecov/upload: | ||
file: << pipeline.parameters.build-path >>/reports/coverage/test/phone/debug/report.xml | ||
flags: unit-tests | ||
|
||
functional-test: | ||
executor: | ||
name: android/android-machine | ||
resource-class: large | ||
tag: 2022.01.1 | ||
|
||
steps: | ||
- checkout | ||
|
||
- android/start-emulator-and-run-tests: | ||
system-image: system-images;android-29;default;x86 | ||
post-emulator-launch-assemble-command: make assemble-phone | ||
test-command: make functional-test-coverage | ||
|
||
- store_artifacts: | ||
path: code/edgemedia/build/reports/androidTests | ||
|
||
- store_test_results: | ||
path: code/edgemedia/build/outputs/androidTest-results | ||
|
||
- run: | ||
name: Download Codecov Uploader | ||
command: | | ||
curl -s https://codecov.io/bash > codecov; | ||
VERSION=$(grep 'VERSION=\"[0-9\.]*\"' codecov | cut -d'"' -f2); | ||
for i in 1 256 512 | ||
do | ||
shasum -a $i -c --ignore-missing <(curl -s "https://raw.githubusercontent.com/codecov/codecov-bash/${VERSION}/SHA${i}SUM") || | ||
shasum -a $i -c <(curl -s "https://raw.githubusercontent.com/codecov/codecov-bash/${VERSION}/SHA${i}SUM" | grep -w "codecov") | ||
done | ||
- run: | ||
name: Upload coverage report | ||
command: | | ||
bash ./codecov -v -X s3 -c -D "./code/edgemedia/build/reports/coverage/androidTest/phone/debug" -F functional-tests | ||
executor: | ||
name: android/android-machine | ||
resource-class: medium | ||
tag: 2024.01.1 | ||
|
||
workflows: | ||
version: 2 | ||
aepsdk-edgemedia-ci: | ||
jobs: | ||
- build-and-unit-test | ||
- functional-test | ||
steps: | ||
- checkout | ||
|
||
- android/restore-build-cache: | ||
cache-prefix: << pipeline.parameters.build-cache-prefix >> | ||
|
||
- run: | ||
name: List available emulator images | ||
command: sdkmanager --list | ||
|
||
- android/start-emulator-and-run-tests: | ||
# It should match the name seen in the "sdkmanager --list" output | ||
system-image: system-images;android-29;default;x86 | ||
# The command to be run, while waiting for emulator startup | ||
post-emulator-launch-assemble-command: make assemble-phone | ||
# The test command | ||
test-command: make functional-test-coverage | ||
restore-gradle-cache-prefix: << pipeline.parameters.gradle-cache-prefix >> | ||
|
||
- android/save-build-cache: | ||
cache-prefix: << pipeline.parameters.build-cache-prefix >> | ||
|
||
- codecov/upload: | ||
file: << pipeline.parameters.build-path >>/reports/coverage/androidTest/phone/debug/connected/report.xml | ||
flags: functional-tests | ||
|
||
- store_artifacts: | ||
path: << pipeline.parameters.build-path >>/reports/androidTests | ||
|
||
- store_test_results: | ||
path: << pipeline.parameters.build-path >>/outputs/androidTest-results | ||
|
||
build-test-app: | ||
executor: | ||
name: android/android-docker | ||
resource-class: medium | ||
tag: 2024.01.1 | ||
|
||
steps: | ||
- checkout | ||
|
||
- android/restore-gradle-cache: | ||
cache-prefix: << pipeline.parameters.gradle-cache-prefix >> | ||
|
||
- android/restore-build-cache: | ||
cache-prefix: << pipeline.parameters.build-cache-prefix >> | ||
|
||
- run: | ||
name: Assemble App | ||
command: make assemble-app | ||
|
||
- android/save-gradle-cache: | ||
cache-prefix: << pipeline.parameters.gradle-cache-prefix >> | ||
- android/save-build-cache: | ||
cache-prefix: << pipeline.parameters.build-cache-prefix >> |
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
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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# | ||
# Copyright 2024 Adobe. All rights reserved. | ||
# This file is licensed to you under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. You may obtain a copy | ||
# of the License at http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software distributed under | ||
# the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS | ||
# OF ANY KIND, either express or implied. See the License for the specific language | ||
# governing permissions and limitations under the License. | ||
# | ||
|
||
template: | | ||
## What’s Changed | ||
$CHANGES |
Oops, something went wrong.