-
-
Notifications
You must be signed in to change notification settings - Fork 115
63 lines (53 loc) · 1.32 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
name: Build EmuFlight
on:
push:
tags:
- '*'
pull_request:
branches:
- '*'
jobs:
build:
strategy:
max-parallel: 1
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Version String
id: get_version
run: echo "::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}"
- name: Setup Python
uses: actions/setup-python@v1
- name: Setup Toolchain
uses: fiam/arm-none-eabi-gcc@v1
with:
release: '9-2019-q4' # The arm-none-eabi-gcc release to use.
- name: Take the trash out
run: |
sudo swapoff -a
sudo rm -f /swapfile
sudo apt clean
docker rmi -f $(docker image ls -aq)
sync
df -h
- name: Compile Code
run: |
make all
- name: Store Artifacts
uses: actions/upload-artifact@v2-preview
with:
name: EmuFlight-${{ steps.get_version.outputs.VERSION }}-${{ github.run_number }}
path: obj/*.hex
continue-on-error: true
- name: Release Binaries
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
prerelease: true
draft: true
files: obj/*.hex
env:
GITHUB_TOKEN: ${{ secrets.release_token }}