-
Notifications
You must be signed in to change notification settings - Fork 354
/
config.yml
154 lines (132 loc) · 3.15 KB
/
config.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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
build: &build
docker:
- image: majorz/rust-$CIRCLE_JOB:rust-1.23.0
environment:
BINARY: wifi-connect
TARGET_OS: linux
steps:
- checkout
- run: cargo build --release --target=$TARGET
- run: cross-strip target/$TARGET/release/$BINARY
- run: |
VERSION=$CIRCLE_TAG
if [ -z "$CIRCLE_TAG" ]; then VERSION="$CIRCLE_BRANCH-$(echo $CIRCLE_SHA1 | cut -c -7)"; fi
echo "VERSION=$VERSION"
echo "export VERSION=$VERSION" >> $BASH_ENV
- run: |
ARCHIVE_NAME="$BINARY-$VERSION-$TARGET_OS-$CIRCLE_JOB.tar.gz"
echo "ARCHIVE_NAME=$ARCHIVE_NAME"
echo "export ARCHIVE_NAME=$ARCHIVE_NAME" >> $BASH_ENV
- run: |
ARCHIVE_PATH="/tmp/dist/$ARCHIVE_NAME"
echo "ARCHIVE_PATH=$ARCHIVE_PATH"
echo "export ARCHIVE_PATH=$ARCHIVE_PATH" >> $BASH_ENV
- run: mkdir -p pack /tmp/dist
- run: mv target/$TARGET/release/$BINARY pack/$BINARY
- run: cp -R ui pack/ui
- run: tar -czvf $ARCHIVE_PATH -C pack .
- run: rm -rdf pack
- store_artifacts:
path: /tmp/dist
destination: /
version: 2
jobs:
aarch64:
<<: *build
environment:
TARGET: aarch64-unknown-linux-gnu
rpi:
<<: *build
environment:
TARGET: arm-unknown-linux-gnueabihf
armv7hf:
<<: *build
environment:
TARGET: armv7-unknown-linux-gnueabihf
i386:
<<: *build
environment:
TARGET: i686-unknown-linux-gnu
amd64:
<<: *build
environment:
TARGET: x86_64-unknown-linux-gnu
test:
docker:
- image: majorz/rust-test-deploy:rust-nightly-2018-01-08
steps:
- checkout
- run: cargo fmt -- --write-mode=diff
- run: cargo clippy -- -D warnings
deploy:
docker:
- image: majorz/rust-test-deploy:rust-nightly-2018-01-08
environment:
GITHUB_USER: balena-io
GITHUB_REPO: wifi-connect
steps:
- checkout
- deploy:
command: ./scripts/deploy.sh
workflows:
version: 2
build:
jobs:
- test:
filters:
branches:
only: /.*/
tags:
only: /.*/
- aarch64:
requires:
- test
filters:
branches:
only: /.*/
tags:
only: /.*/
- rpi:
requires:
- test
filters:
branches:
only: /.*/
tags:
only: /.*/
- armv7hf:
requires:
- test
filters:
branches:
only: /.*/
tags:
only: /.*/
- i386:
requires:
- test
filters:
branches:
only: /.*/
tags:
only: /.*/
- amd64:
requires:
- test
filters:
branches:
only: /.*/
tags:
only: /.*/
- deploy:
requires:
- aarch64
- rpi
- armv7hf
- i386
- amd64
filters:
branches:
only: /.*/
tags:
only: /.*/