forked from BenjaminSoelberg/openchronos-ng-elf
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcircle.yml
77 lines (63 loc) · 3.06 KB
/
circle.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
# circle.yml: Build file for CircleCI
#
# Copyright (C) 2016 Benjamin Sølberg <[email protected]>
#
# http://github.com/BenjaminSoelberg/openchronos-ng-elf
#
# This file is part of openchronos-ng.
#
# openchronos-ng is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# openchronos-ng is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
machine:
environment:
MSP430_TI: $HOME/msp430-elf-gcc
PATH: $PATH:$MSP430_TI/bin
pre:
- echo setup ll alias for later ssh login
- echo alias ll=\'ls -al\' >> ~/.bash_profile
dependencies:
pre:
- echo Install github release go package
- if [ ! -e /home/ubuntu/.go_workspace/bin/github-release ]; then go get github.com/BenjaminSoelberg/github-release; fi
- echo Downloading msp430 elf gcc compiler...
- wget https://circle-artifacts.com/gh/BenjaminSoelberg/msp430-elf/4/artifacts/0/tmp/circle-artifacts.QiqE80U/msp430-elf-gcc-without-mspdebug_3.05.00.00_ubuntu_x64.tar.gz -O $HOME/msp430-elf-gcc.tar.gz
- echo Installing msp430 elf gcc compiler...
- cd $HOME && tar xvf msp430-elf-gcc.tar.gz | tail
override:
- echo Cleaning openchronos-ng-elf...
- make clean
- echo copying build configuration files...
- cp modinit.c.circle modinit.c
- cp config.h.circle config.h
- echo Building openchronos-ng-elf...
- make
post:
- echo Build a firmware pre-release package
- tar -cvzf openchronos-ng-elf-latest-firmware.tgz openchronos.txt openchronos.elf README.md
- echo Removing LATEST tag from repo
- git tag -d LATEST || true
- git push origin :refs/tags/LATEST || true
- echo Delete LATEST pre-release, if exists \(hence the \'\|\| true\' in next line\)
- github-release delete -s $GITHUB_USER_TOKEN -u $CIRCLE_PROJECT_USERNAME -r $CIRCLE_PROJECT_REPONAME -t LATEST || true
- echo Create LATEST pre-release
- github-release release -s $GITHUB_USER_TOKEN -u $CIRCLE_PROJECT_USERNAME -r $CIRCLE_PROJECT_REPONAME -t LATEST -n "Latest snapshot" -d "This is the latest snapshot build by CircleCI." -c $CIRCLE_BRANCH -p
- echo Attach pre-release firmware package
- github-release upload -s $GITHUB_USER_TOKEN -u $CIRCLE_PROJECT_USERNAME -r $CIRCLE_PROJECT_REPONAME -t LATEST -n "openchronos-ng-elf-latest-firmware.tgz" -l "openchronos-ng-elf-latest-firmware.tgz" -f openchronos-ng-elf-latest-firmware.tgz
- echo No need for caching of source or downloaded packages
- rm -rf /home/ubuntu/.go_workspace/src /home/ubuntu/.go_workspace/pkg
test:
override:
- echo "No tests yet."
general:
artifacts:
- "openchronos-ng-elf-latest-firmware.tgz"