Skip to content

Commit 81d791c

Browse files
neuronullBusyJayalexcrichtonalexmsizanoen1
authored
Release/111 (#1)
* only build necessary target (alexcrichton#43) * Bump to 111.6.1+1.1.1d * Update checkout actions reference * Fixed apparent typo in the readme (alexcrichton#46) * Work around upstream cargo issues * Add handling for target riscv64gc-unknown-linux-gnu (alexcrichton#48) * Disable asmjs for now * Allow to specify custom path for Perl (alexcrichton#49) * Allow to specify custom path for Perl Env var OPENSSL_SRC_PERL can be set to specify a path to the perl binary to use to call the openssl perl scripts. Resolves alexcrichton#45 * Fallback to PERL env var if OPENSSL_SRC_PERL is not set * Add support for non-x86 archs on FreeBSD (alexcrichton#50) Caused by: process didn't exit successfully: `.../rust-bootstrap/work-aarch64/rustc-1.40.0-src/build/x86_64-unknown-freebsd/stage1-tools/release/build/openssl-sys-4b2d35028bf73953/build-script-main` (exit code: 101) --- stdout cargo:rustc-cfg=const_fn --- stderr thread 'main' panicked at 'don't know how to configure OpenSSL for aarch64-unknown-freebsd', .../rust-bootstrap/work-aarch64/rustc-1.40.0-src/vendor/openssl-src/src/lib.rs:178:18 * Update CI installation of Rust on macos~ * support for illumos systems (alexcrichton#52) Resolves alexcrichton#51 * More comment out of asmjs * Use gmake by default on all DragonFlyBSD, FreeBSD or Solaris targets (alexcrichton#53) * Bump to 1.1.1e (alexcrichton#54) * Add support for illumos triple (alexcrichton#56) * Bump to 1.1.1f (alexcrichton#58) * Release 111.8.1+1.1.1f * Bump to 1.1.1g * Do not overwrite AR and RANLIB env vars if set (alexcrichton#62) * Add engine support for linux-gnu (alexcrichton#63) * add engine support for linux-gnu Signed-off-by: Xintao <[email protected]> * address comment Signed-off-by: Xintao <[email protected]> * add blacklist os Signed-off-by: Xintao <[email protected]> * add blacklist os Signed-off-by: Xintao <[email protected]> * To check CI build info Signed-off-by: Xintao <[email protected]> * add comments Signed-off-by: Xintao <[email protected]> * Bump to 111.10.0+1.1.1g * Fix build on macOS with latest cc crate (alexcrichton#67) cc v1.0.58 broke the macOS build by including the "-arch" flag in the default set of compiler flags. Strip it out, like we do for iOS targets. Closes alexcrichton#66. * Bump to 111.10.1+1.1.1g * add optional features for less used algorithms (alexcrichton#68) This commit disables by default a few of the weaker cryptographical algorithms into a "weak-crypto" feature as well as some of the less used algorithms into their own specific features. These algorithms are not directly exposed through the rust-openssl crate. The compilation of these can be re-enabled by selecting the desired features. This should slightly reduce build time and library size. Signed-off-by: Petre Eftime <[email protected]> * Bump to 111.10.2+1.1.1g * Bump to 1.1.1h (alexcrichton#73) * Add FreeBSD powerpc64le support (alexcrichton#75) FreeBSD PowerPC64LE is a new target. This is needed to cross-build cargo. * Add upstream patch to allow building on aarch64-apple-darwin (alexcrichton#74) * Use fs module convenience methods for MUSL patch * Add upstream patch to allow building on aarch64-apple-darwin Closes alexcrichton#72 * i586 support (alexcrichton#76) * Bump to 111.12.0+1.1.1h * Add aarch64-apple-darwin to CI (alexcrichton#77) * OpenBSD support (alexcrichton#78) * Update OpenSSL to 1.1.1i * Update CI * Remove now no-longer-necessary patches * Support targets `armv7-unknown-linux-gnueabi/musleabi` (alexcrichton#80) Support targets `armv7-unknown-linux-gnueabi` & `armv7-unknown-linux-musleabi` * Make it compile for wasm32-wasi (alexcrichton#81) * Catch more failures on Windows in CI (alexcrichton#84) * Catch more failures on Windows in CI * Link missing library for OpenSSL on MSVC Looks like some functions may pull in user32 functions, so that library needs to be linked. * Try to fix msvc +crt-static builds * Try to see all failures * More output * Fix setting crt-static * More CI tweaks * Add the bin dir to cargo's search path on MSVC That's where it contains the actual dlls needed at runtime * Moved "no-shared" so that also windows statically link to the libraries (alexcrichton#83) * Moved "no-shared" so that windows statically link to the libraries * try reapplying changes * removed shared as it's always false. Co-authored-by: molleafauss <[email protected]> * Bump to OpenSSL 1.1.1j (alexcrichton#85) * add nasm support for msvc (alexcrichton#87) * add nasm support for windows-msvc This will automatically detect whether nasm.exe is installed and try to enable the assembly language routines. These can also be disabled by set the `OPENSSL_RUST_NO_NASM` environment variable to a non-zero value. * don't use '>> $GITHUB_ENV' to overwrite PATH * remove the windows check in CI * give user more control on the env var * add env var in CI, less acceptable values for env var * fix path format for using bash on windows * 'OPENSSL_RUST_USE_NASM' env var only accept 0 or 1 * Bump to 1.1.1k * Add FreeBSD powerpc support (alexcrichton#90) This is needed to support cargo cross-build for 32-bit powerpc on FreeBSD. * Upgrade to GitHub-native Dependabot (alexcrichton#92) Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> * Support targets `armv5te-unknown-linux-gnueabi/musleabi` (alexcrichton#94) * Support targets `popwerpc64(le)-unknown-linux-musl` (alexcrichton#95) * Support targets `mips64(el)-unknown-linux-muslabi64` (alexcrichton#96) * Support target `s390x-unknown-linux-musl` (alexcrichton#97) * Bump to openssl 1.1.1l (alexcrichton#100) * Bump to 1.1.1m * test on 1.1.1 branch * Fix aarch64-apple-darwin CI (alexcrichton#116) (cherry picked from commit 466ffd2) * Bump to 1.1.1n (alexcrichton#123) * Update "old" windows image on CI (alexcrichton#126) * Bump to 1.1.1o (alexcrichton#136) * Bump to 1.1.1o * Disable arm-linux-androideabi test * Backport wycheproof exclude to 1.1.1 branch (alexcrichton#139) * Backport wycheproof exclude to 1.1.1 branch * Backport exclude CI checks * Backport exclude CI checks * Configure `--openssldir` to its default location (alexcrichton#141) (alexcrichton#142) As pointed out in alexcrichton#140 otherwise certificates and configure is by default looked up in the directory of the build machine itself which is often a writable path. Instead switch the configuration option back to the default recommended in openssl's `INSTALL.md` Closes alexcrichton#140 * Bump to 111.20.0+1.1.1o (alexcrichton#143) * Bump to 1.1.1p (alexcrichton#145) * Bump to 1.1.1q (alexcrichton#147) Co-authored-by: Jay <[email protected]> Co-authored-by: Alex Crichton <[email protected]> Co-authored-by: Alex Gaynor <[email protected]> Co-authored-by: msizanoen1 <[email protected]> Co-authored-by: Franck Royer <[email protected]> Co-authored-by: Tobias Kortkamp <[email protected]> Co-authored-by: Joshua M. Clulow <[email protected]> Co-authored-by: MikaelUrankar <[email protected]> Co-authored-by: Steven Fackler <[email protected]> Co-authored-by: Patrick Mooney <[email protected]> Co-authored-by: Steven Fackler <[email protected]> Co-authored-by: James McMurray <[email protected]> Co-authored-by: Xintao <[email protected]> Co-authored-by: Nikhil Benesch <[email protected]> Co-authored-by: petreeftime <[email protected]> Co-authored-by: Brandon Bergren <[email protected]> Co-authored-by: Jake Goulding <[email protected]> Co-authored-by: Will <[email protected]> Co-authored-by: Jake Goulding <[email protected]> Co-authored-by: kiron1 <[email protected]> Co-authored-by: IceCodeNew <[email protected]> Co-authored-by: Pierre Krieger <[email protected]> Co-authored-by: Alex Malgaroli <[email protected]> Co-authored-by: molleafauss <[email protected]> Co-authored-by: Kane <[email protected]> Co-authored-by: Brandon Bergren <[email protected]> Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> Co-authored-by: messense <[email protected]> Co-authored-by: Alexis Mousset <[email protected]> Co-authored-by: Eric Huss <[email protected]> Co-authored-by: Alexis Mousset <[email protected]>
1 parent 57536cf commit 81d791c

File tree

14 files changed

+318
-137
lines changed

14 files changed

+318
-137
lines changed

.github/dependabot.yml

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: cargo
4+
directory: "/"
5+
schedule:
6+
interval: daily
7+
time: "08:00"
8+
open-pull-requests-limit: 10

.github/workflows/main.yml

+63-86
Original file line numberDiff line numberDiff line change
@@ -1,148 +1,125 @@
11
name: CI
2-
on: [push, pull_request]
2+
on:
3+
push:
4+
branches: [master, release/111]
5+
pull_request:
6+
branches: [master, release/111]
7+
8+
defaults:
9+
run:
10+
shell: bash
311

412
jobs:
513
test:
614
name: Test
715
runs-on: ${{ matrix.os }}
816
strategy:
17+
fail-fast: false
918
matrix:
10-
thing:
11-
- stable
12-
- beta
13-
- nightly
14-
- macos-x86_64
15-
- arm-android
16-
- arm64-android
17-
- i686-android
18-
- x86_64-android
19-
- i686-linux
20-
- arm-linux
21-
- aarch64-linux
22-
- x86_64-musl
23-
- x86_64-mingw
24-
- asmjs
25-
- i686-msvc
26-
- i686-msvc-static
27-
- x86_64-msvc
28-
- x86_64-msvc-static
2919
include:
30-
- thing: stable
31-
target: x86_64-unknown-linux-gnu
20+
- target: x86_64-unknown-linux-gnu
3221
rust: stable
3322
os: ubuntu-latest
34-
- thing: beta
35-
target: x86_64-unknown-linux-gnu
23+
- target: x86_64-unknown-linux-gnu
3624
rust: beta
3725
os: ubuntu-latest
38-
- thing: nightly
39-
target: x86_64-unknown-linux-gnu
26+
- target: x86_64-unknown-linux-gnu
4027
rust: nightly
4128
os: ubuntu-latest
42-
- thing: macos-x86_64
43-
target: x86_64-apple-darwin
29+
- target: x86_64-apple-darwin
4430
rust: stable
4531
os: macos-latest
46-
- thing: arm-android
47-
target: arm-linux-androideabi
48-
rust: stable
49-
os: ubuntu-latest
50-
- thing: arm64-android
51-
target: aarch64-linux-android
52-
rust: stable
53-
os: ubuntu-latest
54-
- thing: i686-android
55-
target: i686-linux-android
32+
- target: aarch64-apple-darwin
33+
rust: nightly
34+
os: macos-latest
35+
#- target: arm-linux-androideabi
36+
# rust: stable
37+
# os: ubuntu-latest
38+
- target: aarch64-linux-android
5639
rust: stable
5740
os: ubuntu-latest
58-
- thing: x86_64-android
59-
target: x86_64-linux-android
41+
- target: i686-linux-android
6042
rust: stable
6143
os: ubuntu-latest
62-
- thing: i686-linux
63-
target: i686-unknown-linux-gnu
44+
- target: x86_64-linux-android
6445
rust: stable
6546
os: ubuntu-latest
66-
- thing: arm-linux
67-
target: arm-unknown-linux-gnueabi
47+
- target: i686-unknown-linux-gnu
6848
rust: stable
6949
os: ubuntu-latest
70-
- thing: aarch64-linux
71-
target: aarch64-unknown-linux-gnu
50+
- target: arm-unknown-linux-gnueabi
7251
rust: stable
7352
os: ubuntu-latest
74-
- thing: x86_64-musl
75-
target: x86_64-unknown-linux-musl
53+
- target: aarch64-unknown-linux-gnu
7654
rust: stable
7755
os: ubuntu-latest
78-
- thing: x86_64-mingw
79-
target: x86_64-pc-windows-gnu
56+
- target: x86_64-unknown-linux-musl
8057
rust: stable
8158
os: ubuntu-latest
82-
- thing: asmjs
83-
target: asmjs-unknown-emscripten
59+
- target: x86_64-pc-windows-gnu
8460
rust: stable
8561
os: ubuntu-latest
86-
- thing: i686-msvc
87-
target: i686-pc-windows-msvc
62+
# - target: asmjs-unknown-emscripten
63+
# rust: stable
64+
# os: ubuntu-latest
65+
- target: i686-pc-windows-msvc
8866
rust: stable-i686-msvc
89-
os: windows-2016
90-
- thing: i686-msvc-static
91-
target: i686-pc-windows-msvc
67+
os: windows-2019
68+
- target: i686-pc-windows-msvc
9269
rust: stable-i686-msvc
93-
os: windows-2016
94-
crt_static: true
95-
- thing: x86_64-msvc
96-
target: x86_64-pc-windows-msvc
70+
os: windows-2019
71+
crt_static: yes
72+
- target: x86_64-pc-windows-msvc
9773
rust: stable-x86_64-msvc
9874
os: windows-latest
99-
- thing: x86_64-msvc-static
100-
target: x86_64-pc-windows-msvc
75+
- target: x86_64-pc-windows-msvc
10176
rust: stable-x86_64-msvc
10277
os: windows-latest
103-
crt_static: true
78+
crt_static: yes
79+
- target: x86_64-pc-windows-msvc
80+
rust: stable-x86_64-msvc
81+
os: windows-latest
82+
nasm_exe: installed
10483

10584
steps:
106-
- uses: actions/checkout@master
85+
- uses: actions/checkout@v1
10786
with:
10887
submodules: true
10988
- name: Install Rust (rustup)
11089
run: rustup update ${{ matrix.rust }} --no-self-update && rustup default ${{ matrix.rust }}
111-
if: matrix.os != 'macos-latest'
112-
shell: bash
113-
- name: Install Rust (macos)
114-
run: |
115-
curl https://sh.rustup.rs | sh -s -- -y
116-
echo ::add-path::$HOME/.cargo/bin
117-
if: matrix.os == 'macos-latest'
11890
- run: rustup target add ${{ matrix.target }}
11991
- name: Set crt-static
12092
if: matrix.crt_static == 'yes'
121-
run: echo ::set-env name=RUSTFLAGS::-Ctarget-feature=+crt-static
122-
shell: bash
93+
run: echo RUSTFLAGS=-Ctarget-feature=+crt-static >> $GITHUB_ENV
12394
- name: Use strawberry perl
12495
if: startsWith(matrix.os, 'windows')
125-
run: echo ::add-path::C:/Strawberry/perl/bin
126-
shell: bash
127-
- run: |
96+
run: echo OPENSSL_SRC_PERL=C:/Strawberry/perl/bin/perl >> $GITHUB_ENV
97+
- name: Run tests (not Windows)
98+
if: "!startsWith(matrix.os, 'windows')"
99+
run: |
128100
set -e
129101
cargo generate-lockfile
130102
./ci/run-docker.sh ${{ matrix.target }}
131-
if: "!startsWith(matrix.os, 'windows')"
132-
name: Run tests (not Windows)
133-
- run: |
134-
cargo test --manifest-path testcrate/Cargo.toml --target ${{ matrix.target }}
135-
cargo test --manifest-path testcrate/Cargo.toml --target ${{ matrix.target }} --release
136-
cargo run --release --target ${{ matrix.target }} --manifest-path testcrate/Cargo.toml --features package
103+
- name: Download nasm.exe (Windows)
104+
if: matrix.nasm_exe == 'installed'
105+
run: |
106+
WINNASMVERSION='2.15.05'
107+
curl -O https://www.nasm.us/pub/nasm/releasebuilds/${WINNASMVERSION}/win64/nasm-${WINNASMVERSION}-win64.zip
108+
unzip nasm-${WINNASMVERSION}-win64.zip
109+
echo "$GITHUB_WORKSPACE\\nasm-${WINNASMVERSION}" >> $GITHUB_PATH
110+
echo "OPENSSL_RUST_USE_NASM=1" >> $GITHUB_ENV
111+
- name: Run tests (Windows)
137112
if: startsWith(matrix.os, 'windows')
138-
name: Run tests (Windows)
139-
shell: cmd
113+
run: |
114+
cargo test --manifest-path testcrate/Cargo.toml --target ${{ matrix.target }} -vv
115+
cargo test --manifest-path testcrate/Cargo.toml --target ${{ matrix.target }} --release -vv
116+
cargo run --release --target ${{ matrix.target }} --manifest-path testcrate/Cargo.toml --features package -vv
140117
141118
rustfmt:
142119
name: Rustfmt
143120
runs-on: ubuntu-latest
144121
steps:
145-
- uses: actions/checkout@master
122+
- uses: actions/checkout@v1
146123
- name: Install Rust
147124
run: rustup update stable && rustup default stable && rustup component add rustfmt
148125
- run: cargo fmt -- --check

Cargo.toml

+18-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "openssl-src"
3-
version = "111.6.0+1.1.1d"
3+
version = "111.22.0+1.1.1q"
44
authors = ["Alex Crichton <[email protected]>"]
55
license = "MIT/Apache-2.0"
66
readme = "README.md"
@@ -14,10 +14,27 @@ exclude = [
1414
'openssl/krb5/*',
1515
'openssl/pyca-cryptography/*',
1616
'openssl/test/*',
17+
'openssl/wycheproof/*',
1718
]
1819

20+
[features]
21+
default = []
22+
# Enables compilation of some older algorithms: md2 (hash), rc5 (block cypher) and enabled use of
23+
# some weaker algorithms in SSL connections. These are generally not recommended for use.
24+
weak-crypto = []
25+
# Enables compilation of the Camellia symmetric key block cypher. Since hardware acceleration for
26+
# it is not available on most systems, this is not as used as AES.
27+
camellia = []
28+
# Enables compilation of International Data Encryption Algorithm (IDEA), a symmetric key block
29+
# cypher sometimes used as an AES128 alternative.
30+
idea = []
31+
# Enables compilation of SEED, a symmetric key block cypher mostly used in South Korea, but
32+
# otherwise not widely supported.
33+
seed = []
34+
1935
[workspace]
2036
members = ['testcrate']
37+
exclude = ['target']
2138

2239
[dependencies]
2340
cc = "1.0"

README.md

+17-1
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,24 @@ This project is licensed under either of
1515

1616
at your option.
1717

18+
### Windows MSVC Assembly
19+
Building OpenSSL for `windows-msvc` targets, users can choose whether to enable
20+
assembly language routines, which requires [nasm](https://www.nasm.us/).
21+
The build process will automatically detect whether `nasm.exe` is installed in
22+
PATH. If found, the assembly language routines will be enabled (in other words,
23+
the `no-asm` option will NOT be configured).
24+
You can manipulate this behavior by setting the `OPENSSL_RUST_USE_NASM` environment
25+
variable:
26+
* `1`: Force enable the assembly language routines. (panic if `nasm.exe` is not
27+
availible.)
28+
* `0`: Force disable the assembly language routines even if the `nasm.exe` can be
29+
found in PATH.
30+
* not set: Let the build process automatically detect whether `nasm.exe` is
31+
installed. If found, enable. If not, disable.
32+
However, this environment variable does not take effects on non-windows platforms.
33+
1834
### Contribution
1935

2036
Unless you explicitly state otherwise, any contribution intentionally submitted
21-
for inclusion in Serde by you, as defined in the Apache-2.0 license, shall be
37+
for inclusion in openssl-src by you, as defined in the Apache-2.0 license, shall be
2238
dual licensed as above, without any additional terms or conditions.

ci/docker/aarch64-linux-android/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ RUN android-ndk-r15b/build/tools/make_standalone_toolchain.py \
2020

2121
ENV PATH=$PATH:/android/ndk/bin \
2222
CARGO_TARGET_AARCH64_LINUX_ANDROID_LINKER=aarch64-linux-android-gcc \
23-
CARGO_TARGET_AARCH64_LINUX_ANDROID_RUNNER=true
23+
CARGO_TARGET_AARCH64_LINUX_ANDROID_RUNNER=echo

ci/docker/aarch64-unknown-linux-gnu/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@ RUN apt-get update -y && apt-get install -y --no-install-recommends \
88
libc6-dev \
99
gcc-aarch64-linux-gnu \
1010
libc6-dev-arm64-cross
11-
ENV CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_RUNNER=true \
11+
ENV CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_RUNNER=echo \
1212
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc

ci/docker/arm-linux-androideabi/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ RUN android-ndk-r15b/build/tools/make_standalone_toolchain.py \
2020

2121
ENV PATH=$PATH:/android/ndk/bin \
2222
CARGO_TARGET_ARM_LINUX_ANDROIDEABI_LINKER=arm-linux-androideabi-gcc \
23-
CARGO_TARGET_ARM_LINUX_ANDROIDEABI_RUNNER=true
23+
CARGO_TARGET_ARM_LINUX_ANDROIDEABI_RUNNER=echo

ci/docker/arm-unknown-linux-gnueabi/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@ RUN apt-get update -y && apt-get install -y --no-install-recommends \
99
gcc-arm-linux-gnueabi \
1010
libc6-dev-armel-cross
1111

12-
ENV CARGO_TARGET_ARM_UNKNOWN_LINUX_GNUEABI_RUNNER=true \
12+
ENV CARGO_TARGET_ARM_UNKNOWN_LINUX_GNUEABI_RUNNER=echo \
1313
CARGO_TARGET_ARM_UNKNOWN_LINUX_GNUEABI_LINKER=arm-linux-gnueabi-gcc

ci/docker/i686-linux-android/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ RUN android-ndk-r15b/build/tools/make_standalone_toolchain.py \
2020

2121
ENV PATH=$PATH:/android/ndk/bin \
2222
CARGO_TARGET_I686_LINUX_ANDROID_LINKER=i686-linux-android-gcc \
23-
CARGO_TARGET_I686_LINUX_ANDROID_RUNNER=true
23+
CARGO_TARGET_I686_LINUX_ANDROID_RUNNER=echo

ci/docker/x86_64-linux-android/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ RUN android-ndk-r15b/build/tools/make_standalone_toolchain.py \
2020

2121
ENV PATH=$PATH:/android/ndk/bin \
2222
CARGO_TARGET_X86_64_LINUX_ANDROID_LINKER=x86_64-linux-android-gcc \
23-
CARGO_TARGET_X86_64_LINUX_ANDROID_RUNNER=true
23+
CARGO_TARGET_X86_64_LINUX_ANDROID_RUNNER=echo

ci/docker/x86_64-pc-windows-gnu/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ RUN apt-get update -y && apt-get install -y --no-install-recommends \
99
gcc-mingw-w64-x86-64
1010

1111
ENV CARGO_TARGET_X86_64_PC_WINDOWS_GNU_LINKER=x86_64-w64-mingw32-gcc \
12-
CARGO_TARGET_X86_64_PC_WINDOWS_GNU_RUNNER=true
12+
CARGO_TARGET_X86_64_PC_WINDOWS_GNU_RUNNER=echo

ci/run.sh

+37-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,39 @@
1+
#!/bin/bash
2+
13
target=$1
4+
testcrate_dir="$(pwd)/testcrate"
25
set -ex
3-
cargo test --manifest-path testcrate/Cargo.toml --target $1 -vv
4-
cargo test --manifest-path testcrate/Cargo.toml --target $1 -vv --release
6+
7+
if [ "$1" = "aarch64-apple-darwin" ] ; then
8+
export CARGO_TARGET_AARCH64_APPLE_DARWIN_RUNNER=echo
9+
fi
10+
11+
cargo test --manifest-path "$testcrate_dir/Cargo.toml" --target $1 -vv
12+
cargo test --manifest-path "$testcrate_dir/Cargo.toml" --target $1 -vv --release
13+
14+
if [ "$1" = "x86_64-unknown-linux-gnu" ] ; then
15+
cargo test --manifest-path "$testcrate_dir/Cargo.toml" --target $1 -vv --all-features
16+
17+
# Run a few tests here:
18+
#
19+
# * Make sure the packaged crate file isn't bigger than 10MB which is
20+
# crate.io's limit.
21+
# * Make sure that the package crate itself works.
22+
#
23+
# A lot of OpenSSL's source code is excluded on crates.io because it makes the
24+
# crate file much too large, so the test here should inform us if we're
25+
# missing anything actually required to build OpenSSL.
26+
rm -rf target/ci
27+
cargo package --allow-dirty --target-dir target/ci
28+
crate=`ls target/ci/package/*.crate`
29+
filesize=$(stat -c%s "$crate")
30+
echo "tarball is $filesize bytes"
31+
if (( filesize > 10000000 )); then
32+
echo "file size too big"
33+
exit 1
34+
fi
35+
rm "$crate"
36+
cd target/ci/package/openssl-src-*
37+
cp -r "$testcrate_dir" .
38+
cargo test --manifest-path "testcrate/Cargo.toml" --target $1 -vv
39+
fi

openssl

Submodule openssl updated 1372 files

0 commit comments

Comments
 (0)