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

Switch to a submodule for the vendored mbedtls #373

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 2 additions & 0 deletions .github/workflows/publish-crates.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
submodules: true
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
Expand Down
37 changes: 22 additions & 15 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ jobs:

steps:
- uses: actions/checkout@v3
with:
submodules: true

- name: Install qemu-user for aarch64 target
if: matrix.target == 'aarch64-unknown-linux-musl'
Expand Down Expand Up @@ -114,6 +116,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: true
- uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
Expand All @@ -124,21 +128,24 @@ jobs:
cargo fmt --check -p mbedtls-platform-support
cargo fmt --check -p mbedtls-sys-auto

bench:
name: Cargo bench
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
- uses: boa-dev/criterion-compare-action@v3
name: Run criterion-compare-action
with:
cwd: "mbedtls"
benchName: "cipher"
branchName: ${{ github.base_ref }}
token: ${{ secrets.GITHUB_TOKEN }}
# Temporarily disbaling this, as boa-dev/criterion-compare-action@v3 does not handle submodules
# bench:
# name: Cargo bench
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v3
# with:
# submodules: true
# - uses: dtolnay/rust-toolchain@master
# with:
# toolchain: stable
# - uses: boa-dev/criterion-compare-action@v3
# name: Run criterion-compare-action
# with:
# cwd: "mbedtls"
# benchName: "cipher"
# branchName: ${{ github.base_ref }}
# token: ${{ secrets.GITHUB_TOKEN }}

ci-success:
name: ci
Expand Down
4 changes: 4 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[submodule "mbedtls-sys/vendor"]
path = mbedtls-sys/vendor
url = https://github.com/fortanix/mbedtls
branch = mbedtls-2.28-rust-mbedtls
2 changes: 1 addition & 1 deletion Cargo.lock

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

8 changes: 5 additions & 3 deletions mbedtls-sys/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
[package]
name = "mbedtls-sys-auto"
version = "2.28.7"
# This version should match the version of upstream c mbedtls, except that the patch component should
# be 1000 * upstream_patch + our_patch. For example, version 2.28.9001 corresponds to c mbedtls 2.28.9
version = "2.28.9000"
authors = ["Jethro Beekman <[email protected]>"]
build = "build/build.rs"
license = "Apache-2.0 OR GPL-2.0-or-later"
Expand All @@ -15,8 +17,8 @@ links = "mbedtls"

[package.metadata.mbedtls]
git = "https://github.com/Mbed-TLS/mbedtls.git"
version = "2.28.7"
rev = "555f84735aecdbd76a566cf087ec8425dfb0c8ab"
version = "2.28.9+"
rev = "9b1ec06287f022baba9623b6f45688c4276e4955"

[lib]
name = "mbedtls_sys"
Expand Down
1 change: 1 addition & 0 deletions mbedtls-sys/vendor
Submodule vendor added at 6feb5b
59 changes: 0 additions & 59 deletions mbedtls-sys/vendor-patches/0001-Vendor-Change.patch

This file was deleted.

This file was deleted.

2 changes: 0 additions & 2 deletions mbedtls-sys/vendor/.gitattributes

This file was deleted.

46 changes: 0 additions & 46 deletions mbedtls-sys/vendor/.github/issue_template.md

This file was deleted.

19 changes: 0 additions & 19 deletions mbedtls-sys/vendor/.github/pull_request_template.md

This file was deleted.

75 changes: 0 additions & 75 deletions mbedtls-sys/vendor/.gitignore

This file was deleted.

3 changes: 0 additions & 3 deletions mbedtls-sys/vendor/.globalrc

This file was deleted.

4 changes: 0 additions & 4 deletions mbedtls-sys/vendor/.mypy.ini

This file was deleted.

Loading
Loading