Skip to content

Commit

Permalink
ci: add initial CI
Browse files Browse the repository at this point in the history
  • Loading branch information
Taowyoo committed Oct 31, 2023
1 parent 80d41fb commit 855e807
Show file tree
Hide file tree
Showing 6 changed files with 223 additions and 1 deletion.
29 changes: 29 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''

---

**Checklist**
* [ ] I've searched the issue tracker for similar bugs.

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. Use one of the examples to connect to `....`
2. ...
3. See error

**Applicable Version(s)**
A list of versions and platforms you've tested with.

**Expected behavior**
A clear and concise description of what you expected to happen.

**Additional context**
Add any other context about the problem here.
33 changes: 33 additions & 0 deletions .github/ISSUE_TEMPLATE/dependency-update.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
name: Dependency Update
about: Request a dependency be updated
title: Dependency update request
labels: ''
assignees: ''

---

<!--
Please note that we are only interested in **semver-incompatible** update requests. Updates to dependencies that are
semver-compatible can be done in dependent projects without needing changes in this repository.
For example, if you are here because you believe Rustls is bringing in dependency `foo` at version `0.2.1` and
you wish Rustls used `0.2.2` instead, you should not file an issue and instead should run `cargo update` in your
dependent project. It would only be appropriate to file an issue if you require Rustls use `foo` at version `0.3.0+`.
-->

**Checklist**
* [ ] I've searched the issue tracker for similar requests
* [ ] I've confirmed my request is for a semver-incompatible update

**Is your dependency update request related to a problem? Please describe.**
A clear and concise description of what the problem is.

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
23 changes: 23 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''

---

**Checklist**
* [ ] I've searched the issue tracker for similar requests

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
15 changes: 15 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
version: 2
updates:
- package-ecosystem: cargo
directory: "/"
schedule:
interval: weekly
open-pull-requests-limit: 10
groups:
crates-io:
patterns:
- "*"
- package-ecosystem: github-actions
directory: "/"
schedule:
interval: weekly
112 changes: 112 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
name: rustls-mbedcrypto-provider

permissions:
contents: read

on:
push:
pull_request:
merge_group:
schedule:
- cron: '0 18 * * *'

jobs:
build:
name: Build+test
runs-on: ${{ matrix.os }}
strategy:
matrix:
# test a bunch of toolchains on ubuntu
rust:
- stable
- beta
- nightly
os: [ubuntu-20.04]
# but only stable on macos/windows (slower platforms)
include:
- os: macos-latest
rust: stable
- os: windows-latest
rust: stable
steps:
- name: Checkout sources
uses: actions/checkout@v4
with:
persist-credentials: false

- name: Install ${{ matrix.rust }} toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}

- name: cargo build (debug; default features)
run: cargo build --locked

- name: cargo test (debug; all features)
run: cargo test --locked --all-features
env:
RUST_BACKTRACE: 1

msrv:
name: MSRV
runs-on: ubuntu-20.04
steps:
- name: Checkout sources
uses: actions/checkout@v4
with:
persist-credentials: false

- uses: dtolnay/rust-toolchain@master
with:
toolchain: "1.61"

- run: cargo check --locked --lib --all-features -p rustls-mbedcrypto-provider

features:
name: Features
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4
with:
persist-credentials: false

- name: Install stable toolchain
uses: dtolnay/rust-toolchain@stable

- name: cargo build (debug; default features)
run: cargo build --locked

- name: cargo test (debug; default features)
run: cargo test --locked
env:
RUST_BACKTRACE: 1

- name: cargo test (debug; no default features)
run: cargo test --locked --no-default-features

- name: cargo test (debug; no default features; tls12)
run: cargo test --locked --no-default-features --features tls12

- name: cargo test (debug; no default features; tls12, rdrand)
run: cargo test --locked --no-default-features --features tls12,rdrand

- name: cargo test (release; no run)
run: cargo test --locked --release --no-run

format:
name: Format
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Install rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt
- name: Check formatting
run: cargo fmt --all -- --check


12 changes: 11 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
.vscode/
target/

*.gcda
*.gcno
*.info
sslkeylogfile.txt
admin/rustfmt
.DS_Store
._.DS_Store
**/.DS_Store
**/._.DS_Store
/.idea
/default.profraw

0 comments on commit 855e807

Please sign in to comment.