Skip to content

Commit

Permalink
ci: fix CI settings (#163)
Browse files Browse the repository at this point in the history
Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>
  • Loading branch information
kenji-miyake authored Dec 11, 2021
1 parent 854004f commit b4772ff
Show file tree
Hide file tree
Showing 5 changed files with 47 additions and 11 deletions.
19 changes: 14 additions & 5 deletions .github/workflows/build-and-test-arm-pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,32 @@ name: build-and-test-arm-pr

on:
pull_request:
types:
- labeled
workflow_dispatch:

jobs:
build-and-test-arm:
if: ${{ github.event.label.name == 'ARM64' }}
runs-on: [self-hosted, linux, ARM64]
container: ros:galactic
steps:
- name: Check label
if: ${{ github.event.pull_request && !contains(github.event.pull_request.labels.*.name, 'ARM64') }}
run: |
echo "Please add a proper label to run this workflow."
exit 1
- name: Checkout repository
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Get modified packages
id: get-modified-packages
uses: autowarefoundation/autoware-github-actions/get-modified-packages@tier4/proposal

- name: Build and test
id: build-and-test
if: ${{ steps.get-modified-packages.outputs.modified-packages != '' }}
uses: autowarefoundation/autoware-github-actions/colcon-build-and-test@tier4/proposal
with:
rosdistro: galactic
build-depends-repos: build_depends.repos
target-packages: ${{ steps.get-modified-packages.outputs.modified-packages }}
build-depends-repos: build_depends.repos
11 changes: 10 additions & 1 deletion .github/workflows/build-and-test-pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,17 @@ jobs:
- name: Cancel previous runs
uses: styfle/cancel-workflow-action@0.9.1

- name: Checkout repository
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Get modified packages
id: get-modified-packages
uses: autowarefoundation/autoware-github-actions/get-modified-packages@tier4/proposal

- 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
Expand All @@ -29,6 +33,11 @@ jobs:
container: ros:galactic
needs: build-and-test
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Get modified packages
id: get-modified-packages
uses: autowarefoundation/autoware-github-actions/get-modified-packages@tier4/proposal
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/build-and-test-scheduled.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ jobs:
matrix:
os: [ubuntu-latest, ARM64]
steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Get self packages
id: get-self-packages
uses: autowarefoundation/autoware-github-actions/get-self-packages@tier4/proposal
Expand All @@ -22,5 +25,5 @@ jobs:
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 }}
build-depends-repos: build_depends.repos
5 changes: 5 additions & 0 deletions .github/workflows/delete-closed-pr-docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ jobs:
delete-closed-pr-docs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Delete closed PR docs
uses: autowarefoundation/autoware-github-actions/delete-closed-pr-docs@tier4/proposal
with:
Expand Down
18 changes: 14 additions & 4 deletions .github/workflows/deploy-docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,26 @@ on:
- "**/*.svg"
- "**/*.png"
- "**/*.jpg"
pull_request:
types:
- labeled
pull_request_target:
workflow_dispatch:

jobs:
deploy-docs:
runs-on: ubuntu-latest
steps:
- name: Check label
if: ${{ github.event.pull_request && !contains(github.event.pull_request.labels.*.name, 'documentation') }}
run: |
echo "Please add a proper label to run this workflow."
exit 1
- name: Checkout repository
uses: actions/checkout@v2
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}

- name: Deploy docs
if: ${{ github.event.push || github.event.label.name == 'documentation' }}
uses: autowarefoundation/autoware-github-actions/deploy-docs@tier4/proposal
with:
token: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit b4772ff

Please sign in to comment.