Skip to content

Commit

Permalink
ci: replace reusable workflows with composite actions (#161)
Browse files Browse the repository at this point in the history
* ci: replace reusable workflows with composite actions

Signed-off-by: Keisuke Shima <[email protected]>
Signed-off-by: Kenji Miyake <[email protected]>

* fix style

Signed-off-by: Kenji Miyake <[email protected]>

* cancel previous runs of build-and-test

Signed-off-by: Kenji Miyake <[email protected]>

* replace trigger from label to comment

Signed-off-by: Kenji Miyake <[email protected]>

* update mkdocs settings

Signed-off-by: Kenji Miyake <[email protected]>

* update README.md for test

Signed-off-by: Kenji Miyake <[email protected]>

* ci(pre-commit): autofix

Co-authored-by: Keisuke Shima <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
3 people authored Dec 11, 2021
1 parent d6007c3 commit 3a6d162
Show file tree
Hide file tree
Showing 9 changed files with 95 additions and 83 deletions.
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
name: build-and-test-pr-arm
name: build-and-test-arm-pr

on:
pull_request:
issue_comment:
types:
- labeled
- created

jobs:
build-and-test:
if: ${{ github.event.label.name == 'ARM64' }}
build-and-test-arm:
if: ${{ github.event.pull_request && contains(github.event.comment.body, '/arm') }}
runs-on: [self-hosted, linux, ARM64]
container: ros:galactic
steps:
Expand Down
54 changes: 33 additions & 21 deletions .github/workflows/build-and-test-pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,40 @@ on:
pull_request:

jobs:
get-modified-packages:
uses: autowarefoundation/autoware-github-actions/.github/workflows/reusable-get-modified-packages.yaml@6a086d5eac5effbed9876049233213f5cd358914
with:
script-ref: 6a086d5eac5effbed9876049233213f5cd358914
build-and-test:
runs-on: ubuntu-latest
container: ros:galactic
steps:
- name: Cancel previous runs
uses: styfle/[email protected]

get-modified-source-files:
uses: autowarefoundation/autoware-github-actions/.github/workflows/reusable-get-modified-source-files.yaml@6a086d5eac5effbed9876049233213f5cd358914
- name: Get modified packages
id: get-modified-packages
uses: autowarefoundation/autoware-github-actions/get-modified-packages@tier4/proposal

build-and-test:
needs: get-modified-packages
uses: autowarefoundation/autoware-github-actions/.github/workflows/reusable-colcon-build-and-test.yaml@6a086d5eac5effbed9876049233213f5cd358914
with:
rosdistro: galactic
build-depends-repos: build_depends.repos
target-packages: ${{ needs.get-modified-packages.outputs.modified-packages }}
- name: Build and test
if: ${{ steps.get-modified-packages.outputs.modified-packages != '' }}
id: build-and-test
uses: autowarefoundation/autoware-github-actions/colcon-build-and-test@tier4/proposal
with:
rosdistro: galactic
target-packages: ${{ steps.get-modified-packages.outputs.modified-packages }}
build-depends-repos: build_depends.repos

clang-tidy:
needs: [get-modified-source-files, build-and-test]
uses: autowarefoundation/autoware-github-actions/.github/workflows/reusable-clang-tidy.yaml@6a086d5eac5effbed9876049233213f5cd358914
with:
script-ref: 6a086d5eac5effbed9876049233213f5cd358914
rosdistro: galactic
build-depends-repos: build_depends.repos
target-files: ${{ needs.get-modified-source-files.outputs.modified-source-files }}
compile-commands-hash: ${{ needs.build-and-test.outputs.compile-commands-hash }}
runs-on: ubuntu-latest
container: ros:galactic
needs: build-and-test
steps:
- name: Get modified packages
id: get-modified-packages
uses: autowarefoundation/autoware-github-actions/get-modified-packages@tier4/proposal

- name: Run clang-tidy
if: ${{ steps.get-modified-packages.outputs.modified-packages != '' }}
uses: autowarefoundation/autoware-github-actions/clang-tidy@tier4/proposal
with:
rosdistro: galactic
target-packages: ${{ steps.get-modified-packages.outputs.modified-packages }}
clang-tidy-config-url: https://raw.githubusercontent.com/autowarefoundation/autoware-github-actions/tier4/proposal/.clang-tidy
build-depends-repos: build_depends.repos
35 changes: 17 additions & 18 deletions .github/workflows/build-and-test-scheduled.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,21 @@ on:
workflow_dispatch:

jobs:
get-self-packages:
uses: autowarefoundation/autoware-github-actions/.github/workflows/reusable-get-self-packages.yaml@6a086d5eac5effbed9876049233213f5cd358914
build-and-test-scheduled:
runs-on: ${{ matrix.os }}
container: ros:galactic
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, ARM64]
steps:
- name: Get self packages
id: get-self-packages
uses: autowarefoundation/autoware-github-actions/get-self-packages@tier4/proposal

