From 303ff9aad1156ae4e36dede92b79c396fcbb4ad5 Mon Sep 17 00:00:00 2001 From: Aaron Roller Date: Wed, 29 Apr 2020 09:06:09 -0700 Subject: [PATCH 01/14] ci: nightly needs v3-perception master --- .github/workflows/nightly.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 8720fdff..8f5c1e34 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -9,7 +9,7 @@ jobs: - uses: actions/checkout@v1 - name: Package id: package - uses: AutoModality/action-package-debian-ros@v3.0.0 + uses: AutoModality/action-package-debian-ros@v3-perception with: release-repo-entitlement: ${{ secrets.CLOUDSMITH_READ_RELEASE_ENTITLEMENT }} From f45a4501bc2c4e61cfc0ee0b119abe84ff62c35e Mon Sep 17 00:00:00 2001 From: Aaron Roller Date: Wed, 29 Apr 2020 09:06:54 -0700 Subject: [PATCH 02/14] ci: added comment where to find secret master --- .github/workflows/pr-updater.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/pr-updater.yml b/.github/workflows/pr-updater.yml index bcaf9ce5..6526a166 100644 --- a/.github/workflows/pr-updater.yml +++ b/.github/workflows/pr-updater.yml @@ -13,5 +13,6 @@ jobs: - name: update all pull requests uses: maxkomarychev/pr-updater-action@v1.0.0 with: + # see RPass - amgitbot token: ${{ secrets.PR_UPDATER_TOKEN }} From 556662ff21e1d8337e028e42bbccd5b42c072452 Mon Sep 17 00:00:00 2001 From: Aaron Roller Date: Wed, 6 May 2020 06:59:06 -0700 Subject: [PATCH 03/14] ci: using flops self hosted AM-281/self-hosted-x64 --- .github/workflows/package.yml | 2 +- .github/workflows/release.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/package.yml b/.github/workflows/package.yml index cd3846c8..76819a27 100644 --- a/.github/workflows/package.yml +++ b/.github/workflows/package.yml @@ -8,7 +8,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ubuntu-18.04, [self-hosted,linux,arm64]] + os: [[x64, self-hosted,linux], [arm64,self-hosted,linux]] fail-fast: false steps: - uses: AutoModality/action-clean@v1.1.0 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 58322b1c..2ebaaef4 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -39,7 +39,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ubuntu-18.04, [self-hosted,linux,arm64]] + os: [[x64, self-hosted,linux], [arm64,self-hosted,linux]] fail-fast: true needs: release name: Package if released From 4acb0f1e045e4d319d9d154fd8eafdd81a120f94 Mon Sep 17 00:00:00 2001 From: Aaron Roller Date: Wed, 6 May 2020 07:14:49 -0700 Subject: [PATCH 04/14] No more story AM-285 AM-281/self-hosted-x64 --- .github/workflows/package.yml | 4 ++-- .github/workflows/story.yml | 28 ---------------------------- 2 files changed, 2 insertions(+), 30 deletions(-) delete mode 100644 .github/workflows/story.yml diff --git a/.github/workflows/package.yml b/.github/workflows/package.yml index 76819a27..9c53d99f 100644 --- a/.github/workflows/package.yml +++ b/.github/workflows/package.yml @@ -1,7 +1,7 @@ name: Release Candidate on: - pull_request: - branches: + push: + branches-ignore: - master jobs: package: diff --git a/.github/workflows/story.yml b/.github/workflows/story.yml deleted file mode 100644 index 074267b6..00000000 --- a/.github/workflows/story.yml +++ /dev/null @@ -1,28 +0,0 @@ -name: Story Development - -on: - push: - branches-ignore: - - master -jobs: - build: - runs-on: ubuntu-18.04 - steps: - - uses: actions/checkout@v2 - - name: Package - id: package - uses: AutoModality/action-package-debian-ros@v3-perception - with: - dev-repo-entitlement: ${{ secrets.CLOUDSMITH_READ_DEV_ENTITLEMENT }} - release-repo-entitlement: ${{ secrets.CLOUDSMITH_READ_RELEASE_ENTITLEMENT }} - code-format: - runs-on: ubuntu-18.04 - needs: build - steps: - - uses: actions/checkout@v2 - - name: Format Code - uses: AutoModality/action-ros-clang-format@master - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - From 327b1f6838ac7097be3f7da3621894869348613c Mon Sep 17 00:00:00 2001 From: Aaron Roller Date: Wed, 6 May 2020 07:15:48 -0700 Subject: [PATCH 05/14] Format code in master for speed AM-252 AM-281/self-hosted-x64 --- .github/workflows/release.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2ebaaef4..0e0f0ec4 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -4,6 +4,14 @@ on: branches: - master jobs: + code-format: + runs-on: ubuntu-18.04 + steps: + - uses: actions/checkout@v2 + - name: Format Code + uses: AutoModality/action-ros-clang-format@master + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} release: runs-on: ubuntu-18.04 steps: From 838ffcc509ee54d5fe1575c0223f206a01b46473 Mon Sep 17 00:00:00 2001 From: Aaron Roller Date: Wed, 6 May 2020 07:18:03 -0700 Subject: [PATCH 06/14] forcing code format AM-252 AM-281/self-hosted-x64 --- include/super_lib/am_life_cycle_types.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/include/super_lib/am_life_cycle_types.h b/include/super_lib/am_life_cycle_types.h index 7e9742a3..0a817907 100644 --- a/include/super_lib/am_life_cycle_types.h +++ b/include/super_lib/am_life_cycle_types.h @@ -30,8 +30,7 @@ enum class LifeCycleState : std::uint8_t * status of the functionality of the node (i.e. is it operating to spec) */ enum class LifeCycleStatus : std::uint8_t -{ - OK = brain_box_msgs::LifeCycleState::STATUS_OK, +{OK = brain_box_msgs::LifeCycleState::STATUS_OK, WARN = brain_box_msgs::LifeCycleState::STATUS_WARN, ERROR = brain_box_msgs::LifeCycleState::STATUS_ERROR, LAST_STATUS = brain_box_msgs::LifeCycleState::STATUS_LAST From 1ec7a88fe565c65bef7c11ef437f06ec5e849459 Mon Sep 17 00:00:00 2001 From: Aaron Roller Date: Wed, 6 May 2020 07:19:50 -0700 Subject: [PATCH 07/14] Automtically draft pull request AM-292 AM-281/self-hosted-x64 --- .github/workflows/package.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/package.yml b/.github/workflows/package.yml index 9c53d99f..37433cf2 100644 --- a/.github/workflows/package.yml +++ b/.github/workflows/package.yml @@ -34,3 +34,8 @@ jobs: distro: 'ubuntu' release: 'bionic' file: '${{ steps.package.outputs.artifact-path }}' + - name: Draft a Pull Request + uses: repo-sync/pull-request@v2 + with: + pr_draft: true + github_token: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file From dc0fc37d123eec0fdae715585056fe7bd8d70fd1 Mon Sep 17 00:00:00 2001 From: Aaron Roller Date: Wed, 6 May 2020 07:34:05 -0700 Subject: [PATCH 08/14] another format trigger AM-252 AM-281/self-hosted-x64 --- include/super_lib/am_life_cycle.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/super_lib/am_life_cycle.h b/include/super_lib/am_life_cycle.h index 4d5d8a1f..9c5998b4 100644 --- a/include/super_lib/am_life_cycle.h +++ b/include/super_lib/am_life_cycle.h @@ -123,7 +123,7 @@ class AMLifeCycle * @brief Function to be defined by the user. * Called at the end of transition from FINALIZED to power off. */ - virtual void destroy(); + virtual void destroy(); virtual void onDestroy(); void doDestroy(bool success); From 7228b0a9d1b3a1c207ddd3aeba38999272acd05b Mon Sep 17 00:00:00 2001 From: Aaron Roller Date: Wed, 6 May 2020 07:51:23 -0700 Subject: [PATCH 09/14] another format trigger AM-252 AM-281/self-hosted-x64 --- include/super_lib/am_life_cycle.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/super_lib/am_life_cycle.h b/include/super_lib/am_life_cycle.h index 9c5998b4..ae6edb42 100644 --- a/include/super_lib/am_life_cycle.h +++ b/include/super_lib/am_life_cycle.h @@ -124,7 +124,7 @@ class AMLifeCycle * Called at the end of transition from FINALIZED to power off. */ virtual void destroy(); - virtual void onDestroy(); + virtual void onDestroy(); void doDestroy(bool success); /** From ae1e152ca218c9aac4ad50fed82f6b0c2ce59ca6 Mon Sep 17 00:00:00 2001 From: Aaron Roller Date: Wed, 6 May 2020 08:17:46 -0700 Subject: [PATCH 10/14] format must happen in branch. protected master AM-258/package-format --- .github/workflows/package.yml | 11 ++++++++++- .github/workflows/release.yml | 8 -------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/.github/workflows/package.yml b/.github/workflows/package.yml index 37433cf2..5272a07f 100644 --- a/.github/workflows/package.yml +++ b/.github/workflows/package.yml @@ -38,4 +38,13 @@ jobs: uses: repo-sync/pull-request@v2 with: pr_draft: true - github_token: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file + github_token: ${{ secrets.GITHUB_TOKEN }} + code-format: + runs-on: ubuntu-18.04 + needs: package + steps: + - uses: actions/checkout@v2 + - name: Format Code + uses: AutoModality/action-ros-clang-format@master + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0e0f0ec4..2ebaaef4 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -4,14 +4,6 @@ on: branches: - master jobs: - code-format: - runs-on: ubuntu-18.04 - steps: - - uses: actions/checkout@v2 - - name: Format Code - uses: AutoModality/action-ros-clang-format@master - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} release: runs-on: ubuntu-18.04 steps: From 9fa86b82835acb6d2bf1c9174fa78ad347cb8534 Mon Sep 17 00:00:00 2001 From: Format Bot Date: Wed, 6 May 2020 15:22:04 +0000 Subject: [PATCH 11/14] style: Applied ROS C++ Style Guide --- include/super_lib/am_life_cycle.h | 4 ++-- include/super_lib/am_life_cycle_types.h | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/include/super_lib/am_life_cycle.h b/include/super_lib/am_life_cycle.h index ae6edb42..4d5d8a1f 100644 --- a/include/super_lib/am_life_cycle.h +++ b/include/super_lib/am_life_cycle.h @@ -123,8 +123,8 @@ class AMLifeCycle * @brief Function to be defined by the user. * Called at the end of transition from FINALIZED to power off. */ - virtual void destroy(); - virtual void onDestroy(); + virtual void destroy(); + virtual void onDestroy(); void doDestroy(bool success); /** diff --git a/include/super_lib/am_life_cycle_types.h b/include/super_lib/am_life_cycle_types.h index 0a817907..7e9742a3 100644 --- a/include/super_lib/am_life_cycle_types.h +++ b/include/super_lib/am_life_cycle_types.h @@ -30,7 +30,8 @@ enum class LifeCycleState : std::uint8_t * status of the functionality of the node (i.e. is it operating to spec) */ enum class LifeCycleStatus : std::uint8_t -{OK = brain_box_msgs::LifeCycleState::STATUS_OK, +{ + OK = brain_box_msgs::LifeCycleState::STATUS_OK, WARN = brain_box_msgs::LifeCycleState::STATUS_WARN, ERROR = brain_box_msgs::LifeCycleState::STATUS_ERROR, LAST_STATUS = brain_box_msgs::LifeCycleState::STATUS_LAST From 573873fb74463f9f59d73ce8e5afed277050ffdf Mon Sep 17 00:00:00 2001 From: Aaron Roller Date: Wed, 6 May 2020 09:10:21 -0700 Subject: [PATCH 12/14] pr draft as a job runs once and faster AM-292/pr-draft-job --- .github/workflows/package.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/package.yml b/.github/workflows/package.yml index 5272a07f..e94825ce 100644 --- a/.github/workflows/package.yml +++ b/.github/workflows/package.yml @@ -34,6 +34,10 @@ jobs: distro: 'ubuntu' release: 'bionic' file: '${{ steps.package.outputs.artifact-path }}' + draft-pr: + runs-on: ubuntu-18.04 + needs: package + steps: - name: Draft a Pull Request uses: repo-sync/pull-request@v2 with: From 834c21067f1a8b5f26856fc44930308491a3596c Mon Sep 17 00:00:00 2001 From: Aaron Roller Date: Wed, 6 May 2020 09:20:40 -0700 Subject: [PATCH 13/14] requires checkout for PR AM-292/pr-draft-job --- .github/workflows/package.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/package.yml b/.github/workflows/package.yml index e94825ce..bd1bb92e 100644 --- a/.github/workflows/package.yml +++ b/.github/workflows/package.yml @@ -38,6 +38,7 @@ jobs: runs-on: ubuntu-18.04 needs: package steps: + - uses: actions/checkout@v2 - name: Draft a Pull Request uses: repo-sync/pull-request@v2 with: From f4ff3b48c0e5f8511fe44673084d690583db50ca Mon Sep 17 00:00:00 2001 From: Aaron Roller Date: Fri, 8 May 2020 07:46:02 -0700 Subject: [PATCH 14/14] fix: update AMROS with release AM-280 master --- .github/workflows/release.yml | 63 +++++++++++++++++++++++++++++------ 1 file changed, 52 insertions(+), 11 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2ebaaef4..5c3a0518 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -3,9 +3,16 @@ on: push: branches: - master +env: + RELEASE_DIR: release + RELEASE_PROPERTIES_FILE: release/release.properties + RELEASE_PAYLOAD_FILE: release/payload.json jobs: release: - runs-on: ubuntu-18.04 + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [[x64,self-hosted,linux]] steps: - uses: AutoModality/action-clean@v1.1.0 - name: Checkout @@ -16,58 +23,63 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Write release result to file - run: mkdir release + run: mkdir ${{ env.RELEASE_DIR }} - name: Write Published uses: christian-draeger/write-properties@1.0.1 with: - path: 'release.properties' + path: ${{ env.RELEASE_PROPERTIES_FILE }} property: 'published' value: ${{ steps.semantic.outputs.new_release_published }} - name: Write Version uses: christian-draeger/write-properties@1.0.1 if: steps.semantic.outputs.new_release_published == 'true' with: - path: 'release.properties' + path: ${{ env.RELEASE_PROPERTIES_FILE }} property: 'version' value: ${{ steps.semantic.outputs.new_release_version }} + - name: Write Release Payload + run: | + #retrieve package name from changelog guaranteed to be first characters ( split on space, choose first result) + package_name=$(head -1 debian/changelog | awk -F' ' '{print $1}') + echo "{\"package\":\"${package_name}\", \"new_release_version\": \"${{ steps.semantic.outputs.new_release_version }}\", \"new_release_major_version\": \"${{ steps.semantic.outputs.new_release_major_version }}\", \"new_release_minor_version\":\"${{ steps.semantic.outputs.new_release_minor_version }}\",\"new_release_patch_version\":\"${{ steps.semantic.outputs.new_release_patch_version }}\"}" > ${{ env.RELEASE_PAYLOAD_FILE }} - name: Share release file with other jobs uses: actions/upload-artifact@v1 with: name: release - path: 'release.properties' + path: '${{ env.RELEASE_DIR }}' release-package: + needs: release runs-on: ${{ matrix.os }} strategy: matrix: - os: [[x64, self-hosted,linux], [arm64,self-hosted,linux]] + os: [[x64,self-hosted,linux], [arm64,self-hosted,linux]] fail-fast: true - needs: release name: Package if released steps: - - uses: AutoModality/action-clean@v1.1.0 - name: Checkout uses: actions/checkout@v2 - name: Download release uses: actions/download-artifact@v1 with: name: release + path: ${{ env.RELEASE_DIR }} - name: Read Published id: published uses: christian-draeger/read-properties@1.0.1 with: - path: 'release/release.properties' + path: ${{ env.RELEASE_PROPERTIES_FILE }} property: 'published' - name: Read Version if published id: version if: steps.published.outputs.value == 'true' uses: christian-draeger/read-properties@1.0.1 with: - path: 'release/release.properties' + path: ${{ env.RELEASE_PROPERTIES_FILE }} property: 'version' - name: Package if published if: steps.published.outputs.value == 'true' id: package - uses: AutoModality/action-package-debian-ros@v3-perception + uses: AutoModality/action-package-debian-ros@v3.0.0 with: version: ${{ steps.version.outputs.value }} release-repo-entitlement: ${{ secrets.CLOUDSMITH_READ_RELEASE_ENTITLEMENT }} @@ -84,3 +96,32 @@ jobs: distro: 'ubuntu' release: 'bionic' file: '${{ steps.package.outputs.artifact-path }}' + notify-amros: + needs: release-package + runs-on: ubuntu-latest + name: Notify AMROS + steps: + - name: Download release + uses: actions/download-artifact@v1 + with: + name: release + path: ${{ env.RELEASE_DIR }} + - name: Read Published + id: published + uses: christian-draeger/read-properties@1.0.1 + with: + path: ${{ env.RELEASE_PROPERTIES_FILE }} + property: 'published' + - name: Payload env + run: | + payload=$(cat ${{ env.RELEASE_PAYLOAD_FILE }} ) + echo ::set-env name=RELEASE_PAYLOAD::$payload + - name: Notify AMROS of Release + if: steps.published.outputs.value == 'true' + uses: peter-evans/repository-dispatch@v1 + with: + token: ${{ secrets.AMGITBOT_PAT }} + repository: AutoModality/amros + event-type: package-released + client-payload: "${{ env.RELEASE_PAYLOAD }}" + \ No newline at end of file