-
Notifications
You must be signed in to change notification settings - Fork 5
69 lines (65 loc) · 2.26 KB
/
on_push.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
name: build Rust on push
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
Run_cargo_tests:
name: Test rrss2imap
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
# see https://github.com/marketplace/actions/rust-cargo
# - uses: actions-rs/cargo@v1
# with:
# command: test
# args: --all-features
Standard_OS_build:
name: Build ${{ matrix.config.name }}
runs-on: ${{ matrix.config.os }}
strategy:
matrix:
config:
# See https://help.github.com/en/actions/reference/virtual-environments-for-github-hosted-runners
- { os: ubuntu-latest, name: rrss2imap_linux, path: target/debug/rrss2imap}
- { os: macOS-latest, name: rrss2imap_macOS, path: target/debug/rrss2imap}
- { os: windows-latest, name: rrss2imap.exe, path: target/debug/rrss2imap.exe}
# And this one is the dreaded Raspbian one ...
- { os: ubuntu-latest, name: rrss2imap_raspbian, path: target/armv7-unknown-linux-gnueabihf/debug/rrss2imap, target: armv7-unknown-linux-gnueabihf, linker: gcc-arm-linux-gnueabihf}
steps:
- name: Install linker
run: sudo apt-get update && sudo apt-get install ${{matrix.config.linker}}
if: matrix.config.linker!=null
- uses: actions-rs/[email protected]
with:
toolchain: stable
target: ${{matrix.config.target}}
override: true
if: matrix.config.target!=null
- uses: actions-rs/[email protected]
with:
toolchain: stable
if: matrix.config.target==null
- uses: actions/checkout@master
# see https://github.com/marketplace/actions/rust-cargo
- uses: actions-rs/[email protected]
with:
command: build
# temp
args: --all-features
if: matrix.config.target==null
- uses: actions-rs/[email protected]
with:
use-cross: true
command: build
args: --all-features --target ${{matrix.config.target}}
if: matrix.config.target!=null
- name: Upload build result for OS
uses: actions/upload-artifact@v1
with:
name: ${{matrix.config.name}}
path: ${{matrix.config.path}}
needs: Run_cargo_tests