build-and-test:
needs: get-self-packages
uses: autowarefoundation/autoware-github-actions/.github/workflows/reusable-colcon-build-and-test.yaml@6a086d5eac5effbed9876049233213f5cd358914
with:
rosdistro: galactic
build-depends-repos: build_depends.repos
target-packages: ${{ needs.get-self-packages.outputs.self-packages }}

build-and-test-arm64:
needs: get-self-packages
uses: autowarefoundation/autoware-github-actions/.github/workflows/reusable-colcon-build-and-test.yaml@6a086d5eac5effbed9876049233213f5cd358914
with:
os: ARM64
rosdistro: galactic
build-depends-repos: build_depends.repos
target-packages: ${{ needs.get-self-packages.outputs.self-packages }}
- name: Build and test
uses: autowarefoundation/autoware-github-actions/colcon-build-and-test@tier4/proposal
with:
rosdistro: galactic
build-depends-repos: build_depends.repos
target-packages: ${{ steps.get-self-packages.outputs.self-packages }}
26 changes: 26 additions & 0 deletions .github/workflows/deploy-docs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: deploy-docs

on:
push:
branches:
- main
- tier4/proposal
paths:
- "mkdocs.yaml"
- "**/*.md"
- "**/*.svg"
- "**/*.png"
- "**/*.jpg"
issue_comment:
types:
- created

jobs:
deploy-docs:
runs-on: ubuntu-latest
steps:
- name: Deploy docs
if: ${{ github.event.push || contains(github.event.comment.body, '/docs') }}
uses: autowarefoundation/autoware-github-actions/deploy-docs@tier4/proposal
with:
token: ${{ secrets.GITHUB_TOKEN }}
34 changes: 0 additions & 34 deletions .github/workflows/generate-docs.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/semantic-pull-request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ on:

jobs:
semantic-pull-request:
uses: autowarefoundation/autoware-github-actions/.github/workflows/reusable-semantic-pull-request.yaml@6a086d5eac5effbed9876049233213f5cd358914
uses: autowarefoundation/autoware-github-actions/.github/workflows/semantic-pull-request.yaml@tier4/proposal
secrets:
token: ${{ secrets.GITHUB_TOKEN }}
12 changes: 9 additions & 3 deletions .github/workflows/spell-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ on:

jobs:
spell-check:
uses: autowarefoundation/autoware-github-actions/.github/workflows/reusable-spell-check.yaml@6a086d5eac5effbed9876049233213f5cd358914
with:
cspell-json-url: https://raw.githubusercontent.com/tier4/autoware-spell-check-dict/main/cspell/.cspell.json
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Run spell-check
uses: autowarefoundation/autoware-github-actions/spell-check@tier4/proposal
with:
cspell-json-url: https://raw.githubusercontent.com/tier4/autoware-spell-check-dict/main/cspell/.cspell.json
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@
This is one of the prototype repositories for Autoware Core/Universe that AWF agreed to create in the [TSC meeting on 2021/11/17](https://discourse.ros.org/t/technical-steering-committee-tsc-meeting-36-2021-11-17-minutes/23168).

Please see [autowarefoundation/autoware](https://github.com/autowarefoundation/autoware) for more details.

---
3 changes: 2 additions & 1 deletion mkdocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ plugins:
- awesome-pages
- exclude:
regex:
- '^.*\.(?!(.*\.)?md|(.*\.)?svg|(.*\.)?png|(.*\.)?jpg|(.*\.)?css).*$'
- '^(?!(.*/)?assets/).*\.(?!(.*\.)?md|(.*\.)?svg|(.*\.)?png|(.*\.)?jpg).*$'
- "^(.*/)?[^.]*$"
- same-dir
- search

Expand Down

0 comments on commit 3a6d162

Please sign in to comment.