forked from tier4/AutowareArchitectureProposal.proj
-
Notifications
You must be signed in to change notification settings - Fork 2
79 lines (67 loc) · 2.81 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
name: build
on:
schedule:
- cron: "0 19 * * 0" # run at 4 AM JST on Sundays
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
branch:
- main
- develop
steps:
# https://github.community/t/bug-strange-no-space-left-on-device-ioexceptions-on-github-runners/17616
- name: Free disk space
run: |
sudo apt-get -y --allow-remove-essential purge \
aria2 ansible azure-cli shellcheck rpm xorriso zsync clang* dotnet-sdk* esl-erlang firefox g++-8 gfortran* \
google* ghc* cabal-install* imagemagick libmagick* ant ant-optional kubectl libnginx* \
mercurial apt-transport-https mono-complete mysql-client libmysqlclient-dev mysql-server mssql-tools unixodbc-dev \
yarn chrpath libssl-dev libxft-dev libfreetype6 libfreetype6-dev libfontconfig1 libfontconfig1-dev php*
sudo apt-get -y autoremove
sudo apt-get -y autoclean
sudo rm -rf /usr/local/lib/android
docker rmi $(docker image ls -aq)
df -h
- name: Checkout repository
uses: actions/checkout@v2
with:
ref: ${{ matrix.branch }}
- name: Install pip
run: |
sudo apt-get -y update
sudo apt-get -y install python3-pip
- name: Install tools
run: |
sudo apt-get -y update
sudo apt-get -y install curl git
- name: Fix autoware.proj.repos for private repositories
run: |
sed -i -e "s|[email protected]:|https://github.com/|g" autoware.proj.repos
- name: Set git config for private repositories
run: |
git config --local --unset-all http.https://github.com/.extraheader || true
git config --global url.https://${{ secrets.REPO_TOKEN }}@github.com.insteadOf 'https://github.com'
- name: Install vcstool
run: |
sudo apt update && sudo apt install curl gnupg lsb-release
sudo curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros2/ubuntu $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/ros2.list > /dev/null
sudo apt-get update && sudo apt-get install python3-vcstool
- name: Run vcs import
run: |
mkdir src
vcs import src < autoware.proj.repos
- name: Run setup script
run: |
touch ~/.bashrc
./setup_ubuntu20.04.sh -c
- name: Build
run: |
. /opt/ros/galactic/setup.sh
colcon build \
--event-handlers console_cohesion+ \
--cmake-args -DCMAKE_BUILD_TYPE=Release