-
Notifications
You must be signed in to change notification settings - Fork 32
78 lines (75 loc) · 2.72 KB
/
main.yml
File metadata and controls
78 lines (75 loc) · 2.72 KB
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
name: CI
on: [push, pull_request]
jobs:
test:
name: Test
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
build: [stable, beta, nightly, arm-gnueabi, arm-gnueabihf]
include:
- build: stable
os: ubuntu-latest
rust: stable
target: x86_64-unknown-linux-gnu
- build: beta
os: ubuntu-latest
rust: beta
target: x86_64-unknown-linux-gnu
- build: nightly
os: ubuntu-latest
rust: nightly
target: x86_64-unknown-linux-gnu
- build: arm-gnueabi
os: ubuntu-latest
rust: stable
target: arm-unknown-linux-gnueabi
packages: "gcc-arm-linux-gnueabi libc6-armel-cross libc6-dev-armel-cross"
- build: arm-gnueabihf
os: ubuntu-latest
rust: stable
target: arm-unknown-linux-gnueabihf
packages: "gcc-arm-linux-gnueabihf libc6-armhf-cross libc6-dev-armhf-cross"
steps:
- run: sudo apt install ${{ matrix.packages }}
- uses: actions/checkout@v1
with:
submodules: true
- name: Install Rust
run: rustup update ${{ matrix.rust }} --no-self-update && rustup default ${{ matrix.rust }} && rustup target add ${{ matrix.target }}
shell: bash
- run: cargo build --target ${{ matrix.target }} --verbose
- run: cargo build --target ${{ matrix.target }} --verbose --no-default-features
- run: cargo build --target ${{ matrix.target }} --verbose --all-features
- run: sudo --preserve-env env "PATH=$PATH" cargo test --verbose
if: contains(matrix.target, 'x86_64')
- run: sudo --preserve-env env "PATH=$PATH" cargo test --all-features --verbose
if: contains(matrix.target, 'x86_64')
rustfmt:
name: Rustfmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Install Rust
run: rustup update stable && rustup default stable && rustup component add rustfmt
- run: cargo fmt -- --check
publish_docs:
name: Publish Documentation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
with:
submodules: true
- name: Install Rust
run: rustup update stable && rustup default stable
- name: Build documentation
run: cargo doc --no-deps --all-features
- name: Publish documentation
run: |
cd target/doc
git init
git add .
git -c user.name='ci' -c user.email='ci' commit -m init
git push -f -q https://git:${{ secrets.github_token }}@github.com/${{ github.repository }} HEAD:gh-pages
if: github.event_name == 'push' && github.event.ref == 'refs/heads/master'