Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

XXX CAPTURE PR 2200 BUILD & CI TODO ITEMS THAT MAY BE DEFERRED #1

Draft
wants to merge 54 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
aaad952
DRAFT: add option to support targets w/no atomic pointers... XXX TODO…
brody4hire Nov 27, 2024
d12db3f
specify once_cell features only in rustls/Cargo.toml; update related …
brody4hire Nov 27, 2024
2aa9084
remove outdated XXX / TODO ITEMS for critical-section option
brody4hire Nov 27, 2024
5fbd1b1
add XXX / TODO comment for aws-lc-rs alias
brody4hire Nov 27, 2024
bb485b3
update comment re: once_cell
brody4hire Nov 27, 2024
afaa20c
fix cargo config for portable-atomic & portable-atomic-util
brody4hire Nov 27, 2024
4e37375
Merge branch 'main' of https://github.com/rustls/rustls into portable…
brody4hire Nov 28, 2024
61e9ad4
Revert "add XXX / TODO comment for aws-lc-rs alias"
brody4hire Nov 28, 2024
a136ee3
remove XXX cargo comments not needed for critical-section feature
brody4hire Nov 28, 2024
dc6fd11
further update to ccritical-section feature documentation
brody4hire Nov 29, 2024
98a6dcf
remove a meaningless XXX / TODO comment from CI build config
brody4hire Nov 29, 2024
f0a0b4d
update provider example to support optional critical-section feature
brody4hire Nov 29, 2024
b6bfe1a
fixup CI re: update provider example to support optional critical-sec…
brody4hire Nov 29, 2024
2010e1d
CI: build rustls-provider-example with all features including critica…
brody4hire Nov 29, 2024
976d2ea
add & update XXX / TODO comments in provider example
brody4hire Nov 29, 2024
b1ebb9a
resolve issue with ARC in: provider-example/src/hpke.rs
brody4hire Nov 29, 2024
f927c49
CI cross build rustls-provider-example - XXX TODO BUILD FAILURE on ta…
brody4hire Nov 29, 2024
dca23a4
revert recent updates to provider example for now, at least
brody4hire Nov 29, 2024
bb7c01d
resolve CI XXX: TODO ADD RATIONALE ... ...
brody4hire Nov 29, 2024
cd74a46
Merge branch 'main' of https://github.com/rustls/rustls into portable…
brody4hire Nov 29, 2024
0d4e032
Merge branch 'main' of https://github.com/rustls/rustls into portable…
brody4hire Dec 2, 2024
cf76510
Merge branch 'main' of https://github.com/rustls/rustls into portable…
brody4hire Dec 3, 2024
e6a2568
XXX SKIP COVERAGE CI JOB FOR NOW - XXX TODO INVESTIGATE / FIX / RE-EN…
brody4hire Dec 3, 2024
bbdad2e
fixup! XXX SKIP COVERAGE CI JOB FOR NOW - XXX TODO INVESTIGATE / FIX …
brody4hire Dec 3, 2024
e538bb3
re-enable CI coverage job - should be OK now (hopefully)
brody4hire Dec 4, 2024
1c47efb
Merge branch 'main' of https://github.com/rustls/rustls into portable…
brody4hire Dec 9, 2024
f516bdf
Merge branch 'main' of https://github.com/rustls/rustls into portable…
brody4hire Dec 9, 2024
c7c1fd8
Merge branch 'main' of https://github.com/rustls/rustls into portable…
brody4hire Dec 11, 2024
fac3a09
add pub util module to export Arc alias with XXX TODO ITEMS
brody4hire Dec 11, 2024
d7e49b9
Merge branch 'main' of https://github.com/rustls/rustls into portable…
brody4hire Dec 11, 2024
fc88c56
update provider-example to support critical-section option (with CI t…
brody4hire Dec 11, 2024
b6bceb1
FIXUP CI JOB RE: update provider-example to support critical-section …
brody4hire Dec 11, 2024
4eb4ff0
update comment for [package.metadata.docs.rs] in rustls/Cargo.toml
brody4hire Dec 11, 2024
e4a8c77
finish replacing rustls::internal::alias::Arc -> rustls::util::alias:…
brody4hire Dec 11, 2024
b6aeea8
update exported Arc type alias (seems to fix generated doc links to A…
brody4hire Dec 11, 2024
d59a774
testing provider example with critical-section feature - see if this …
brody4hire Dec 11, 2024
f2a8b2c
Merge branch 'main' of https://github.com/rustls/rustls into portable…
brody4hire Dec 11, 2024
d777159
fixup! testing provider example with critical-section feature - see i…
brody4hire Dec 11, 2024
bd2ed25
XXX SKIP CI CLIPPY JOBS FOR NOW - XXX TODO INVESTIGATE / FIX / RE-ENABLE
brody4hire Dec 11, 2024
d05eda4
update coverage CI task to include unit test of rustls-provider-examp…
brody4hire Dec 11, 2024
e68a623
re-enable CI clippy jobs with workaround, see if it works now
brody4hire Dec 11, 2024
cedc301
reword comments in admin/clippy
brody4hire Dec 12, 2024
ccaec19
Merge branch 'main' of https://github.com/rustls/rustls into portable…
brody4hire Dec 12, 2024
c4f0cfd
fixup provider example testing in CI config - [hopefully] fixes CI bu…
brody4hire Dec 12, 2024
08a727d
Merge branch 'main' of https://github.com/rustls/rustls into portable…
brody4hire Dec 12, 2024
fd33928
introduce admin/all-stable-features - see if this works in GitHub CI
brody4hire Dec 12, 2024
a23a446
remove blank line from imports in: rustls/tests/server_cert_verifier.…
brody4hire Dec 12, 2024
d3070ca
Merge branch 'main' of https://github.com/rustls/rustls into portable…
brody4hire Dec 12, 2024
e37ed57
remove extra space added to CI build YML
brody4hire Dec 12, 2024
c9f0247
fix & re-enable CI cargo package step
brody4hire Dec 12, 2024
f9c71cd
add & update some documentation with XXX / TODO ITEMS
brody4hire Dec 13, 2024
5a27c6d
remove remaining XXX TBD consider CI testing of more items with `crit…
brody4hire Dec 13, 2024
cf63047
remove XXX TODO test release comments from CI - test with release is …
brody4hire Dec 13, 2024
ffaaa94
benchmarks CI updates - micro-benchmarks for "all stable features"; r…
brody4hire Dec 13, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
158 changes: 129 additions & 29 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,17 +76,32 @@ jobs:
# nb. feature sets that include "fips" should be --release --
# this is required for fips on windows.
# nb. "--all-targets" does not include doctests
- name: cargo test (release; all features)
# unstable critical-section feature requires both `--cfg portable_atomic_unstable_coerce_unsized` & Rust nightly
- name: cargo test (release; all stable features)
if: ${{ !startsWith(matrix.rust, 'nightly') }}
run: cargo test --release --locked --lib $(admin/all-stable-features rustls) --all-targets
env:
RUST_BACKTRACE: 1
- name: cargo test (release; all features including unstable feature(s) - Rust nightly only)
if: startsWith(matrix.rust, 'nightly')
run: cargo test --release --locked --all-features --all-targets
env:
RUST_BACKTRACE: 1
RUSTFLAGS: --cfg portable_atomic_unstable_coerce_unsized

# nb. this is separate since `--doc` option cannot be combined with other target option(s) ref:
# - https://doc.rust-lang.org/cargo/commands/cargo-test.html
- name: cargo test --doc (release; all-features)
- name: cargo test --doc (release; all features except critical-section)
if: ${{ !startsWith(matrix.rust, 'nightly') }}
run: cargo test --release --locked $(admin/all-features-except critical-section rustls) --doc
env:
RUST_BACKTRACE: 1
- name: cargo test --doc (release; all features including critical-section - Rust nightly only)
if: startsWith(matrix.rust, 'nightly')
run: cargo test --release --locked --all-features --doc
env:
RUST_BACKTRACE: 1
RUSTFLAGS: --cfg portable_atomic_unstable_coerce_unsized

- name: cargo test (debug; aws-lc-rs)
run: cargo test --no-default-features --features aws_lc_rs,tls12,read_buf,logging,std --all-targets
Expand All @@ -104,17 +119,35 @@ jobs:
- name: cargo build (debug; rustls-provider-example lib in no-std mode)
run: cargo build --locked -p rustls-provider-example --no-default-features

- name: cargo test (debug; rustls-provider-example; all features)
- name: cargo build (debug; rustls-provider-example; all features including critical-section - Rust nightly only)
if: startsWith(matrix.rust, 'nightly')
run: cargo build --locked -p rustls-provider-example --all-features
env:
RUSTFLAGS: --cfg portable_atomic_unstable_coerce_unsized

- name: cargo test (debug; rustls-provider-example) # NOTE: only optional feature is critical-section - requires Rust nightly
run: cargo test -p rustls-provider-example

- name: cargo test (debug; rustls-provider-example; all features [critical-section] - Rust nightly only)
if: startsWith(matrix.rust, 'nightly')
run: cargo test --all-features -p rustls-provider-example
env:
RUSTFLAGS: --cfg portable_atomic_unstable_coerce_unsized

- name: cargo build (debug; rustls-provider-test)
run: cargo build --locked -p rustls-provider-test

- name: cargo test (debug; rustls-provider-test; all features)
- name: cargo test (debug; rustls-provider-test) # NOTE: only optional feature is critical-section - requires Rust nightly
run: cargo test -p rustls-provider-test

- name: cargo test (debug; rustls-provider-test; all features [critical-section] - Rust nightly only)
if: startsWith(matrix.rust, 'nightly')
run: cargo test --all-features -p rustls-provider-test
env:
RUSTFLAGS: --cfg portable_atomic_unstable_coerce_unsized

- name: cargo package --all-features -p rustls
run: cargo package --all-features -p rustls
- name: cargo package (all stable features)
run: cargo package $(admin/all-stable-features rustls) -p rustls

msrv:
name: MSRV
Expand All @@ -125,18 +158,21 @@ jobs:
with:
persist-credentials: false

# XXX TODO ADD CONSISTENT LABEL HERE - XXX TODO RAISE SEPARATE PR TO UPDATE THIS
- uses: dtolnay/rust-toolchain@master
with:
toolchain: "1.71"

# zlib-rs is optional and requires a later MSRV
- run: cargo check --locked --lib $(admin/all-features-except zlib rustls) -p rustls
# zlib-rs is optional and requires a later MSRV; critical-section requires Rust nightly
- run: cargo check --locked --lib $(admin/all-features-except zlib,critical-section rustls) -p rustls

# XXX TODO ADD CONSISTENT LABEL HERE - XXX TODO RAISE SEPARATE PR TO UPDATE THIS
- uses: dtolnay/rust-toolchain@master
with:
toolchain: "1.75"

- run: cargo check --locked --lib --all-features -p rustls
# critical-section requires Rust nightly; check build of all other features with MSRV
- run: cargo check --locked --lib $(admin/all-features-except critical-section rustls) -p rustls

features:
name: Features
Expand All @@ -147,8 +183,9 @@ jobs:
with:
persist-credentials: false

- name: Install stable toolchain
uses: dtolnay/rust-toolchain@stable
# XXX TBD rust-toolchain - ??? ??? ???
- name: Install rust-toolchain - nightly
uses: dtolnay/rust-toolchain@nightly
with:
target: x86_64-unknown-none

Expand Down Expand Up @@ -176,6 +213,12 @@ jobs:
run: cargo test --locked --no-default-features
working-directory: rustls

- name: cargo test (debug; no default features; critical-section)
run: cargo test --locked --no-default-features --features critical-section,std
working-directory: rustls
env:
RUSTFLAGS: --cfg portable_atomic_unstable_coerce_unsized

- name: cargo test (debug; no default features; tls12)
run: cargo test --locked --no-default-features --features tls12,std
working-directory: rustls
Expand All @@ -201,8 +244,9 @@ jobs:
with:
persist-credentials: false

- name: Install stable toolchain
uses: dtolnay/rust-toolchain@stable
# XXX TBD rust-toolchain - ??? ??? ???
- name: Install rust-toolchain - nightly
uses: dtolnay/rust-toolchain@nightly

- name: Install golang toolchain
uses: actions/setup-go@v5
Expand Down Expand Up @@ -277,8 +321,8 @@ jobs:
- name: Smoke-test benchmark program (fips)
run: cargo run -p rustls-bench --profile=bench --locked --features fips -- --provider aws-lc-rs-fips --multiplier 0.1

- name: Run micro-benchmarks
run: cargo bench --locked --all-features
- name: Run micro-benchmarks (all stable features)
run: cargo bench --locked $(admin/all-stable-features rustls)
env:
RUSTFLAGS: --cfg=bench

Expand All @@ -291,19 +335,27 @@ jobs:
with:
persist-credentials: false

- name: Install rust toolchain
# XXX TODO MORE CONSISTENT LABEL HERE - XXX TODO RAISE SEPARATE PR TO UPDATE THIS
- name: Install rust toolchain - nightly
uses: dtolnay/rust-toolchain@nightly

# XXX TBD FEATURES - ??? ??? ???
- name: cargo doc (rustls; all features)
run: cargo doc --locked --all-features --no-deps --document-private-items --package rustls
env:
RUSTDOCFLAGS: -Dwarnings
# XXX TBD ??? ??? ???
RUSTFLAGS: --cfg portable_atomic_unstable_coerce_unsized

- name: Check README.md
# XXX TBD FEATURES - ??? ??? ???
run: |
cargo build --locked --all-features
./admin/pull-readme
git diff --exit-code
# XXX TBD ??? ??? ???
env:
RUSTFLAGS: --cfg portable_atomic_unstable_coerce_unsized

coverage:
name: Measure coverage
Expand All @@ -315,8 +367,10 @@ jobs:
with:
persist-credentials: false

- name: Install rust toolchain
uses: dtolnay/rust-toolchain@stable
# XXX TBD rust-toolchain - ??? ??? ???
# XXX TODO MORE CONSISTENT LABEL HERE - XXX TODO RAISE SEPARATE PR TO UPDATE THIS
- name: Install rust-toolchain - nightly - with llvm-tools
uses: dtolnay/rust-toolchain@nightly
with:
components: llvm-tools

Expand All @@ -325,6 +379,9 @@ jobs:

- name: Measure coverage
run: ./admin/coverage --lcov --output-path final.info
# XXX TBD ??? - FEATURES ??? ??? ???
env:
RUSTFLAGS: --cfg portable_atomic_unstable_coerce_unsized

- name: Report to codecov.io
uses: codecov/codecov-action@v5
Expand All @@ -342,7 +399,8 @@ jobs:
with:
persist-credentials: false

- name: Install rust toolchain
# XXX TODO MORE CONSISTENT LABEL HERE - XXX TODO RAISE SEPARATE PR TO UPDATE THIS
- name: Install rust toolchain - nightly
uses: dtolnay/rust-toolchain@nightly

- name: Install cargo-minimal-versions
Expand Down Expand Up @@ -383,14 +441,49 @@ jobs:
with:
persist-credentials: false

- name: Install rust toolchain
uses: dtolnay/rust-toolchain@stable
# XXX TBD rust-toolchain - ??? ??? ???
# XXX TODO MORE CONSISTENT LABEL HERE - XXX TODO RAISE SEPARATE PR TO UPDATE THIS
- name: Install rust-toolchain - nightly
uses: dtolnay/rust-toolchain@nightly
- name: Install cross (cross-rs) from GitHub
run: cargo install cross --git https://github.com/cross-rs/cross
- name: Install bindgen feature & CLI for aws-lc-sys (as needed for many cross targets)
if: ${{ matrix.target != 'i686-unknown-linux-gnu' }}
run: cargo add --dev --features bindgen 'aws-lc-sys@>0.20' --package rustls --verbose && cargo install bindgen-cli --verbose
- run: cross test --package rustls --target ${{ matrix.target }}
- run: cross test --features critical-section --package rustls --target ${{ matrix.target }}
env:
RUSTFLAGS: --cfg portable_atomic_unstable_coerce_unsized

cross-build-with-critical-section-feature:
# NOTE: The purpose of this CI job is to test build support for CPU targets with no atomic ptr support
# (using critical-section feature)
name: cross-target build with critical-section feature
runs-on: ubuntu-latest
strategy:
matrix:
target:
# FOR FUTURE CONSIDERATION: test with some other targets with & without atomic ptr support
# 32-bit target(s) with no atomic ptr:
- thumbv6m-none-eabi
# 32-bit Android (Linux) target(s):
- armv7-linux-androideabi
steps:
- name: Checkout sources
uses: actions/checkout@v4
with:
persist-credentials: false

# XXX TBD rust-toolchain - ??? ??? ???
# XXX TODO MORE CONSISTENT LABEL HERE - XXX TODO RAISE SEPARATE PR TO UPDATE THIS
- name: Install rust-toolchain - nightly
uses: dtolnay/rust-toolchain@nightly
- name: Install cross (cross-rs) from GitHub
run: cargo install cross --git https://github.com/cross-rs/cross
# XXX TBD TEST WITH XXX TBD XXX PROVIDER(S)
- run: cross build --no-default-features --features critical-section,custom-provider --package rustls --target ${{ matrix.target }}
env:
RUSTFLAGS: --cfg portable_atomic_unstable_coerce_unsized

semver:
name: Check semver compatibility
Expand All @@ -412,7 +505,8 @@ jobs:
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Install rust toolchain
# XXX TODO MORE CONSISTENT LABEL HERE WITH COMPONENT(S) LABEL - XXX TODO RAISE SEPARATE PR TO UPDATE THIS
- name: Install rust toolchain - stable - with rustfmt
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt
Expand All @@ -431,7 +525,8 @@ jobs:
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Install rust nightly toolchain
# XXX TODO MORE CONSISTENT LABEL HERE WITH COMPONENT(S) LABEL - XXX TODO RAISE SEPARATE PR TO UPDATE THIS
- name: Install rust nightly toolchain - nightly-2024-02-21 - with rustfmt
uses: dtolnay/rust-toolchain@master
with:
components: rustfmt
Expand All @@ -447,7 +542,8 @@ jobs:
continue-on-error: true

clippy:
name: Clippy
# XXX TBD IMPROVE THIS JOB LABEL & REVIEW CONSISTENCY WITH LOOSER clippy-nightly JOB - XXX TODO RAISE SEPARATE PR TO UPDATE THIS
name: Clippy (strict / deny warnings)
runs-on: ubuntu-latest
steps:
- name: Checkout sources
Expand All @@ -459,7 +555,8 @@ jobs:
if: runner.os == 'Linux'
run: sudo apt-get update && sudo apt-get install -y valgrind

- name: Install rust toolchain
# XXX TODO MORE CONSISTENT LABEL HERE WITH COMPONENT(S) LABEL - XXX TODO RAISE SEPARATE PR TO UPDATE THIS
- name: Install rust toolchain - stable - with clippy
uses: dtolnay/rust-toolchain@stable
with:
components: clippy
Expand All @@ -481,7 +578,8 @@ jobs:
if: runner.os == 'Linux'
run: sudo apt-get update && sudo apt-get install -y valgrind

- name: Install rust toolchain
# XXX TODO MORE CONSISTENT LABEL HERE WITH COMPONENT(S) LABEL - XXX TODO RAISE SEPARATE PR TO UPDATE THIS
- name: Install rust toolchain - nightly - with clippy
uses: dtolnay/rust-toolchain@nightly
with:
components: clippy
Expand All @@ -496,7 +594,8 @@ jobs:
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Install rust toolchain
# XXX TODO MORE CONSISTENT LABEL HERE WITH COMPONENT(S) LABEL - XXX TODO RAISE SEPARATE PR TO UPDATE THIS
- name: Install rust toolchain - nightly-2024-06-30
uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly-2024-06-30
Expand All @@ -517,8 +616,9 @@ jobs:
with:
persist-credentials: false

- name: Install stable toolchain
uses: dtolnay/rust-toolchain@stable
# XXX TBD rust-toolchain - ??? ??? ???
- name: Install rust-toolchain - nightly
uses: dtolnay/rust-toolchain@nightly

- name: Cache ${{ env.VERSION }}
uses: actions/cache@v4
Expand Down
31 changes: 31 additions & 0 deletions Cargo.lock

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

Loading
Loading