Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin' into threadname
Browse files Browse the repository at this point in the history
  • Loading branch information
carllerche committed Jul 23, 2020
2 parents 81794ef + cbb4abc commit 9f74eb4
Show file tree
Hide file tree
Showing 209 changed files with 8,766 additions and 3,718 deletions.
4 changes: 2 additions & 2 deletions .cirrus.yml
@@ -1,5 +1,5 @@
freebsd_instance:
image: freebsd-12-0-release-amd64
image: freebsd-12-1-release-amd64

# Test FreeBSD in a full VM on cirrus-ci.com. Test the i686 target too, in the
# same VM. The binary will be built in 32-bit mode, but will execute on a
Expand Down Expand Up @@ -39,4 +39,4 @@ task:
# i686_test_script:
# - . $HOME/.cargo/env
# - |
# cargo test --all --exclude tokio-tls --exclude tokio-macros --target i686-unknown-freebsd
# cargo test --all --exclude tokio-macros --target i686-unknown-freebsd
51 changes: 0 additions & 51 deletions .github/ISSUE_TEMPLATE.md

This file was deleted.

36 changes: 36 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
@@ -0,0 +1,36 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: A-tokio, C-bug
assignees: ''

---

**Version**
List the versions of all `tokio` crates you are using. The easiest way to get
this information is using `cargo-tree`.

`cargo install cargo-tree`
(see install here: https://github.com/sfackler/cargo-tree)

Then:

`cargo tree | grep tokio`

**Platform**
The output of `uname -a` (UNIX), or version and 32 or 64-bit (Windows)

**Description**
Enter your issue details here.
One way to structure the description:

[short summary of the bug]

I tried this code:

[code sample that causes the bug]

I expected to see this happen: [explanation]

Instead, this happened: [explanation]
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: A-tokio, C-feature-request
assignees: ''

---

**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.
16 changes: 16 additions & 0 deletions .github/ISSUE_TEMPLATE/question.md
@@ -0,0 +1,16 @@
---
name: Question
about: Please use the discussions tab for questions
title: ''
labels: ''
assignees: ''

---

Please post your question as a discussion here:
https://github.com/tokio-rs/tokio/discussions


You may also be able to find help here:
https://discord.gg/tokio
https://users.rust-lang.org/
3 changes: 3 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Expand Up @@ -5,6 +5,9 @@ the requirements below.
Bug fixes and new features should include tests.
Contributors guide: https://github.com/tokio-rs/tokio/blob/master/CONTRIBUTING.md
The contributors guide includes instructions for running rustfmt and building the
documentation, which requires special commands beyond `cargo fmt` and `cargo doc`.
-->

## Motivation
Expand Down
22 changes: 22 additions & 0 deletions .github/workflows/audit.yml
@@ -0,0 +1,22 @@
name: Security Audit

on:
push:
branches:
- master
paths:
- '**/Cargo.toml'
schedule:
- cron: '0 2 * * *' # run at 2 AM UTC

jobs:
security-audit:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, 'ci skip')"
steps:
- uses: actions/checkout@v2

- name: Audit Check
uses: actions-rs/audit-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
32 changes: 32 additions & 0 deletions .github/workflows/pr-audit.yml
@@ -0,0 +1,32 @@
name: Pull Request Security Audit

on:
push:
paths:
- '**/Cargo.toml'
pull_request:
paths:
- '**/Cargo.toml'

jobs:
security-audit:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, 'ci skip')"
steps:
- uses: actions/checkout@v2

- name: Install cargo-audit
uses: actions-rs/cargo@v1
with:
command: install
args: cargo-audit

- name: Generate lockfile
uses: actions-rs/cargo@v1
with:
command: generate-lockfile

- name: Audit dependencies
uses: actions-rs/cargo@v1
with:
command: audit
129 changes: 129 additions & 0 deletions .github/workflows/test_tokio.yml
@@ -0,0 +1,129 @@
on:
push:
branches: ["master"]
pull_request:
branches: ["master"]

name: Test tokio

env:
RUSTFLAGS: -Dwarnings
RUST_BACKTRACE: 1
nightly: nightly-2020-01-25

jobs:
test_tokio:
name: Test tokio full
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- windows-latest
- ubuntu-latest
- macos-latest
steps:
- uses: actions/checkout@master
- name: Install Rust
run: rustup update stable

# Run `tokio` with only `full`
- uses: actions-rs/cargo@v1
with:
command: test
args: --manifest-path ${{ github.workspace }}/tokio/Cargo.toml --features full
name: tokio - cargo test --features full

# Run `tokio` with "unstable" cfg flag
- uses: actions-rs/cargo@v1
with:
command: test
args: --manifest-path ${{ github.workspace }}/tokio/Cargo.toml --features full
env:
RUSTFLAGS: '--cfg tokio_unstable'
name: tokio - cargo test --features full --cfg tokio_unstable

test_cross_subcrates:
name: Test ${{ matrix.crate }} (${{ matrix.os }}) all-features
runs-on: ${{ matrix.os }}
strategy:
matrix:
crate:
- tokio
- tests-integration
os:
- windows-latest
- ubuntu-latest
- macos-latest
include:
- crate: tokio-macros
os: ubuntu-latest
- crate: tokio-test
os: ubuntu-latest
- crate: tokio-util
os: ubuntu-latest
- crate: examples
os: ubuntu-latest

steps:
- uses: actions/checkout@master
- name: Install Rust
run: rustup update stable

# Run with all crate features
- name: ${{ matrix.crate }} - cargo test --all-features
uses: actions-rs/cargo@v1
with:
command: test
args: --manifest-path ${{ github.workspace }}/${{ matrix.crate }}/Cargo.toml --all-features

# Check benches
- name: ${{ matrix.crate }} - cargo check --benches
uses: actions-rs/cargo@v1
with:
command: check
args: --manifest-path ${{ github.workspace }}/${{ matrix.crate }}/Cargo.toml --all-features --benches

- name: Patch Cargo.toml
shell: bash
run: |
set -e
# Remove any existing patch statements
mv Cargo.toml Cargo.toml.bck
sed -n '/\[patch.crates-io\]/q;p' Cargo.toml.bck > Cargo.toml
# Patch all crates
cat ci/patch.toml >> Cargo.toml
# Print `Cargo.toml` for debugging
echo "~~~~ Cargo.toml ~~~~"
cat Cargo.toml
echo "~~~~~~~~~~~~~~~~~~~~"
# Run with all crate features
- name: ${{ matrix.crate }} - cargo test --all-features
uses: actions-rs/cargo@v1
with:
command: test
args: --manifest-path ${{ github.workspace }}/${{ matrix.crate }}/Cargo.toml --all-features

test_integration:
name: Integration tests
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- windows-latest
- ubuntu-latest
- macos-latest
steps:
- uses: actions/checkout@master
- name: Install Rust
run: rustup update stable
- run: cargo install cargo-hack
name: Install cargo-hack
- uses: actions-rs/cargo@v1
name: cargo hack test --each-feature
with:
command: hack
args: test --manifest-path ${{ github.workspace }}/tests-integration/Cargo.toml --each-feature

0 comments on commit 9f74eb4

Please sign in to comment.