Skip to content

Commit 4d04625

Browse files
Refactor GHA ci
1 parent 18545b8 commit 4d04625

File tree

7 files changed

+174
-60
lines changed

7 files changed

+174
-60
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# SPDX-License-Identifier: MIT-0
2+
3+
---
4+
name: ci
5+
on:
6+
workflow_call:
7+
8+
jobs:
9+
ros_humble_ament_cmake_installed:
10+
name: ros 2 humble ament cmake installed
11+
runs-on: ubuntu-latest
12+
container: ubuntu:jammy
13+
steps:
14+
- name: checkout
15+
uses: actions/checkout@v4
16+
- name: setup
17+
run: ./drake_ament_cmake_installed/.github/ros_humble_setup
18+
shell: bash
19+
- name: ament_cmake_installed build and test
20+
run: ./drake_ament_cmake_installed/.github/ci_build_test
21+
shell: bash

.github/workflows/bazel_download.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# SPDX-License-Identifier: MIT-0
2+
3+
---
4+
name: ci
5+
on:
6+
workflow_call:
7+
8+
jobs:
9+
ubuntu_jammy_bazel_download:
10+
name: ubuntu 22.04 jammy bazel download
11+
runs-on: ubuntu-latest
12+
container: ubuntu:jammy
13+
steps:
14+
- name: checkout
15+
uses: actions/checkout@v4
16+
- name: setup
17+
run: ./scripts/continuous_integration/github_actions/ubuntu_setup
18+
shell: bash
19+
- name: bazel_download build and test
20+
run: ./drake_bazel_download/.github/ci_build_test
21+
shell: bash
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# SPDX-License-Identifier: MIT-0
2+
3+
---
4+
name: ci
5+
on:
6+
workflow_call:
7+
8+
jobs:
9+
ubuntu_jammy_catkin_installed:
10+
name: ubuntu 22.04 jammy catkin installed
11+
runs-on: ubuntu-latest
12+
container: ubuntu:jammy
13+
steps:
14+
- name: checkout
15+
uses: actions/checkout@v4
16+
- name: setup
17+
run: ./scripts/continuous_integration/github_actions/ubuntu_setup
18+
shell: bash
19+
- name: catkin_installed build and test
20+
run: ./drake_catkin_installed/.github/ci_build_test
21+
shell: bash

.github/workflows/ci.yml

Lines changed: 6 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ on:
1111
- main
1212
schedule:
1313
- cron: '0 12 * * *'
14+
workflow_dispatch:
1415
concurrency:
1516
# Cancel previous CI runs when additional commits are added to a pull request.
1617
# This will not cancel CI runs associated with `schedule` or `push`.
@@ -41,70 +42,15 @@ jobs:
4142
run: ./drake_cmake_installed/.github/ci_build_test
4243
shell: zsh -efuo pipefail {0}
4344
ros_humble_ament_cmake_installed:
44-
name: ros 2 humble ament cmake installed
45-
runs-on: ubuntu-latest
46-
container: ubuntu:jammy
47-
steps:
48-
- name: checkout
49-
uses: actions/checkout@v4
50-
- name: setup
51-
run: ./drake_ament_cmake_installed/.github/ros_humble_setup
52-
shell: bash
53-
- name: ament_cmake_installed build and test
54-
run: ./drake_ament_cmake_installed/.github/ci_build_test
55-
shell: bash
45+
uses: ./.github/workflows/ament_cmake_installed.yml
5646
ubuntu_jammy_bazel_download:
57-
name: ubuntu 22.04 jammy bazel download
58-
runs-on: ubuntu-latest
59-
container: ubuntu:jammy
60-
steps:
61-
- name: checkout
62-
uses: actions/checkout@v4
63-
- name: setup
64-
run: ./drake_bazel_download/.github/ubuntu_setup
65-
shell: bash
66-
- name: bazel_download build and test
67-
run: ./drake_bazel_download/.github/ci_build_test
68-
shell: bash
47+
uses: ./.github/workflows/bazel_download.yml
6948
ubuntu_jammy_catkin_installed:
70-
name: ubuntu 22.04 jammy catkin installed
71-
runs-on: ubuntu-latest
72-
container: ubuntu:jammy
73-
steps:
74-
- name: checkout
75-
uses: actions/checkout@v4
76-
- name: setup
77-
run: ./drake_catkin_installed/.github/ubuntu_setup
78-
shell: bash
79-
- name: catkin_installed build and test
80-
run: ./drake_catkin_installed/.github/ci_build_test
81-
shell: bash
49+
uses: ./.github/workflows/catkin_installed.yml
8250
ubuntu_jammy_cmake_installed:
83-
name: ubuntu 22.04 jammy cmake installed
84-
runs-on: ubuntu-latest
85-
container: ubuntu:jammy
86-
steps:
87-
- name: checkout
88-
uses: actions/checkout@v4
89-
- name: setup
90-
run: ./drake_cmake_installed/.github/ubuntu_setup
91-
shell: bash
92-
- name: cmake_installed build and test
93-
run: ./drake_cmake_installed/.github/ci_build_test
94-
shell: bash
51+
uses: ./.github/workflows/cmake_installed_ubuntu.yml
9552
ubuntu_jammy_cmake_installed_apt:
96-
name: ubuntu 22.04 jammy cmake installed apt
97-
runs-on: ubuntu-latest
98-
container: ubuntu:jammy
99-
steps:
100-
- name: checkout
101-
uses: actions/checkout@v4
102-
- name: setup
103-
run: ./drake_cmake_installed_apt/.github/ubuntu_apt_setup
104-
shell: bash
105-
- name: cmake_installed_apt build and test
106-
run: ./drake_cmake_installed_apt/.github/ci_build_test
107-
shell: bash
53+
uses: ./.github/workflows/cmake_installed_apt.yml
10854
file_sync:
10955
name: file sync
11056
runs-on: ubuntu-latest

