-
Notifications
You must be signed in to change notification settings - Fork 245
38 lines (35 loc) · 1.35 KB
/
cmake.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
name: Compile Firmware
on: [ push ]
#schedule:
# - cron: '40 15 * * *' # compile at 23:50 each day
env:
BUILD_TYPE: Release
jobs:
build:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 1
- name: Configure Software
run: |
sudo apt-get update && sudo apt-get -y upgrade && sudo apt-get install -y cmake gcc g++ automake autoconf libtool make build-essential wget
wget -q https://armkeil.blob.core.windows.net/developer/Files/downloads/gnu-rm/10-2020q4/gcc-arm-none-eabi-10-2020-q4-major-x86_64-linux.tar.bz2
- name: Install Compiler
run: |
tar jxf gcc-arm-none-eabi-10-2020-q4-major-x86_64-linux.tar.bz2
mv gcc-arm-none-eabi-10-2020-q4-major ./gcc-arm-none-eabi
rm gcc-arm-none-eabi-10-2020-q4-major-x86_64-linux.tar.bz2
- name: Configure CMake
run: |
PATH="$PATH:/home/runner/work/miniFOC/miniFOC/gcc-arm-none-eabi/bin" && echo $PATH
mkdir build -p && cd build && cmake ../program
- name: Build Hex
run: |
PATH="$PATH:/home/runner/work/miniFOC/miniFOC/gcc-arm-none-eabi/bin" && echo $PATH
cd build && ls && make && ls
- name: Upload Hex
uses: actions/upload-artifact@v2
with:
name: miniFOC-hex
path: build/miniFOC.hex