|
| 1 | +name: Continuous Integration |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: |
| 6 | + - master |
| 7 | + pull_request: |
| 8 | + branches: |
| 9 | + - master |
| 10 | + |
| 11 | +jobs: |
| 12 | + build_stable_nix: |
| 13 | + name: Build stable *nix |
| 14 | + runs-on: ${{ matrix.os }}-latest |
| 15 | + strategy: |
| 16 | + fail-fast: false |
| 17 | + matrix: |
| 18 | + os: [ubuntu, macOS] |
| 19 | + |
| 20 | + steps: |
| 21 | + - name: Checkout |
| 22 | + uses: actions/checkout@v1 |
| 23 | + - name: Install Rust |
| 24 | + uses: actions-rs/toolchain@v1 |
| 25 | + with: |
| 26 | + profile: minimal |
| 27 | + toolchain: stable |
| 28 | + override: true |
| 29 | + components: rustfmt |
| 30 | + - name: Check formatting |
| 31 | + uses: actions-rs/cargo@v1 |
| 32 | + with: |
| 33 | + command: fmt |
| 34 | + args: --all -- --check |
| 35 | + - name: Build debug |
| 36 | + uses: actions-rs/cargo@v1 |
| 37 | + with: |
| 38 | + command: build |
| 39 | + - name: Build release |
| 40 | + uses: actions-rs/cargo@v1 |
| 41 | + with: |
| 42 | + command: build |
| 43 | + args: --release |
| 44 | + - name: Run tests |
| 45 | + uses: actions-rs/cargo@v1 |
| 46 | + with: |
| 47 | + command: test |
| 48 | + |
| 49 | + build_stable_win: |
| 50 | + name: Build stable Windows |
| 51 | + runs-on: windows-latest |
| 52 | + |
| 53 | + steps: |
| 54 | + - name: Checkout |
| 55 | + uses: actions/checkout@v1 |
| 56 | + - name: Install Rust |
| 57 | + uses: actions-rs/toolchain@v1 |
| 58 | + with: |
| 59 | + profile: minimal |
| 60 | + toolchain: stable |
| 61 | + override: true |
| 62 | + components: rustfmt |
| 63 | + - name: Check formatting |
| 64 | + uses: actions-rs/cargo@v1 |
| 65 | + with: |
| 66 | + command: fmt |
| 67 | + args: --all -- --check |
| 68 | + - name: Install openssl |
| 69 | + run: | |
| 70 | + vcpkg search openssl |
| 71 | + vcpkg install openssl:x64-windows |
| 72 | + vcpkg list |
| 73 | + - name: Build debug |
| 74 | + env: |
| 75 | + VCPKGRS_DYNAMIC: ${{ 1 }} |
| 76 | + run: | |
| 77 | + vcpkg integrate install |
| 78 | + cargo build |
| 79 | + - name: Build release |
| 80 | + env: |
| 81 | + VCPKGRS_DYNAMIC: ${{ 1 }} |
| 82 | + run: | |
| 83 | + vcpkg integrate install |
| 84 | + cargo build --release |
| 85 | + - name: Run tests |
| 86 | + env: |
| 87 | + VCPKGRS_DYNAMIC: ${{ 1 }} |
| 88 | + run: | |
| 89 | + vcpkg integrate install |
| 90 | + cargo test |
| 91 | +
|
| 92 | + build_nightly: |
| 93 | + name: Build beta & nightly |
| 94 | + runs-on: macOS-latest |
| 95 | + strategy: |
| 96 | + fail-fast: false |
| 97 | + matrix: |
| 98 | + rust: [beta, nightly] |
| 99 | + |
| 100 | + steps: |
| 101 | + - name: Checkout |
| 102 | + uses: actions/checkout@v1 |
| 103 | + - name: Install Rust |
| 104 | + uses: actions-rs/toolchain@v1 |
| 105 | + with: |
| 106 | + profile: minimal |
| 107 | + toolchain: ${{ matrix.rust }} |
| 108 | + override: true |
| 109 | + - name: Build debug |
| 110 | + continue-on-error: true |
| 111 | + uses: actions-rs/cargo@v1 |
| 112 | + with: |
| 113 | + command: build |
| 114 | + |
| 115 | + docs: |
| 116 | + name: Docs |
| 117 | + runs-on: macOS-latest |
| 118 | + |
| 119 | + steps: |
| 120 | + - name: Checkout |
| 121 | + uses: actions/checkout@v1 |
| 122 | + - name: Install Rust |
| 123 | + uses: actions-rs/toolchain@v1 |
| 124 | + with: |
| 125 | + profile: minimal |
| 126 | + toolchain: stable |
| 127 | + override: true |
| 128 | + - name: Build docs |
| 129 | + uses: actions-rs/cargo@v1 |
| 130 | + with: |
| 131 | + command: doc |
| 132 | + args: --no-deps |
0 commit comments