Skip to content

Commit

Permalink
Merge branch 'master' of github.com:actix/actix-web
Browse files Browse the repository at this point in the history
  • Loading branch information
fafhrd91 committed Jan 10, 2020
2 parents f6ff056 + 51ab4fb commit 39f4b2b
Show file tree
Hide file tree
Showing 7 changed files with 148 additions and 71 deletions.
59 changes: 59 additions & 0 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: CI (macOS)

on: [push, pull_request]

jobs:
build_and_test:
strategy:
fail-fast: false
matrix:
version:
- stable
- nightly

name: ${{ matrix.version }} - x86_64-apple-darwin
runs-on: macOS-latest

steps:
- uses: actions/checkout@master

- name: Install ${{ matrix.version }}
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.version }}-x86_64-apple-darwin
profile: minimal
override: true

- name: Generate Cargo.lock
uses: actions-rs/cargo@v1
with:
command: update
- name: Cache cargo registry
uses: actions/cache@v1
with:
path: ~/.cargo/registry
key: ${{ matrix.version }}-x86_64-apple-darwin-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
- name: Cache cargo index
uses: actions/cache@v1
with:
path: ~/.cargo/git
key: ${{ matrix.version }}-x86_64-apple-darwin-cargo-index-${{ hashFiles('**/Cargo.lock') }}
- name: Cache cargo build
uses: actions/cache@v1
with:
path: target
key: ${{ matrix.version }}-x86_64-apple-darwin-cargo-build-${{ hashFiles('**/Cargo.lock') }}

- name: check build
uses: actions-rs/cargo@v1
with:
command: check
args: --all --bins --examples --tests

- name: tests
uses: actions-rs/cargo@v1
with:
command: test
args: --all --all-features --no-fail-fast -- --nocapture
--skip=test_h2_content_length
--skip=test_reading_deflate_encoding_large_random_rustls
67 changes: 0 additions & 67 deletions .github/workflows/main.yml

This file was deleted.

79 changes: 79 additions & 0 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
name: CI (Windows)

on: [push, pull_request]

env:
VCPKGRS_DYNAMIC: 1

jobs:
build_and_test:
strategy:
fail-fast: false
matrix:
version:
- stable
- nightly

name: ${{ matrix.version }} - x86_64-pc-windows-msvc
runs-on: windows-latest

steps:
- uses: actions/checkout@master

- name: Install ${{ matrix.version }}
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.version }}-x86_64-pc-windows-msvc
profile: minimal
override: true

- name: Generate Cargo.lock
uses: actions-rs/cargo@v1
with:
command: update
- name: Cache cargo registry
uses: actions/cache@v1
with:
path: ~/.cargo/registry
key: ${{ matrix.version }}-x86_64-pc-windows-msvc-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
- name: Cache cargo index
uses: actions/cache@v1
with:
path: ~/.cargo/git
key: ${{ matrix.version }}-x86_64-pc-windows-msvc-cargo-index-${{ hashFiles('**/Cargo.lock') }}
- name: Cache cargo build
uses: actions/cache@v1
with:
path: target
key: ${{ matrix.version }}-x86_64-pc-windows-msvc-cargo-build-${{ hashFiles('**/Cargo.lock') }}
- name: Cache vcpkg package
uses: actions/cache@v1
id: cache-vcpkg
with:
path: C:\vcpkg
key: windows_x64-${{ matrix.version }}-vcpkg

- name: Install OpenSSL
if: steps.cache-vcpkg.outputs.cache-hit != 'true'
run: |
vcpkg integrate install
vcpkg install openssl:x64-windows
- name: check build
uses: actions-rs/cargo@v1
with:
command: check
args: --all --bins --examples --tests

- name: tests
uses: actions-rs/cargo@v1
with:
command: test
args: --all --all-features --no-fail-fast -- --nocapture
--skip=test_h2_content_length
--skip=test_reading_deflate_encoding_large_random_rustls
--skip=test_params
--skip=test_simple
--skip=test_expect_continue
--skip=test_http10_keepalive
--skip=test_slow_request
4 changes: 3 additions & 1 deletion actix-http/examples/echo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ use futures::StreamExt;
use http::header::HeaderValue;
use log::info;

fn main() -> io::Result<()> {
#[actix_rt::main]
async fn main() -> io::Result<()> {
env::set_var("RUST_LOG", "echo=info");
env_logger::init();

Expand Down Expand Up @@ -37,4 +38,5 @@ fn main() -> io::Result<()> {
.tcp()
})?
.run()
.await
}
4 changes: 3 additions & 1 deletion actix-http/examples/echo2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ async fn handle_request(mut req: Request) -> Result<Response, Error> {
.body(body))
}

fn main() -> io::Result<()> {
#[actix_rt::main]
async fn main() -> io::Result<()> {
env::set_var("RUST_LOG", "echo=info");
env_logger::init();

Expand All @@ -28,4 +29,5 @@ fn main() -> io::Result<()> {
HttpService::build().finish(handle_request).tcp()
})?
.run()
.await
}
4 changes: 3 additions & 1 deletion actix-http/examples/hello-world.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ use futures::future;
use http::header::HeaderValue;
use log::info;

fn main() -> io::Result<()> {
#[actix_rt::main]
async fn main() -> io::Result<()> {
env::set_var("RUST_LOG", "hello_world=info");
env_logger::init();

Expand All @@ -24,4 +25,5 @@ fn main() -> io::Result<()> {
.tcp()
})?
.run()
.await
}
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
//! configure servers.
//!
//! * [web](web/index.html): This module
//! provide essentials helper functions and types for application registration.
//! provides essential helper functions and types for application registration.
//!
//! * [HttpRequest](struct.HttpRequest.html) and
//! [HttpResponse](struct.HttpResponse.html): These structs
Expand Down

0 comments on commit 39f4b2b

Please sign in to comment.