Skip to content

Commit

Permalink
Use compute engine to build coverage and app engine to publish the re…
Browse files Browse the repository at this point in the history
…sult (#24395)
  • Loading branch information
yufengwangca authored and pull[bot] committed Jun 23, 2023
1 parent 7074c5b commit 1971334
Show file tree
Hide file tree
Showing 5 changed files with 46 additions and 75 deletions.
36 changes: 36 additions & 0 deletions integrations/appengine/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
## Deploy Static Website on App Engine

### Setup google cloud integration

Follow https://cloud.google.com/sdk/docs/install.

### Build Coverage Report

To check out the Matter repository:

```
git clone --recurse-submodules git@github.com:project-chip/connectedhomeip.git
```

Run the following command to build coverage report:

```
cd connectedhomeip
./scripts/build_coverage.sh
```

After a successful build, the coverage report is located at
`out/coverage/coverage`

#### Upload your static website to Google App Engine

File `integrations/appengine/webapp_config.yaml` is used to configure the
settings of your App Engine application.

Directory `out/coverage/coverage` contains the coverage report files, such as
HTML, CSS, images, and JavaScript.

```
cd out/coverage/coverage
gcloud app deploy ../../../integrations/appengine/webapp_config.yaml
```
10 changes: 10 additions & 0 deletions integrations/appengine/webapp_config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
runtime: python27
api_version: 1
threadsafe: true
handlers:
- url: /
static_files: html/index.html
upload: html/index.html
- url: /(.*)
static_files: html/\1
upload: html/(.*)
18 changes: 0 additions & 18 deletions integrations/cloudbuild/build-coverage-remote.yaml

This file was deleted.

55 changes: 0 additions & 55 deletions integrations/cloudbuild/build-coverage.yaml

This file was deleted.

2 changes: 0 additions & 2 deletions scripts/build_coverage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -168,5 +168,3 @@ lcov --initial --capture --directory "$OUTPUT_ROOT/obj/src" --exclude="$PWD"/zzz
lcov --capture --directory "$OUTPUT_ROOT/obj/src" --exclude="$PWD"/zzz_generated/* --exclude="$PWD"/third_party/* --exclude=/usr/include/* --output-file "$COVERAGE_ROOT/lcov_test.info"
lcov --add-tracefile "$COVERAGE_ROOT/lcov_base.info" --add-tracefile "$COVERAGE_ROOT/lcov_test.info" --output-file "$COVERAGE_ROOT/lcov_final.info"
genhtml "$COVERAGE_ROOT/lcov_final.info" --output-directory "$COVERAGE_ROOT/html"

tar czvf "$COVERAGE_ROOT/coverage_html.tar.gz" -C "$COVERAGE_ROOT/html" .

0 comments on commit 1971334

Please sign in to comment.