-
Notifications
You must be signed in to change notification settings - Fork 0
112 lines (112 loc) 路 3.11 KB
/
rust.yaml
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
name: Rust
on:
push:
paths-ignore:
- "cross/**"
branches:
- dev
pull_request:
branches:
- "**"
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: docker/setup-buildx-action@v1
- uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- run: docker pull ghcr.io/conblem/musl-openssl
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
- uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-build-${{ hashFiles('**/Cargo.lock') }}
- uses: actions-rs/cargo@v1
with:
use-cross: true
command: build
args: --target x86_64-unknown-linux-musl --release
- uses: actions-rs/audit-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
- uses: docker/build-push-action@v2
with:
push: true
tags: ghcr.io/conblem/acme-dns-latest:${{ github.sha }}
context: ./
clippy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-clippy-${{ hashFiles('**/Cargo.lock') }}
- name: Annotate commit with clippy warnings
uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --all-features
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ macos-latest, windows-latest, ubuntu-latest ]
toolchain: [ stable, nightly ]
include:
- os: ubuntu-latest
toolchain: stable
coverage: true
steps:
- uses: actions/checkout@v2
- name: install openssl on windows
run: |
vcpkg install openssl:x64-windows-static-md
vcpkg integrate install
if: ${{ matrix.os == 'windows-latest' }}
- uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.toolchain }}
- uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ matrix.os }}-${{ matrix.toolchain }}-coverage--${{ hashFiles('**/Cargo.lock') }}
- uses: actions-rs/cargo@v1
if: ${{ !matrix.coverage }}
with:
command: test
args: --features disable-docker
- uses: actions-rs/tarpaulin@v0.1
if: ${{ matrix.coverage }}
with:
args: "--avoid-cfg-tarpaulin"
- uses: codecov/codecov-action@v1
if: ${{ matrix.coverage }}
with:
fail_ci_if_error: true
fmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
- uses: actions-rs/cargo@v1
with:
command: fmt
args: -- --check