Skip to content

Commit

Permalink
Fix GN examples workflow not saving the outputs (project-chip#1559)
Browse files Browse the repository at this point in the history
* Fix GN examples workflow not saving the outputs

* Change BUILD_TYPE for gn examples
  • Loading branch information
mspang authored and kedars committed Jul 19, 2020
1 parent a7fb045 commit b797ccd
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 16 deletions.
44 changes: 30 additions & 14 deletions .github/workflows/gn_examples.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
name: nRF

env:
BUILD_TYPE: nrf
BUILD_TYPE: gn_nrf
BUILD_VERSION: 0.2.14
BUILD_IMAGE: chip-build-nrf-platform
BUILD_ORG: connectedhomeip
Expand All @@ -33,18 +33,26 @@ jobs:
run: scripts/examples/gn_nrf_example.sh examples/lock-app/nrf5 out/lock_app_debug
- name: Build example nRF5 Lighting App
run: scripts/examples/gn_nrf_example.sh examples/lighting-app/nrf5 out/lighting_app_debug
- name: Preserve artifacts
run: |
mkdir -p example_binaries/nrf-build
cp out/lock_app_debug/chip-nrf52840-lock-example \
out/lighting_app_debug/chip-nrf52840-lighting-example \
example_binaries/nrf-build/
- name: Binary artifact suffix
id: outsuffix
uses: haya14busa/action-cond@v1.0.0
with:
cond: ${{ github.event.pull_request.number == '' }}
if_true: "${{ github.sha }}"
if_false: "pull-${{ github.event.pull_request.number }}"
- name: Uploading Binaries
uses: actions/upload-artifact@v2
with:
name: ${{ env.BUILD_TYPE }}-example-build-${{ steps.outsuffix.outputs.value }}
path: |
out/lock_app_debug/chip-nrf52840-lock-example
out/lighting_app_debug/chip-nrf52840-lighting-example
linux-standalone:
name: Linux Standalone

env:
BUILD_TYPE: linux
BUILD_TYPE: gn_linux
BUILD_VERSION: 0.2.14
BUILD_IMAGE: chip-build
BUILD_ORG: connectedhomeip
Expand All @@ -68,9 +76,17 @@ jobs:
run: scripts/examples/gn_build_example.sh examples/chip-tool out/chip_tool_debug
- name: Build example Standalone Shell
run: scripts/examples/gn_build_example.sh examples/shell out/shell_debug
- name: Preserve artifacts
run: |
mkdir -p example_binaries/$BUILD_TYPE
cp out/chip_tool_debug/bin/chip-standalone-demo \
out/shell_debug/bin/chip-shell \
example_binaries/$BUILD_TYPE/
- name: Binary artifact suffix
id: outsuffix
uses: haya14busa/action-cond@v1.0.0
with:
cond: ${{ github.event.pull_request.number == '' }}
if_true: "${{ github.sha }}"
if_false: "pull-${{ github.event.pull_request.number }}"
- name: Uploading Binaries
uses: actions/upload-artifact@v2
with:
name: ${{ env.BUILD_TYPE }}-example-build-${{ steps.outsuffix.outputs.value }}
path: |
out/chip_tool_debug/chip-standalone-demo
out/shell_debug/chip-shell
2 changes: 1 addition & 1 deletion examples/chip-tool/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ executable("chip-standalone-demo") {

public_deps = [ "${chip_root}/src/lib" ]

output_dir = "${root_out_dir}/bin"
output_dir = root_out_dir
}

group("chip-tool") {
Expand Down
2 changes: 1 addition & 1 deletion examples/shell/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ executable("chip-shell") {
defines = [ "BUILD_RELEASE=1" ]
}

output_dir = "${root_out_dir}/bin"
output_dir = root_out_dir
}

group("shell") {
Expand Down

0 comments on commit b797ccd

Please sign in to comment.