Skip to content

Commit

Permalink
Merge pull request #78 from patrickelectric/fix_cross_ci
Browse files Browse the repository at this point in the history
Fix cross in CI
  • Loading branch information
TheWaWaR authored Jan 26, 2023
2 parents 7ebcb27 + 6ebcb1a commit df02b4d
Show file tree
Hide file tree
Showing 3 changed files with 148 additions and 7 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
- uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --all-targets --all-features -- -F warnings
args: --all-targets --all-features -- -D warnings

test:
name: Unitest (${{ matrix.os }})
Expand All @@ -53,7 +53,7 @@ jobs:
- uses: actions-rs/cargo@v1
env:
RUST_BACKTRACE: full
RUSTFLAGS: -F warnings
RUSTFLAGS: -D warnings
with:
command: test
args: --all --all-features
Expand All @@ -80,7 +80,7 @@ jobs:
target: x86_64-pc-windows-msvc
env:
BINARY_EXTENSION: ${{ endsWith(matrix.target, '-msvc') && '.exe' || '' }}
PATH_BINARY: ${{ github.workspace }}/target/release/simple-http-server${{ endsWith(matrix.target, '-msvc') && '.exe' || '' }}
PATH_BINARY: ${{ github.workspace }}/target/${{ matrix.TARGET }}/release/simple-http-server${{ matrix.EXTENSION }}${{ endsWith(matrix.target, '-msvc') && '.exe' || '' }}
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
Expand All @@ -91,8 +91,9 @@ jobs:
target: ${{ matrix.target }}
- uses: actions-rs/cargo@v1
with:
use-cross: true
command: build
args: --release --bin simple-http-server --locked
args: --release --bin simple-http-server --locked --target=${{ matrix.TARGET }} --no-default-features --features=rustls
- uses: actions/upload-artifact@v2
with:
name: ${{ matrix.target }}-simple-http-server${{ env.BINARY_EXTENSION }}
Expand Down
139 changes: 139 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ rand = "0.8.3"
url = "2.1.0"
hyper-native-tls = { version = "0.3.0", optional = true }
openssl = { version = "0.10", features = ["vendored"], optional = true }
rustls = { version = "0.20", optional = true }
mime_guess = "2.0"
open = "1"
# Iron crates
Expand All @@ -33,6 +34,6 @@ percent-encoding = "2.1.0"
path-dedot = "1"

[features]
default = ["tls"]
only-openssl = ["tls", "openssl"]
tls = ["hyper-native-tls"]
default = ["native-tls"]
only-openssl = ["native-tls", "openssl"]
native-tls = ["hyper-native-tls"]

0 comments on commit df02b4d

Please sign in to comment.