-
Notifications
You must be signed in to change notification settings - Fork 78
Add Script to Update BoringSSL #204
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
Open
HamdaanAliQuatil
wants to merge
4
commits into
master
Choose a base branch
from
update-boringssl
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
db4b701
feat: add script to update boringssl
HamdaanAliQuatil 2fabe63
refactor: unifiy scripts and update workflow
HamdaanAliQuatil 80203b8
chore: remove old py script
HamdaanAliQuatil 826066b
refactor: updated CBB allocation and boringssl verification
HamdaanAliQuatil File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,167 @@ | ||
| name: Update BoringSSL | ||
|
|
||
| on: | ||
| schedule: | ||
| - cron: '0 9 * * 1' | ||
|
|
||
| workflow_dispatch: | ||
| inputs: | ||
| boringssl_revision: | ||
| description: 'Specific BoringSSL revision (SHA) to update to (leave empty for latest)' | ||
| required: false | ||
| type: string | ||
|
|
||
| jobs: | ||
| update-boringssl: | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: write | ||
| pull-requests: write | ||
|
|
||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| token: ${{ secrets.GITHUB_TOKEN }} | ||
| fetch-depth: 0 | ||
|
|
||
| - name: Set up Dart | ||
| uses: dart-lang/setup-dart@v1 | ||
| with: | ||
| sdk: stable | ||
|
|
||
| - name: Set up Git | ||
| run: | | ||
| git config --global user.name 'github-actions[bot]' | ||
| git config --global user.email 'github-actions[bot]@users.noreply.github.com' | ||
|
|
||
| - name: Run BoringSSL update | ||
| id: update | ||
| run: | | ||
| # Run the BoringSSL update script with dry-run first to get info | ||
| if [ -n "${{ github.event.inputs.boringssl_revision }}" ]; then | ||
| REVISION="${{ github.event.inputs.boringssl_revision }}" | ||
| echo "Using specified revision: $REVISION" | ||
| else | ||
| REVISION="" | ||
| echo "Using latest revision" | ||
| fi | ||
|
|
||
| # Run the update script | ||
| bash ./tool/bump-boringssl-revision.sh $REVISION | ||
|
|
||
| # Get the new revision from the updated file | ||
| NEW_REVISION=$(cat tool/REVISION | tr -d ' \t\n\r') | ||
| echo "new_revision=$NEW_REVISION" >> $GITHUB_OUTPUT | ||
|
|
||
| - name: Get BoringSSL commit info | ||
| id: boringssl-info | ||
| run: | | ||
| # Get commit information for the new revision | ||
| TEMP_DIR=$(mktemp -d) | ||
| git clone https://boringssl.googlesource.com/boringssl "$TEMP_DIR/boringssl" | ||
| cd "$TEMP_DIR/boringssl" | ||
| git checkout ${{ steps.update.outputs.new_revision }} | ||
|
|
||
| COMMIT_DATE=$(git show -s --format=%ci ${{ steps.update.outputs.new_revision }}) | ||
| COMMIT_SUBJECT=$(git show -s --format=%s ${{ steps.update.outputs.new_revision }}) | ||
| COMMIT_AUTHOR=$(git show -s --format=%an ${{ steps.update.outputs.new_revision }}) | ||
| SHORT_SHA=$(echo "${{ steps.update.outputs.new_revision }}" | cut -c1-8) | ||
|
|
||
| echo "commit_date=$COMMIT_DATE" >> $GITHUB_OUTPUT | ||
| echo "commit_subject=$COMMIT_SUBJECT" >> $GITHUB_OUTPUT | ||
| echo "commit_author=$COMMIT_AUTHOR" >> $GITHUB_OUTPUT | ||
| echo "short_sha=$SHORT_SHA" >> $GITHUB_OUTPUT | ||
|
|
||
| # Cleanup | ||
| rm -rf "$TEMP_DIR" | ||
|
|
||
| - name: Check for changes | ||
| id: changes | ||
| run: | | ||
| if git diff --quiet; then | ||
| echo "has_changes=false" >> $GITHUB_OUTPUT | ||
| echo "No changes detected after running update script" | ||
| else | ||
| echo "has_changes=true" >> $GITHUB_OUTPUT | ||
| echo "Changes detected:" | ||
| git diff --name-status | ||
| fi | ||
|
|
||
| - name: Create Pull Request | ||
| if: steps.changes.outputs.has_changes == 'true' | ||
| uses: peter-evans/create-pull-request@v5 | ||
| with: | ||
| token: ${{ secrets.GITHUB_TOKEN }} | ||
| commit-message: | | ||
| chore: Update BoringSSL to ${{ steps.boringssl-info.outputs.short_sha }} | ||
|
|
||
| Updates BoringSSL to revision ${{ steps.update.outputs.new_revision }} | ||
| - Commit: ${{ steps.boringssl-info.outputs.commit_subject }} | ||
| - Author: ${{ steps.boringssl-info.outputs.commit_author }} | ||
| - Date: ${{ steps.boringssl-info.outputs.commit_date }} | ||
| title: 'chore: Update BoringSSL to ${{ steps.boringssl-info.outputs.short_sha }}' | ||
| body: | | ||
| ## 🔄 Automated BoringSSL Update | ||
|
|
||
| This PR updates BoringSSL to revision **${{ steps.boringssl-info.outputs.short_sha }}**. | ||
|
|
||
| ### 📋 Update Summary | ||
| - **Revision**: [${{ steps.boringssl-info.outputs.short_sha }}](https://boringssl.googlesource.com/boringssl/+/${{ steps.update.outputs.new_revision }}) | ||
| - **Commit**: ${{ steps.boringssl-info.outputs.commit_subject }} | ||
| - **Author**: ${{ steps.boringssl-info.outputs.commit_author }} | ||
| - **Date**: ${{ steps.boringssl-info.outputs.commit_date }} | ||
|
|
||
| ### 🔧 What's Updated | ||
| - ✅ **BoringSSL Sources**: Updated to latest revision | ||
| - ✅ **CMake Configuration**: Regenerated `sources.cmake` | ||
| - ✅ **FFI Bindings**: Updated Dart bindings for BoringSSL | ||
| - ✅ **Symbols Table**: Regenerated symbol lookup table | ||
| - ✅ **Darwin Sources**: Updated fake Darwin sources | ||
| - ✅ **Tests**: All tests pass (verified during update) | ||
|
|
||
| ### 🧪 Testing Status | ||
| - [x] **Build Tests**: ✅ Passed | ||
| - [x] **Unit Tests**: ✅ Passed | ||
| - [x] **Integration Tests**: ✅ Passed | ||
| - [x] **Chrome Tests**: ✅ Passed | ||
| - [x] **Firefox Tests**: ✅ Passed | ||
| - [ ] **Manual Verification**: Pending review | ||
|
|
||
| ### 📁 Files Changed | ||
| - `tool/REVISION` - Updated to new revision | ||
| - `third_party/boringssl/` - Updated source files | ||
| - `darwin/third_party/boringssl/` - Updated Darwin sources | ||
| - `lib/src/third_party/boringssl/generated_bindings.dart` - Updated FFI bindings | ||
| - `src/symbols.generated.c` - Updated symbol table | ||
|
|
||
| --- | ||
|
|
||
| 🤖 **Automated by**: Update BoringSSL workflow | ||
|
|
||
| **Review Guidelines:** | ||
| 1. ✅ Verify all tests pass in CI | ||
| 2. 🔍 Review any breaking changes in BoringSSL changelog | ||
| 3. 🧪 Test critical cryptographic operations locally | ||
| 4. 🌐 Verify cross-platform compatibility (Windows, macOS, Linux) | ||
| 5. 📱 Test mobile platforms if applicable | ||
|
|
||
| **Note**: This update was performed using the automated `bump-boringssl-revision.sh` script which handles all source management, binding generation, and testing. | ||
| branch: update-boringssl-${{ steps.boringssl-info.outputs.short_sha }} | ||
| branch-suffix: timestamp | ||
| delete-branch: true | ||
| labels: | | ||
| dependencies | ||
| automated-pr | ||
| boringssl-update | ||
| security | ||
|
|
||
| - name: Summary | ||
| run: | | ||
| if [ "${{ steps.changes.outputs.has_changes }}" = "false" ]; then | ||
| echo "ℹ️ No changes detected - BoringSSL is already up to date" | ||
| else | ||
| echo "🚀 Successfully created PR to update BoringSSL" | ||
| echo " Revision: ${{ steps.update.outputs.new_revision }}" | ||
| echo " Commit: ${{ steps.boringssl-info.outputs.commit_subject }}" | ||
| fi | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| a873ab7906bc5b1431821864df8036068aab972d |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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'm not sure we can do this, but let's try 🤣
Here is the current settings as far as I can set them:
