Skip to content

Commit df02b4d

Browse files
authored
Merge pull request #78 from patrickelectric/fix_cross_ci
Fix cross in CI
2 parents 7ebcb27 + 6ebcb1a commit df02b4d

File tree

3 files changed

+148
-7
lines changed

3 files changed

+148
-7
lines changed

.github/workflows/build.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
- uses: actions-rs/clippy-check@v1
3636
with:
3737
token: ${{ secrets.GITHUB_TOKEN }}
38-
args: --all-targets --all-features -- -F warnings
38+
args: --all-targets --all-features -- -D warnings
3939

4040
test:
4141
name: Unitest (${{ matrix.os }})
@@ -53,7 +53,7 @@ jobs:
5353
- uses: actions-rs/cargo@v1
5454
env:
5555
RUST_BACKTRACE: full
56-
RUSTFLAGS: -F warnings
56+
RUSTFLAGS: -D warnings
5757
with:
5858
command: test
5959
args: --all --all-features
@@ -80,7 +80,7 @@ jobs:
8080
target: x86_64-pc-windows-msvc
8181
env:
8282
BINARY_EXTENSION: ${{ endsWith(matrix.target, '-msvc') && '.exe' || '' }}
83-
PATH_BINARY: ${{ github.workspace }}/target/release/simple-http-server${{ endsWith(matrix.target, '-msvc') && '.exe' || '' }}
83+
PATH_BINARY: ${{ github.workspace }}/target/${{ matrix.TARGET }}/release/simple-http-server${{ matrix.EXTENSION }}${{ endsWith(matrix.target, '-msvc') && '.exe' || '' }}
8484
steps:
8585
- uses: actions/checkout@v2
8686
- uses: actions-rs/toolchain@v1
@@ -91,8 +91,9 @@ jobs:
9191
target: ${{ matrix.target }}
9292
- uses: actions-rs/cargo@v1
9393
with:
94+
use-cross: true
9495
command: build
95-
args: --release --bin simple-http-server --locked
96+
args: --release --bin simple-http-server --locked --target=${{ matrix.TARGET }} --no-default-features --features=rustls
9697
- uses: actions/upload-artifact@v2
9798
with:
9899
name: ${{ matrix.target }}-simple-http-server${{ env.BINARY_EXTENSION }}

Cargo.lock

Lines changed: 139 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ rand = "0.8.3"
2222
url = "2.1.0"
2323
hyper-native-tls = { version = "0.3.0", optional = true }
2424
openssl = { version = "0.10", features = ["vendored"], optional = true }
25+
rustls = { version = "0.20", optional = true }
2526
mime_guess = "2.0"
2627
open = "1"
2728
# Iron crates
@@ -33,6 +34,6 @@ percent-encoding = "2.1.0"
3334
path-dedot = "1"
3435

3536
[features]
36-
default = ["tls"]
37-
only-openssl = ["tls", "openssl"]
38-
tls = ["hyper-native-tls"]
37+
default = ["native-tls"]
38+
only-openssl = ["native-tls", "openssl"]
39+
native-tls = ["hyper-native-tls"]

0 commit comments

Comments
 (0)