Skip to content
This repository was archived by the owner on Feb 12, 2022. It is now read-only.

Commit 95fb55a

Browse files
authored
Revert consolidation changes (#68)
* Revert "Fix release latest on schedule (#66)" This reverts commit 3811724. * Revert "Consolidate Workflows (#65)" This reverts commit 05a071e.
1 parent 3811724 commit 95fb55a

File tree

2 files changed

+99
-39
lines changed

2 files changed

+99
-39
lines changed

.github/workflows/build_and_test.yml

Lines changed: 14 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,16 @@ on:
77
schedule:
88
# Run every hour. This helps detect flakiness,
99
# and broken external dependencies.
10-
# Only triggered for the master branch
1110
- cron: '0 * * * *'
1211

1312
jobs:
14-
build_and_test:
15-
name: Build and Test ROS ${{ matrix.ros_version }} ${{ matrix.ros_distro }} ${{ matrix.build_type }}
13+
build_and_test_master:
14+
name: Build and Test Master ROS ${{ matrix.ros_version }} ${{ matrix.ros_distro }}
1615
runs-on: ubuntu-latest
1716
strategy:
1817
fail-fast: false
1918
matrix:
2019
ros_distro: [kinetic, melodic, dashing]
21-
build_type: [master, release-latest]
2220
include:
2321
- ros_distro: kinetic
2422
ubuntu_distro: xenial
@@ -34,40 +32,23 @@ jobs:
3432
extra_cmake_args: ""
3533
container:
3634
image: rostooling/setup-ros-docker:ubuntu-${{ matrix.ubuntu_distro }}-ros-${{ matrix.ros_distro }}-ros-base-latest
37-
env:
38-
# Needed for the CMakeLists.txt setup
39-
ROS_DISTRO: ${{ matrix.ros_distro }}
40-
ROS_VERSION: ${{ matrix.ros_version }}
35+
outputs:
36+
build_result: ${{ steps.build.outcome }}
37+
test_result: ${{ steps.test.outcome }}
4138
steps:
4239
# TODO(setup-ros-docker#7): calling chown is necessary for now
43-
- name: setup-ros-docker workaround
44-
run: sudo chown -R rosbuild:rosbuild "$HOME" .
45-
# Needed to access the vcs repos file from the workspace
46-
# This allows the workflow to test the release-latest branch
47-
- name: Checkout source
48-
uses: actions/checkout@v2
49-
# master workflow: scheduled and PRs with the correct args
50-
- name: Build and test ${{ matrix.ros_distro }} ${{ matrix.ros_version }} ${{ matrix.build_type }}
51-
uses: ros-tooling/[email protected]
52-
if: ${{ matrix.build_type == 'master' }}
40+
- run: sudo chown -R rosbuild:rosbuild "$HOME" .
41+
# Needed for the CMakeLists.txt setup
42+
- run: export ROS_DISTRO=${{ matrix.ros_distro }}
43+
# Needed for the CMakeLists.txt setup
44+
- run: export ROS_VERSION=${{ matrix.ros_version }}
45+
- uses: ros-tooling/[email protected]
5346
with:
5447
source-ros-binary-installation: ${{ matrix.ros_distro }}
5548
package-name: aws_common
5649
extra-cmake-args: ${{ matrix.extra_cmake_args }}
57-
vcs-repo-file-url: ""
58-
# release-latest workflow: scheduled only with the correct args
59-
- name: Build and test ${{ matrix.ros_distro }} ${{ matrix.ros_version }} ${{ matrix.build_type }}
60-
uses: ros-tooling/[email protected]
61-
if: ${{ matrix.build_type == 'release-latest' && github.event_name == 'schedule' }}
62-
with:
63-
source-ros-binary-installation: ${{ matrix.ros_distro }}
64-
package-name: aws_common
65-
extra-cmake-args: ${{ matrix.extra_cmake_args }}
66-
vcs-repo-file-url: "${{ github.workspace }}/.github/workflows/release_latest.repos"
67-
- name: Upload workflow colcon logs as artifacts
68-
uses: actions/upload-artifact@v1
69-
# Don't upload if release-latest didn't run (no artifacts to upload)
70-
if: ${{ matrix.build_type == 'master' || github.event_name == 'schedule' }}
50+
vcs-repo-file-url: ''
51+
- uses: actions/upload-artifact@v1
7152
with:
7253
name: colcon-logs-${{ matrix.ubuntu_distro }}-ros-${{ matrix.ros_distro }}
7354
path: ros_ws/log
@@ -77,7 +58,7 @@ jobs:
7758
container:
7859
image: ubuntu:bionic
7960
needs:
80-
- build_and_test
61+
- build_and_test_master
8162
# Don't skip if prior steps failed, but don't run on a fork because it won't have access to AWS secrets
8263
if: ${{ always() && ! github.event.repository.fork && ! github.event.pull_request.head.repo.fork }}
8364
steps:
@@ -89,12 +70,6 @@ jobs:
8970
aws-region: ${{ secrets.AWS_REGION }}
9071
- uses: ros-tooling/[email protected]
9172
with:
92-
metric-dimensions: >-
93-
[
94-
{ "Name": "github.event_name", "Value": "${{ github.event_name }}" },
95-
{ "Name": "github.ref", "Value": "build_and_test" },
96-
{ "Name": "github.repository", "Value": "${{ github.repository }}" }
97-
]
9873
# Checks if any of the jobs have failed.
9974
#
10075
# needs.*.result is returns the list of all success statuses as an
Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
name: Build & Test release-latest
2+
on:
3+
schedule:
4+
# Run every hour. This helps detect flakiness,
5+
# and broken external dependencies.
6+
- cron: '0 * * * *'
7+
8+
jobs:
9+
build_and_test_release_latest:
10+
name: Build and Test Release Latest ROS ${{ matrix.ros_version }} ${{ matrix.ros_distro }}
11+
runs-on: ubuntu-latest
12+
strategy:
13+
fail-fast: false
14+
matrix:
15+
ros_distro: [kinetic, melodic, dashing]
16+
include:
17+
- ros_distro: kinetic
18+
ubuntu_distro: xenial
19+
ros_version: 1
20+
extra_cmake_args: --cmake-target tests
21+
- ros_distro: melodic
22+
ubuntu_distro: bionic
23+
ros_version: 1
24+
extra_cmake_args: --cmake-target tests
25+
- ros_distro: dashing
26+
ubuntu_distro: bionic
27+
ros_version: 2
28+
extra_cmake_args: ""
29+
container:
30+
image: rostooling/setup-ros-docker:ubuntu-${{ matrix.ubuntu_distro }}-ros-${{ matrix.ros_distro }}-ros-base-latest
31+
outputs:
32+
build_result: ${{ steps.build.outcome }}
33+
test_result: ${{ steps.test.outcome }}
34+
steps:
35+
# TODO(setup-ros-docker#7): calling chown is necessary for now
36+
- run: sudo chown -R rosbuild:rosbuild "$HOME" .
37+
# Needed for the CMakeLists.txt setup
38+
- run: export ROS_DISTRO=${{ matrix.ros_distro }}
39+
# Needed for the CMakeLists.txt setup
40+
- run: export ROS_VERSION=${{ matrix.ros_version }}
41+
# Needed to access the vcs repos file from the workspace
42+
- name: Checkout source
43+
uses: actions/checkout@v2
44+
- uses: ros-tooling/[email protected]
45+
with:
46+
source-ros-binary-installation: ${{ matrix.ros_distro }}
47+
package-name: aws_common
48+
extra-cmake-args: ${{ matrix.extra_cmake_args }}
49+
# schedule runs against the default branch (master), so specify release-latest via repos file
50+
vcs-repo-file-url: "${{ github.workspace }}/.github/workflows/release_latest.repos"
51+
- uses: actions/upload-artifact@v1
52+
with:
53+
name: colcon-logs-${{ matrix.ubuntu_distro }}-ros-${{ matrix.ros_distro }}
54+
path: ros_ws/log
55+
56+
log_workflow_status_to_cloudwatch:
57+
runs-on: ubuntu-latest
58+
container:
59+
image: ubuntu:bionic
60+
needs:
61+
- build_and_test_release_latest
62+
# Don't skip if prior steps failed, but don't run on a fork because it won't have access to AWS secrets
63+
if: ${{ always() && ! github.event.repository.fork && ! github.event.pull_request.head.repo.fork }}
64+
steps:
65+
- name: Configure AWS Credentials
66+
uses: aws-actions/configure-aws-credentials@v1
67+
with:
68+
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
69+
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
70+
aws-region: ${{ secrets.AWS_REGION }}
71+
- uses: ros-tooling/[email protected]
72+
with:
73+
metric-dimensions: >-
74+
[
75+
{ "Name": "github.event_name", "Value": "${{ github.event_name }}" },
76+
{ "Name": "github.ref", "Value": "release-latest" },
77+
{ "Name": "github.repository", "Value": "${{ github.repository }}" }
78+
]
79+
# Checks if any of the jobs have failed.
80+
#
81+
# needs.*.result is returns the list of all success statuses as an
82+
# array, i.e. ['success', 'failure, 'success']
83+
# join() converts the array to a string 'successfailuresuccess'
84+
# contains() checks whether the string contains failure
85+
metric-value: ${{ ! contains(join(needs.*.result, ''), 'failure') && ! contains(join(needs.*.result, ''), 'cancelled') }}

0 commit comments

Comments
 (0)