.github/workflows/cmake_installed.yml

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
# SPDX-License-Identifier: MIT-0
2+
3+
---
4+
name: ci
5+
on:
6+
workflow_call:
7+
8+
jobs:
9+
macos_sonoma_arm_cmake_installed:
10+
name: macos sonoma 14 arm cmake installed
11+
runs-on: macos-14
12+
steps:
13+
- name: checkout
14+
uses: actions/checkout@v4
15+
# See issue https://github.com/actions/setup-python/issues/577. There is
16+
# some kind of environment conflict between the symlinks found in the
17+
# GitHub Actions runner and `brew upgrade python` where `brew` detects and
18+
# refuses to overwrite symlinks. The cause for our runs is not clear,
19+
# we do not use that action, but if that issue is closed this section
20+
# can be removed.
21+
- name: sanitize GHA / brew python environment
22+
run: |
23+
# Remove the symlinks that cause issues.
24+
find /usr/local/bin -lname '*/Library/Frameworks/Python.framework/*' -delete
25+
sudo rm -rf /Library/Frameworks/Python.framework/
26+
#
27+
######################################################################
28+
# For brew formulas that have issues during `brew upgrade` due to
29+
# symlinks already existing, we use the strategy:
30+
# brew list <formula> && (brew unlink ... )
31+
# The `brew list <formula>` will error if it is not installed. When
32+
# the logs say something like "No such keg: /some/path/<formula>"
33+
# that means the band-aid can be removed from DEE CI.
34+
######################################################################
35+
# On 2023-02-24 `brew upgrade` resulted in a failure linking tcl-tk.
36+
brew list tcl-tk && brew unlink tcl-tk
37+
#
38+
# On 2023-04-06 `brew upgrade` resulted in a failure upgrading `go`.
39+
brew list go && ( \
40+
brew unlink go && \
41+
rm -f /usr/local/bin/go && \
42+
rm -f /usr/local/bin/gofmt \
43+
)
44+
#
45+
# On 2023-09-25 there were issues upgrading node@18 from 18.17.1 to
46+
# 18.18.0, caused by `brew upgrade`.
47+
brew list node@18 && ( \
48+
brew unlink node@18 && \
49+
rm -rf /usr/local/lib/node_modules/ \
50+
)
51+
######################################################################
52+
# Run upgrades now to fail-fast (setup scripts do this anyway).
53+
######################################################################
54+
brew update && brew upgrade
55+
# On 2023-02-16 the pip3.11 symlink was mysteriously missing.
56+
brew unlink python@3.11 && brew link python@3.11
57+
pip3.11 --version
58+
- name: setup
59+
run: ./drake_cmake_installed/setup/mac/install_prereqs
60+
shell: zsh -efuo pipefail {0}
61+
- name: cmake_installed build and test
62+
run: ./drake_cmake_installed/.github/ci_build_test
63+
shell: zsh -efuo pipefail {0}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# SPDX-License-Identifier: MIT-0
2+
3+
---
4+
name: ci
5+
on:
6+
workflow_call:
7+
8+
jobs:
9+
ubuntu_jammy_cmake_installed_apt:
10+
name: ubuntu 22.04 jammy cmake installed apt
11+
runs-on: ubuntu-latest
12+
container: ubuntu:jammy
13+
steps:
14+
- name: checkout
15+
uses: actions/checkout@v4
16+
- name: setup
17+
run: ./drake_cmake_installed_apt/.github/ubuntu_apt_setup
18+
shell: bash
19+
- name: cmake_installed_apt build and test
20+
run: ./drake_cmake_installed_apt/.github/ci_build_test
21+
shell: bash
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# SPDX-License-Identifier: MIT-0
2+
3+
---
4+
name: ci
5+
on:
6+
workflow_call:
7+
8+
jobs:
9+
ubuntu_jammy_cmake_installed:
10+
name: ubuntu 22.04 jammy cmake installed
11+
runs-on: ubuntu-latest
12+
container: ubuntu:jammy
13+
steps:
14+
- name: checkout
15+
uses: actions/checkout@v4
16+
- name: setup
17+
run: ./scripts/continuous_integration/github_actions/ubuntu_setup
18+
shell: bash
19+
- name: cmake_installed build and test
20+
run: ./drake_cmake_installed/.github/ci_build_test
21+
shell: bash

0 commit comments

Comments
 (0)