-
Notifications
You must be signed in to change notification settings - Fork 2
55 lines (50 loc) · 1.97 KB
/
cpp.yml
File metadata and controls
55 lines (50 loc) · 1.97 KB
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
name: C/C++ CI
on:
push:
pull_request:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- name: comp
run: |
set -e -x
sudo apt-get update
sudo apt install python2
curl https://bootstrap.pypa.io/pip/2.7/get-pip.py --output get-pip.py
sudo python2 get-pip.py
mkdir Tools && mkdir Tools/completion && cd Tools/completion && wget https://github.com/ArduPilot/ardupilot/raw/master/Tools/completion/completion.bash
OPT="/opt"
cd $OPT
echo "Installing toolchain for STM32 Boards"
echo "Downloading from ArduPilot server"
sudo wget --progress=dot:giga https://firmware.ardupilot.org/Tools/STM32-tools/gcc-arm-none-eabi-6-2017-q2-update-linux.tar.bz2
echo "Installing..."
sudo chmod -R 777 gcc-arm-none-eabi-6-2017-q2-update-linux.tar.bz2
sudo tar xjf gcc-arm-none-eabi-6-2017-q2-update-linux.tar.bz2
echo "... Cleaning"
sudo rm gcc-arm-none-eabi-6-2017-q2-update-linux.tar.bz2
SHELL_LOGIN=".profile"
exportline="export PATH=$OPT/$ARM_ROOT/bin:\$PATH";
echo $exportline >> ~/$SHELL_LOGIN
env:
ARM_ROOT: gcc-arm-none-eabi-6-2017-q2-update
- name: stup
run: mkdir Tools/environment_install && cd Tools && cd environment_install && wget https://github.com/ArduPilot/ardupilot/raw/master/Tools/environment_install/install-prereqs-ubuntu.sh && bash ./install-prereqs-ubuntu.sh -y
env:
SKIP_AP_COMPLETION_ENV: 1
DO_AP_STM_ENV: 0
ARM_ROOT: gcc-arm-none-eabi-6-2017-q2-update
- name: deploy
run: source ~/.profile && chmod 777 ./deploy.sh && ./deploy.sh
- name: Upload a Build Artifact
uses: actions/upload-artifact@v2.1.4
with:
# Artifact name
name: firmwares
# A file, directory or wildcard pattern that describes what to upload
path: deploy