-
-
Notifications
You must be signed in to change notification settings - Fork 2
78 lines (76 loc) · 2.53 KB
/
ci.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
name: ci
on: [push, pull_request]
env:
RUSTFLAGS: "-D warnings"
jobs:
test:
name: Test
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
rust: [1.78.0, stable, beta, nightly]
env:
VCPKG_ROOT: "${{ github.workspace }}\\vcpkg"
VCPKGRS_TRIPLET: x64-windows-release
# Ensure that OpenSSL is dynamically linked.
VCPKGRS_DYNAMIC: 1
steps:
- name: Checkout repository
uses: actions/checkout@v1
- name: Install Rust
uses: hecrj/setup-rust-action@v2
with:
rust-version: ${{ matrix.rust }}
- if: matrix.os == 'ubuntu-latest'
run: sudo apt-get install -y libssl-dev
- if: matrix.os == 'windows-latest'
id: vcpkg
uses: johnwason/vcpkg-action@v6
with:
pkgs: openssl
triplet: ${{ env.VCPKGRS_TRIPLET }}
token: ${{ github.token }}
github-binarycache: true
- if: matrix.rust == 'stable'
run: rustup component add clippy
- if: matrix.rust == 'stable'
run: cargo clippy --all-features --all-targets -- -D warnings
- if: matrix.rust == 'stable' && matrix.os == 'ubuntu-latest'
run: cargo fmt --all -- --check
- run: cargo check --no-default-features --all-targets
- run: cargo test --all-features
minimal-versions:
name: Check minimal versions
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v1
- name: Install Rust
uses: hecrj/setup-rust-action@v2
with:
rust-version: "1.78.0"
- name: Install nightly Rust
run: rustup install nightly
- name: Check with minimal-versions
run: |
cargo +nightly update -Z minimal-versions
cargo check --all-features --all-targets --locked
extra-tests:
name: Extra tests
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v1
- name: Install Rust
uses: hecrj/setup-rust-action@v2
- name: Install supporting tools/libraries
run: |
# The tests compare their output to that of LDNS tools, so we need to
# install them. Some tests work with DNSSEC keys for which the OpenSSL
# library must be compiled against which requires C build programs and
# pkg-config. Install everything we need.
sudo apt-get update
sudo apt-get install -y build-essential ldnsutils libssl-dev pkg-config
- name: Run tests that are normally ignored
run: cargo test --all-features --all-targets -- --ignored