@@ -17,115 +17,138 @@ jobs:
1717 fail-fast : false
1818 matrix :
1919 include :
20- - target : x86_64-unknown-linux-gnu
21- rust : stable
22- os : ubuntu-latest
23- - target : x86_64-unknown-linux-gnu
24- rust : beta
25- os : ubuntu-latest
26- - target : x86_64-unknown-linux-gnu
27- rust : nightly
28- os : ubuntu-latest
29- - target : x86_64-apple-darwin
30- rust : stable
31- os : macos-latest
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
39- # rust: stable
40- # os: ubuntu-latest
41- # - target: i686-linux-android
42- # rust: stable
43- # os: ubuntu-latest
44- # - target: x86_64-linux-android
45- # rust: stable
46- # os: ubuntu-latest
47- - target : i686-unknown-linux-gnu
48- rust : stable
49- os : ubuntu-latest
50- - target : arm-unknown-linux-gnueabi
51- rust : stable
52- os : ubuntu-latest
53- - target : aarch64-unknown-linux-gnu
54- rust : stable
55- os : ubuntu-latest
56- - target : riscv64gc-unknown-linux-gnu
57- rust : stable
58- os : ubuntu-latest
59- - target : loongarch64-unknown-linux-gnu
60- rust : stable
61- os : ubuntu-latest
62- - target : x86_64-unknown-linux-musl
63- rust : stable
64- os : ubuntu-latest
65- - target : x86_64-pc-windows-gnu
66- rust : stable
67- os : ubuntu-latest
68- # - target: wasm32-wasi
69- # rust: stable
70- # os: ubuntu-latest
71- - target : i686-pc-windows-msvc
72- rust : stable-i686-msvc
73- os : windows-2022
74- - target : i686-pc-windows-msvc
75- rust : stable-i686-msvc
76- os : windows-2022
77- crt_static : yes
78- - target : x86_64-pc-windows-msvc
79- rust : stable-x86_64-msvc
80- os : windows-latest
81- - target : x86_64-pc-windows-msvc
82- rust : stable-x86_64-msvc
83- os : windows-latest
84- crt_static : yes
85- - target : x86_64-pc-windows-msvc
86- rust : stable-x86_64-msvc
87- os : windows-latest
88- nasm_exe : installed
20+ - target : x86_64-unknown-linux-gnu
21+ rust : stable
22+ os : ubuntu-latest
23+ - target : x86_64-unknown-linux-gnu
24+ rust : beta
25+ os : ubuntu-latest
26+ - target : x86_64-unknown-linux-gnu
27+ rust : nightly
28+ os : ubuntu-latest
29+ - target : x86_64-apple-darwin
30+ rust : stable
31+ os : macos-latest
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
39+ # rust: stable
40+ # os: ubuntu-latest
41+ # - target: i686-linux-android
42+ # rust: stable
43+ # os: ubuntu-latest
44+ # - target: x86_64-linux-android
45+ # rust: stable
46+ # os: ubuntu-latest
47+ - target : i686-unknown-linux-gnu
48+ rust : stable
49+ os : ubuntu-latest
50+ - target : arm-unknown-linux-gnueabi
51+ rust : stable
52+ os : ubuntu-latest
53+ - target : aarch64-unknown-linux-gnu
54+ rust : stable
55+ os : ubuntu-latest
56+ - target : riscv64gc-unknown-linux-gnu
57+ rust : stable
58+ os : ubuntu-latest
59+ - target : loongarch64-unknown-linux-gnu
60+ rust : stable
61+ os : ubuntu-latest
62+ - target : x86_64-unknown-linux-musl
63+ rust : stable
64+ os : ubuntu-latest
65+ - target : x86_64-pc-windows-gnu
66+ rust : stable
67+ os : ubuntu-latest
68+ # - target: wasm32-wasi
69+ # rust: stable
70+ # os: ubuntu-latest
71+ - target : i686-pc-windows-msvc
72+ rust : stable-i686-msvc
73+ os : windows-2022
74+ - target : i686-pc-windows-msvc
75+ rust : stable-i686-msvc
76+ os : windows-2022
77+ crt_static : yes
78+ - target : x86_64-pc-windows-msvc
79+ rust : stable-x86_64-msvc
80+ os : windows-latest
81+ - target : x86_64-pc-windows-msvc
82+ rust : stable-x86_64-msvc
83+ os : windows-latest
84+ crt_static : yes
85+ - target : x86_64-pc-windows-msvc
86+ rust : stable-x86_64-msvc
87+ os : windows-latest
88+ nasm_exe : installed
8989
9090 steps :
91- - uses : actions/checkout@v1
92- with :
93- submodules : true
94- - name : Install Rust (rustup)
95- run : rustup update ${{ matrix.rust }} --no-self-update && rustup default ${{ matrix.rust }}
96- - run : rustup target add ${{ matrix.target }}
97- - name : Set crt-static
98- if : matrix.crt_static == 'yes'
99- run : echo RUSTFLAGS=-Ctarget-feature=+crt-static >> $GITHUB_ENV
100- - name : Use strawberry perl
101- if : startsWith(matrix.os, 'windows')
102- run : echo OPENSSL_SRC_PERL=C:/Strawberry/perl/bin/perl >> $GITHUB_ENV
103- - name : Run tests (not Windows)
104- if : " !startsWith(matrix.os, 'windows')"
105- run : |
106- set -e
107- cargo generate-lockfile
108- ./ci/run-docker.sh ${{ matrix.target }}
109- - name : Download nasm.exe (Windows)
110- if : matrix.nasm_exe == 'installed'
111- run : |
112- WINNASMVERSION='2.15.05'
113- curl -O https://www.nasm.us/pub/nasm/releasebuilds/${WINNASMVERSION}/win64/nasm-${WINNASMVERSION}-win64.zip
114- unzip nasm-${WINNASMVERSION}-win64.zip
115- echo "$GITHUB_WORKSPACE\\nasm-${WINNASMVERSION}" >> $GITHUB_PATH
116- echo "OPENSSL_RUST_USE_NASM=1" >> $GITHUB_ENV
117- - name : Run tests (Windows)
118- if : startsWith(matrix.os, 'windows')
119- run : |
120- cargo test --manifest-path testcrate/Cargo.toml --target ${{ matrix.target }} -vv
121- cargo test --manifest-path testcrate/Cargo.toml --target ${{ matrix.target }} --release -vv
122- cargo run --release --target ${{ matrix.target }} --manifest-path testcrate/Cargo.toml --features package -vv
91+ - uses : actions/checkout@v5
92+ with :
93+ submodules : true
94+ - name : Install Rust (rustup)
95+ run : rustup update ${{ matrix.rust }} --no-self-update && rustup default ${{ matrix.rust }}
96+ - run : rustup target add ${{ matrix.target }}
97+ - name : Set crt-static
98+ if : matrix.crt_static == 'yes'
99+ run : echo RUSTFLAGS=-Ctarget-feature=+crt-static >> $GITHUB_ENV
100+ - name : Use strawberry perl
101+ if : startsWith(matrix.os, 'windows')
102+ run : echo OPENSSL_SRC_PERL=C:/Strawberry/perl/bin/perl >> $GITHUB_ENV
103+ - name : package source
104+ run : |
105+ cargo package --no-verify
106+ - name : Check crate size
107+ if : runner.os == 'Linux'
108+ run : |
109+ crate=`ls target/package/*.crate`
110+ filesize=$(stat -c%s "$crate")
111+ echo "tarball is $filesize bytes"
112+ if (( filesize > 15000000 )); then
113+ echo "file size too big"
114+ exit 1
115+ fi
116+ - name : Patch test crate
117+ run : |
118+ (cd target/package && tar -xf openssl-src-*.crate && rm openssl-src-*.crate && mv openssl-src-* openssl-src)
119+ pwd
120+ ls target
121+ echo "---"
122+ ls target/package/openssl-src
123+ sed -i -e 's/\.\./\.\.\/target\/package\/openssl-src\//g' testcrate/Cargo.toml
124+ echo "[workspace]" >> testcrate/Cargo.toml
125+ cat testcrate/Cargo.toml
126+ - name : Run tests (not Windows)
127+ if : " !startsWith(matrix.os, 'windows')"
128+ run : |
129+ set -e
130+ cargo generate-lockfile --manifest-path=testcrate/Cargo.toml
131+ ./ci/run-docker.sh ${{ matrix.target }}
132+ - name : Download nasm.exe (Windows)
133+ if : matrix.nasm_exe == 'installed'
134+ run : |
135+ WINNASMVERSION='2.15.05'
136+ curl -O https://www.nasm.us/pub/nasm/releasebuilds/${WINNASMVERSION}/win64/nasm-${WINNASMVERSION}-win64.zip
137+ unzip nasm-${WINNASMVERSION}-win64.zip
138+ echo "$GITHUB_WORKSPACE\\nasm-${WINNASMVERSION}" >> $GITHUB_PATH
139+ echo "OPENSSL_RUST_USE_NASM=1" >> $GITHUB_ENV
140+ - name : Run tests (Windows)
141+ if : startsWith(matrix.os, 'windows')
142+ run : |
143+ cargo test --manifest-path testcrate/Cargo.toml --target ${{ matrix.target }} -vv
144+ cargo test --manifest-path testcrate/Cargo.toml --target ${{ matrix.target }} --release -vv
145+ cargo run --release --target ${{ matrix.target }} --manifest-path testcrate/Cargo.toml --features package -vv
123146
124147 rustfmt :
125148 name : Rustfmt
126149 runs-on : ubuntu-latest
127150 steps :
128- - uses : actions/checkout@v1
129- - name : Install Rust
130- run : rustup update stable && rustup default stable && rustup component add rustfmt
131- - run : cargo fmt -- --check
151+ - uses : actions/checkout@v1
152+ - name : Install Rust
153+ run : rustup update stable && rustup default stable && rustup component add rustfmt
154+ - run : cargo fmt -- --check
0 commit comments