-
Notifications
You must be signed in to change notification settings - Fork 5
Code for QUIC support #24
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
base: main
Are you sure you want to change the base?
Changes from all commits
59fd8fd
076c541
fab8217
f772b22
4dddf97
12e1d5f
ce33f5e
8ce1aa8
4a3b32e
d23d75e
29b7cec
2b4e59e
48449dd
a20c590
7274348
2071799
2dde8ed
6c4cf26
47ccedb
a4b5302
66e9b0c
e57eb64
26a9e6d
15b1c0e
8c86949
c747bd5
a125038
56be78c
85a47b1
8708554
fc1b3b6
25b7ad6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,82 @@ | ||
| name: macOS rustls tests | ||
|
|
||
| on: | ||
| push: | ||
| branches: [ 'main' ] | ||
| pull_request: | ||
| branches: [ 'main' ] | ||
|
|
||
| jobs: | ||
| macos-build: | ||
| name: Build and Test (macOS) | ||
| runs-on: macos-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - name: Install Build Prerequisites | ||
| run: | | ||
| brew install autoconf libtool automake | ||
| brew install go | ||
|
|
||
| - name: Install Rust | ||
| uses: dtolnay/rust-toolchain@master | ||
| with: | ||
| toolchain: stable | ||
| components: rustfmt, clippy | ||
|
|
||
| - name: Cache Rust dependencies | ||
| uses: actions/cache@v3 | ||
| with: | ||
| path: | | ||
| ~/.cargo/registry | ||
| ~/.cargo/git | ||
| target | ||
| key: macos-cargo-${{ hashFiles('**/Cargo.lock') }} | ||
| restore-keys: | | ||
| macos-cargo- | ||
|
|
||
| - name: Checkout rustls v0.23.35 | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| repository: rustls/rustls | ||
| ref: v/0.23.35 | ||
| fetch-depth: 0 | ||
| path: rustlsv0.23.35-test-workspace/rustls | ||
|
|
||
| - name: Checkout rustls-wolfcrypt-provider (quic-support) | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| repository: helkoulak/rustls-wolfcrypt-provider | ||
| ref: quic-support | ||
| path: rustlsv0.23.35-test-workspace/rustls-wolfcrypt-provider | ||
|
|
||
| - name: Build wolfcrypt-rs | ||
| working-directory: rustlsv0.23.35-test-workspace/rustls-wolfcrypt-provider/wolfcrypt-rs | ||
| run: make build | ||
|
|
||
| - name: Build rustls-wolfcrypt-provider | ||
| working-directory: rustlsv0.23.35-test-workspace/rustls-wolfcrypt-provider/rustls-wolfcrypt-provider | ||
| run: cargo build --all-features --release | ||
|
|
||
| - name: Checkout rustls v0.23.35 test files | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| repository: helkoulak/rustls_v0.23.35_test_files | ||
| path: rustlsv0.23.35-test-workspace/rustls_v0.23.35_test_files | ||
|
|
||
| - name: Prepare test workspace | ||
| working-directory: rustlsv0.23.35-test-workspace | ||
| run: | | ||
| cp -r rustls_v0.23.35_test_files/tests . | ||
| cp rustls_v0.23.35_test_files/Cargo.toml . | ||
| cp rustls_v0.23.35_test_files/provider_files/Cargo.toml \ | ||
| rustls-wolfcrypt-provider/rustls-wolfcrypt-provider/ | ||
|
|
||
| - name: Run test suite | ||
| working-directory: rustlsv0.23.35-test-workspace | ||
| run: | | ||
| cargo test -p tests --test all_suites \ | ||
| --features wolfcrypt-provider,tls12,fips,zlib,prefer-post-quantum,logging \ | ||
| --no-default-features | ||
|
|
||
|
|
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. One thing that I noticed is that you compile and run the tests with I think the command to run the testsuite with only the wolfcrypt provider (which is already compiled in) is:
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You are right. No need to use --all-features option. The tests run successfully using your suggested command with a few features added and it should be like this
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Me and Juliusz were also thinking that it might be worth to add a feature to print the current provider being used via cargo, since you added the configuration option
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If I understand correctly, this is already done. The command that runs the tests targets only the runner file all_test_suites.rs. And in this runner file you have macros that are annotated with #[cfg(feature = "wolfcrypt-provider")] and print the sentence tests_with_wolfcrypt_. So as per my understanding, there is no way the tests will run against other providers than wolfcrypt-provider. Or did I miss something here? |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,82 @@ | ||
| name: Ubuntu rustls tests | ||
|
|
||
| on: | ||
| push: | ||
| branches: [ 'main' ] | ||
| pull_request: | ||
| branches: [ 'main' ] | ||
|
|
||
| jobs: | ||
| ubuntu-build: | ||
| name: Build and Test (Ubuntu) | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - name: Install Build Prerequisites | ||
| run: | | ||
| sudo apt-get update | ||
| sudo apt-get install -y build-essential autoconf libtool | ||
|
|
||
| - name: Install Rust | ||
| uses: dtolnay/rust-toolchain@master | ||
| with: | ||
| toolchain: stable | ||
| components: rustfmt, clippy | ||
|
|
||
| - name: Cache Rust dependencies | ||
| uses: actions/cache@v3 | ||
| with: | ||
| path: | | ||
| ~/.cargo/registry | ||
| ~/.cargo/git | ||
| target | ||
| key: ubuntu-cargo-${{ hashFiles('**/Cargo.lock') }} | ||
| restore-keys: | | ||
| ubuntu-cargo- | ||
|
|
||
|
|
||
| - name: Checkout rustls v0.23.35 | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| repository: rustls/rustls | ||
| ref: v/0.23.35 | ||
| fetch-depth: 0 | ||
| path: rustlsv0.23.35-test-workspace/rustls | ||
|
|
||
| - name: Checkout rustls-wolfcrypt-provider (quic-support) | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| repository: helkoulak/rustls-wolfcrypt-provider | ||
| ref: quic-support | ||
| path: rustlsv0.23.35-test-workspace/rustls-wolfcrypt-provider | ||
|
|
||
| - name: Build wolfcrypt-rs | ||
| working-directory: rustlsv0.23.35-test-workspace/rustls-wolfcrypt-provider/wolfcrypt-rs | ||
| run: make build | ||
|
|
||
| - name: Build rustls-wolfcrypt-provider | ||
| working-directory: rustlsv0.23.35-test-workspace/rustls-wolfcrypt-provider/rustls-wolfcrypt-provider | ||
| run: cargo build --all-features --release | ||
|
|
||
| - name: Checkout rustls v0.23.35 test files | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| repository: helkoulak/rustls_v0.23.35_test_files | ||
| path: rustlsv0.23.35-test-workspace/rustls_v0.23.35_test_files | ||
|
|
||
| - name: Prepare test workspace | ||
| working-directory: rustlsv0.23.35-test-workspace | ||
| run: | | ||
| cp -r rustls_v0.23.35_test_files/tests . | ||
| cp rustls_v0.23.35_test_files/Cargo.toml . | ||
| cp rustls_v0.23.35_test_files/provider_files/Cargo.toml \ | ||
| rustls-wolfcrypt-provider/rustls-wolfcrypt-provider/ | ||
|
|
||
| - name: Run test suite | ||
| working-directory: rustlsv0.23.35-test-workspace | ||
| run: | | ||
| cargo test -p tests --test all_suites \ | ||
| --features wolfcrypt-provider,tls12,fips,zlib,prefer-post-quantum,logging \ | ||
| --no-default-features | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The same comments apply to
macos-build.yml.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would consider moving the
rustlstests into a separate workflow.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done