Skip to content

Commit 7993f1d

Browse files
committed
Added CI and badges
1 parent b7cd0ab commit 7993f1d

File tree

6 files changed

+55
-0
lines changed

6 files changed

+55
-0
lines changed

.github/workflows/rust.yml

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: CI
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
windows:
7+
runs-on: windows-latest
8+
steps:
9+
- uses: actions/checkout@v2
10+
- run: ci/set_rust_version.bash ${{ matrix.channel }} ${{ matrix.target }}
11+
shell: bash
12+
- run: ci/test.bash cargo ${{ matrix.target }}
13+
shell: bash
14+
15+
strategy:
16+
fail-fast: false
17+
matrix:
18+
channel: [stable]
19+
target:
20+
- x86_64-pc-windows-msvc
21+
- x86_64-pc-windows-gnu

Cargo.toml

+2
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ publish = false
1313

1414
[package.metadata.docs.rs]
1515
targets = ["x86_64-pc-windows-gnu", "x86_64-pc-windows-msvc"]
16+
no-default-features = true
17+
features = ["ring"]
1618

1719
[dependencies]
1820
rustls = { git = "https://github.com/rustls/rustls.git", default-features = false, features = [

README.md

+6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Windows CNG bridge for rustls
22

3+
[![github actions](https://github.com/ancwrd1/rustls-cng/workflows/CI/badge.svg)](https://github.com/rustls/rustls-cng/actions)
4+
[![crates](https://img.shields.io/crates/v/rustls-cng.svg)](https://crates.io/crates/rustls-cng)
5+
[![license](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
6+
[![license](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
7+
[![docs.rs](https://docs.rs/rustls-cng/badge.svg)](https://docs.rs/rustls-cng)
8+
39
This crate allows you to use the Windows CNG private keys together with [rustls](https://docs.rs/rustls/latest/rustls)
410
for both the client and server sides of the TLS channel.
511

ci/common.bash

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
required_arg() {
2+
if [ -z "$1" ]; then
3+
echo "Required argument $2 missing"
4+
exit 1
5+
fi
6+
}

ci/set_rust_version.bash

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/usr/bin/env bash
2+
set -e
3+
rustup update
4+
rustup default $1
5+
rustup target add $2

ci/test.bash

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/usr/bin/env bash
2+
# Script for building your rust projects.
3+
set -e
4+
5+
source ci/common.bash
6+
7+
# $1 {path} = Path to cross/cargo executable
8+
CROSS=$1
9+
# $2 {string} = <Target Triple>
10+
TARGET_TRIPLE=$2
11+
12+
required_arg $CROSS 'CROSS'
13+
required_arg $TARGET_TRIPLE '<Target Triple>'
14+
15+
$CROSS test --target $TARGET_TRIPLE --no-default-features --features=ring

0 commit comments

Comments
 (0)