Skip to content

Commit 18a618c

Browse files
authored
ci: update workflows and sync-files (#7340)
Signed-off-by: M. Fatih Cırıt <mfc@leodrive.ai>
1 parent 50b7659 commit 18a618c

7 files changed

+117
-70
lines changed

.github/sync-files.yaml

+10-32
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,14 @@
1818
- source: .github/workflows/pre-commit-optional.yaml
1919
- source: .github/workflows/semantic-pull-request.yaml
2020
- source: .github/workflows/spell-check-differential.yaml
21+
pre-commands: |
22+
sd " with:\n" " with:\n local-cspell-json: .cspell.json\n" {source}
23+
- source: .github/workflows/spell-check-differential.yaml
24+
dest: .github/workflows/spell-check-daily.yaml
25+
pre-commands: |
26+
sd "spell-check-differential" "spell-check-daily" {source}
27+
sd " with:\n" " with:\n local-cspell-json: .cspell.json\n incremental-files-only: false\n" {source}
28+
sd "on:\n pull_request:\n" "on:\n schedule:\n - cron: 0 0 * * *\n workflow_dispatch:\n" {source}
2129
- source: .github/workflows/sync-files.yaml
2230
- source: .clang-format
2331
- source: .markdown-link-check.json
@@ -31,39 +39,9 @@
3139

3240
- repository: autowarefoundation/autoware_common
3341
files:
34-
- source: .github/workflows/build-and-test.yaml
35-
pre-commands: |
36-
sd "container: ros:(\w+)" "container: ghcr.io/autowarefoundation/autoware-universe:\$1-latest" {source}
37-
38-
sd -s 'container: ${{ matrix.container }}' 'container: ${{ matrix.container }}${{ matrix.container-suffix }}' {source}
39-
sd -- \
40-
" include:" \
41-
" container-suffix:
42-
- \"\"
43-
- -cuda
44-
include:" {source}
45-
- source: .github/workflows/build-and-test-differential-self-hosted.yaml
42+
- source: .github/workflows/clang-tidy-differential.yaml
4643
pre-commands: |
47-
sd "container: ros:(\w+)" "container: ghcr.io/autowarefoundation/autoware-universe:\$1-latest" {source}
48-
49-
sd -s 'container: ${{ matrix.container }}' 'container: ${{ matrix.container }}${{ matrix.container-suffix }}' {source}
50-
sd -- \
51-
" include:" \
52-
" container-suffix:
53-
- \"\"
54-
- -cuda
55-
include:" {source}
56-
- source: .github/workflows/build-and-test-self-hosted.yaml
57-
pre-commands: |
58-
sd "container: ros:(\w+)" "container: ghcr.io/autowarefoundation/autoware-universe:\$1-latest" {source}
59-
60-
sd -s 'container: ${{ matrix.container }}' 'container: ${{ matrix.container }}${{ matrix.container-suffix }}' {source}
61-
sd -- \
62-
" include:" \
63-
" container-suffix:
64-
- \"\"
65-
- -cuda
66-
include:" {source}
44+
sd 'container: ros:(\w+)' 'container: ghcr.io/autowarefoundation/autoware:latest-prebuilt-cuda' {source}
6745
- source: .github/workflows/check-build-depends.yaml
6846
- source: .github/workflows/clang-tidy-pr-comments.yaml
6947
- source: .github/workflows/clang-tidy-pr-comments-manually.yaml

.github/workflows/build-and-test-arm64.yaml .github/workflows/build-and-test-daily-arm64.yaml

+14-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
name: build-and-test-arm64
1+
name: build-and-test-daily-arm64
22

33
on:
44
schedule:
55
- cron: 0 0 * * *
66
workflow_dispatch:
77

88
jobs:
9-
build-and-test-arm64:
9+
build-and-test-daily-arm64:
1010
runs-on: [self-hosted, linux, ARM64]
1111
container: ${{ matrix.container }}${{ matrix.container-suffix }}
1212
strategy:
@@ -24,6 +24,8 @@ jobs:
2424
steps:
2525
- name: Check out repository
2626
uses: actions/checkout@v4
27+
with:
28+
fetch-depth: 1
2729

2830
- name: Show disk space before the tasks
2931
run: df -h
@@ -45,11 +47,21 @@ jobs:
4547

4648
- name: Test
4749
if: ${{ steps.get-self-packages.outputs.self-packages != '' }}
50+
id: test
4851
uses: autowarefoundation/autoware-github-actions/colcon-test@v1
4952
with:
5053
rosdistro: ${{ matrix.rosdistro }}
5154
target-packages: ${{ steps.get-self-packages.outputs.self-packages }}
5255
build-depends-repos: ${{ matrix.build-depends-repos }}
5356

57+
- name: Upload coverage to CodeCov
58+
if: ${{ steps.test.outputs.coverage-report-files != '' }}
59+
uses: codecov/codecov-action@v4
60+
with:
61+
files: ${{ steps.test.outputs.coverage-report-files }}
62+
fail_ci_if_error: false
63+
verbose: true
64+
flags: total-arm64
65+
5466
- name: Show disk space after the tasks
5567
run: df -h
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
name: build-and-test-daily
2+
3+
on:
4+
schedule:
5+
- cron: 0 0 * * *
6+
workflow_dispatch:
7+
8+
jobs:
9+
build-and-test-daily:
10+
runs-on: [self-hosted, linux, X64]
11+
container: ${{ matrix.container }}${{ matrix.container-suffix }}
12+
strategy:
13+
fail-fast: false
14+
matrix:
15+
rosdistro:
16+
- humble
17+
container-suffix:
18+
- ""
19+
- -cuda
20+
include:
21+
- rosdistro: humble
22+
container: ghcr.io/autowarefoundation/autoware:latest-prebuilt
23+
build-depends-repos: build_depends.repos
24+
steps:
25+
- name: Check out repository
26+
uses: actions/checkout@v4
27+
with:
28+
fetch-depth: 1
29+
30+
- name: Show disk space before the tasks
31+
run: df -h
32+
33+
- name: Remove exec_depend
34+
uses: autowarefoundation/autoware-github-actions/remove-exec-depend@v1
35+
36+
- name: Get self packages
37+
id: get-self-packages
38+
uses: autowarefoundation/autoware-github-actions/get-self-packages@v1
39+
40+
- name: Build
41+
if: ${{ steps.get-self-packages.outputs.self-packages != '' }}
42+
uses: autowarefoundation/autoware-github-actions/colcon-build@v1
43+
with:
44+
rosdistro: ${{ matrix.rosdistro }}
45+
target-packages: ${{ steps.get-self-packages.outputs.self-packages }}
46+
build-depends-repos: ${{ matrix.build-depends-repos }}
47+
48+
- name: Test
49+
if: ${{ steps.get-self-packages.outputs.self-packages != '' }}
50+
id: test
51+
uses: autowarefoundation/autoware-github-actions/colcon-test@v1
52+
with:
53+
rosdistro: ${{ matrix.rosdistro }}
54+
target-packages: ${{ steps.get-self-packages.outputs.self-packages }}
55+
build-depends-repos: ${{ matrix.build-depends-repos }}
56+
57+
- name: Upload coverage to CodeCov
58+
if: ${{ steps.test.outputs.coverage-report-files != '' }}
59+
uses: codecov/codecov-action@v4
60+
with:
61+
files: ${{ steps.test.outputs.coverage-report-files }}
62+
fail_ci_if_error: false
63+
verbose: true
64+
flags: total
65+
66+
- name: Show disk space after the tasks
67+
run: df -h

.github/workflows/build-and-test-differential-arm64.yaml

+15-5
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,18 @@ on:
55
types:
66
- opened
77
- synchronize
8+
- reopened
89
- labeled
9-
workflow_dispatch:
1010

1111
jobs:
12-
prevent-no-label-execution:
13-
uses: autowarefoundation/autoware-github-actions/.github/workflows/prevent-no-label-execution.yaml@v1
12+
make-sure-label-is-present:
13+
uses: autowarefoundation/autoware-github-actions/.github/workflows/make-sure-label-is-present.yaml@v1
1414
with:
1515
label: type:arm64
1616

1717
build-and-test-differential-arm64:
18-
needs: prevent-no-label-execution
19-
if: ${{ needs.prevent-no-label-execution.outputs.run == 'true' }}
18+
needs: make-sure-label-is-present
19+
if: ${{ needs.make-sure-label-is-present.outputs.result == 'true' }}
2020
runs-on: [self-hosted, linux, ARM64]
2121
container: ${{ matrix.container }}${{ matrix.container-suffix }}
2222
strategy:
@@ -60,12 +60,22 @@ jobs:
6060
build-depends-repos: ${{ matrix.build-depends-repos }}
6161

6262
- name: Test
63+
id: test
6364
if: ${{ steps.get-modified-packages.outputs.modified-packages != '' }}
6465
uses: autowarefoundation/autoware-github-actions/colcon-test@v1
6566
with:
6667
rosdistro: ${{ matrix.rosdistro }}
6768
target-packages: ${{ steps.get-modified-packages.outputs.modified-packages }}
6869
build-depends-repos: ${{ matrix.build-depends-repos }}
6970

71+
- name: Upload coverage to CodeCov
72+
if: ${{ steps.test.outputs.coverage-report-files != '' }}
73+
uses: codecov/codecov-action@v4
74+
with:
75+
files: ${{ steps.test.outputs.coverage-report-files }}
76+
fail_ci_if_error: false
77+
verbose: true
78+
flags: differential-arm64
79+
7080
- name: Show disk space after the tasks
7181
run: df -h

.github/workflows/build-and-test-differential.yaml

+6-5
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,18 @@ on:
55
types:
66
- opened
77
- synchronize
8+
- reopened
89
- labeled
910

1011
jobs:
11-
prevent-no-label-execution:
12-
uses: autowarefoundation/autoware-github-actions/.github/workflows/prevent-no-label-execution.yaml@v1
12+
make-sure-label-is-present:
13+
uses: autowarefoundation/autoware-github-actions/.github/workflows/make-sure-label-is-present.yaml@v1
1314
with:
1415
label: tag:run-build-and-test-differential
1516

1617
build-and-test-differential:
17-
needs: prevent-no-label-execution
18-
if: ${{ needs.prevent-no-label-execution.outputs.run == 'true' }}
18+
needs: make-sure-label-is-present
19+
if: ${{ needs.make-sure-label-is-present.outputs.result == 'true' }}
1920
runs-on: ubuntu-latest
2021
container: ${{ matrix.container }}${{ matrix.container-suffix }}
2122
strategy:
@@ -69,7 +70,7 @@ jobs:
6970

7071
- name: Upload coverage to CodeCov
7172
if: ${{ steps.test.outputs.coverage-report-files != '' }}
72-
uses: codecov/codecov-action@v3
73+
uses: codecov/codecov-action@v4
7374
with:
7475
files: ${{ steps.test.outputs.coverage-report-files }}
7576
fail_ci_if_error: false

.github/workflows/build-and-test.yaml

+5-5
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,12 @@ name: build-and-test
22

33
on:
44
push:
5-
schedule:
6-
- cron: 0 0 * * *
5+
branches:
6+
- main
77
workflow_dispatch:
88

99
jobs:
1010
build-and-test:
11-
if: ${{ github.event_name != 'push' || github.ref_name == github.event.repository.default_branch }}
1211
runs-on: [self-hosted, linux, X64]
1312
container: ${{ matrix.container }}${{ matrix.container-suffix }}
1413
strategy:
@@ -17,7 +16,6 @@ jobs:
1716
rosdistro:
1817
- humble
1918
container-suffix:
20-
- ""
2119
- -cuda
2220
include:
2321
- rosdistro: humble
@@ -26,6 +24,8 @@ jobs:
2624
steps:
2725
- name: Check out repository
2826
uses: actions/checkout@v4
27+
with:
28+
fetch-depth: 1
2929

3030
- name: Show disk space before the tasks
3131
run: df -h
@@ -56,7 +56,7 @@ jobs:
5656

5757
- name: Upload coverage to CodeCov
5858
if: ${{ steps.test.outputs.coverage-report-files != '' }}
59-
uses: codecov/codecov-action@v3
59+
uses: codecov/codecov-action@v4
6060
with:
6161
files: ${{ steps.test.outputs.coverage-report-files }}
6262
fail_ci_if_error: false

.github/workflows/spell-check-partial.yaml

-21
This file was deleted.

0 commit comments

Comments
 (0)