25
25
token : ${{ secrets.GITHUB_TOKEN }}
26
26
fetch-depth : 0
27
27
28
- - name : Set up Python
29
- uses : actions/setup-python@v4
30
- with :
31
- python-version : ' 3.11'
32
-
33
28
- name : Set up Dart
34
29
uses : dart-lang/setup-dart@v1
35
30
with :
@@ -40,88 +35,38 @@ jobs:
40
35
git config --global user.name 'github-actions[bot]'
41
36
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
42
37
43
- - name : Clone BoringSSL to get latest revision
44
- id : get-revision
38
+ - name : Run BoringSSL update
39
+ id : update
45
40
run : |
46
- # Clone BoringSSL to a temporary directory to get the latest revision
47
- TEMP_DIR=$(mktemp -d)
48
- git clone https://boringssl.googlesource.com/boringssl "$TEMP_DIR/boringssl"
49
- cd "$TEMP_DIR/boringssl"
50
-
41
+ # Run the BoringSSL update script with dry-run first to get info
51
42
if [ -n "${{ github.event.inputs.boringssl_revision }}" ]; then
52
- LATEST_REVISION ="${{ github.event.inputs.boringssl_revision }}"
53
- echo "Using manually specified revision: $LATEST_REVISION "
43
+ REVISION ="${{ github.event.inputs.boringssl_revision }}"
44
+ echo "Using specified revision: $REVISION "
54
45
else
55
- LATEST_REVISION=$(git rev-parse HEAD)
56
- echo "Latest BoringSSL revision: $LATEST_REVISION "
46
+ REVISION=""
47
+ echo "Using latest revision"
57
48
fi
58
49
59
- # Get current revision from the Python script
60
- CURRENT_REVISION=$(grep "BORINGSSL_REVISION = " tool/update-boringssl.py | cut -d"'" -f2)
61
- echo "Current revision in script: $CURRENT_REVISION"
62
-
63
- echo "latest_revision=$LATEST_REVISION" >> $GITHUB_OUTPUT
64
- echo "current_revision=$CURRENT_REVISION" >> $GITHUB_OUTPUT
50
+ # Run the update script
51
+ bash ./tool/bump-boringssl-revision.sh $REVISION
65
52
66
- # Check if update is needed
67
- if [ "$LATEST_REVISION" = "$CURRENT_REVISION" ]; then
68
- echo "needs_update=false" >> $GITHUB_OUTPUT
69
- echo "No update needed - already at latest revision"
70
- else
71
- echo "needs_update=true" >> $GITHUB_OUTPUT
72
- echo "Update needed: $CURRENT_REVISION -> $LATEST_REVISION"
73
- fi
74
-
75
- # Cleanup
76
- rm -rf "$TEMP_DIR"
77
-
78
- - name : Update BoringSSL revision in script
79
- if : steps.get-revision.outputs.needs_update == 'true'
80
- run : |
81
- # Update the BORINGSSL_REVISION in the Python script
82
- sed -i "s/BORINGSSL_REVISION = '[^']*'/BORINGSSL_REVISION = '${{ steps.get-revision.outputs.latest_revision }}'/" tool/update-boringssl.py
83
-
84
- # Verify the change
85
- echo "Updated revision in script:"
86
- grep "BORINGSSL_REVISION = " tool/update-boringssl.py
87
-
88
- - name : Run BoringSSL update script
89
- if : steps.get-revision.outputs.needs_update == 'true'
90
- run : |
91
- # Step 1: Clean up build artifacts
92
- echo "🧹 Cleaning up build artifacts..."
93
- bash ./tool/clean.sh
94
-
95
- # Step 2: Update BoringSSL sources
96
- echo "📦 Updating BoringSSL sources..."
97
- python3 tool/update-boringssl.py
98
-
99
- # Step 3: Get Dart dependencies
100
- echo "📥 Getting Dart dependencies..."
101
- dart pub get
102
-
103
- # Step 4: Generate symbols table
104
- echo "🔢 Generating symbols table..."
105
- dart run ./tool/generate_symbols_table.dart
106
-
107
- # Step 5: Update FFI bindings
108
- echo "🔗 Updating FFI bindings..."
109
- bash ./tool/update-bindings.sh
53
+ # Get the new revision from the updated file
54
+ NEW_REVISION=$(cat tool/REVISION | tr -d ' \t\n\r')
55
+ echo "new_revision=$NEW_REVISION" >> $GITHUB_OUTPUT
110
56
111
57
- name : Get BoringSSL commit info
112
- if : steps.get-revision.outputs.needs_update == 'true'
113
58
id : boringssl-info
114
59
run : |
115
- # Clone BoringSSL again to get commit information
60
+ # Get commit information for the new revision
116
61
TEMP_DIR=$(mktemp -d)
117
62
git clone https://boringssl.googlesource.com/boringssl "$TEMP_DIR/boringssl"
118
63
cd "$TEMP_DIR/boringssl"
119
- git checkout ${{ steps.get-revision .outputs.latest_revision }}
64
+ git checkout ${{ steps.update .outputs.new_revision }}
120
65
121
- COMMIT_DATE=$(git show -s --format=%ci ${{ steps.get-revision .outputs.latest_revision }})
122
- COMMIT_SUBJECT=$(git show -s --format=%s ${{ steps.get-revision .outputs.latest_revision }})
123
- COMMIT_AUTHOR=$(git show -s --format=%an ${{ steps.get-revision .outputs.latest_revision }})
124
- SHORT_SHA=$(echo "${{ steps.get-revision .outputs.latest_revision }}" | cut -c1-8)
66
+ COMMIT_DATE=$(git show -s --format=%ci ${{ steps.update .outputs.new_revision }})
67
+ COMMIT_SUBJECT=$(git show -s --format=%s ${{ steps.update .outputs.new_revision }})
68
+ COMMIT_AUTHOR=$(git show -s --format=%an ${{ steps.update .outputs.new_revision }})
69
+ SHORT_SHA=$(echo "${{ steps.update .outputs.new_revision }}" | cut -c1-8)
125
70
126
71
echo "commit_date=$COMMIT_DATE" >> $GITHUB_OUTPUT
127
72
echo "commit_subject=$COMMIT_SUBJECT" >> $GITHUB_OUTPUT
@@ -131,14 +76,7 @@ jobs:
131
76
# Cleanup
132
77
rm -rf "$TEMP_DIR"
133
78
134
- - name : Run tests
135
- if : steps.get-revision.outputs.needs_update == 'true'
136
- run : |
137
- echo "🧪 Running tests to verify update..."
138
- bash ./tool/test.sh
139
-
140
79
- name : Check for changes
141
- if : steps.get-revision.outputs.needs_update == 'true'
142
80
id : changes
143
81
run : |
144
82
if git diff --quiet; then
@@ -151,72 +89,79 @@ jobs:
151
89
fi
152
90
153
91
- name : Create Pull Request
154
- if : steps.get-revision.outputs.needs_update == 'true' && steps. changes.outputs.has_changes == 'true'
92
+ if : steps.changes.outputs.has_changes == 'true'
155
93
uses : peter-evans/create-pull-request@v5
156
94
with :
157
95
token : ${{ secrets.GITHUB_TOKEN }}
158
96
commit-message : |
159
- Update BoringSSL to ${{ steps.boringssl-info.outputs.short_sha }}
97
+ chore: Update BoringSSL to ${{ steps.boringssl-info.outputs.short_sha }}
160
98
161
- - Updated from ${{ steps.get- revision.outputs.current_revision }} to ${{ steps.get-revision .outputs.latest_revision }}
162
- - Latest commit : ${{ steps.boringssl-info.outputs.commit_subject }}
99
+ Updates BoringSSL to revision ${{ steps.update .outputs.new_revision }}
100
+ - Commit : ${{ steps.boringssl-info.outputs.commit_subject }}
163
101
- Author: ${{ steps.boringssl-info.outputs.commit_author }}
164
102
- Date: ${{ steps.boringssl-info.outputs.commit_date }}
165
103
title : ' chore: Update BoringSSL to ${{ steps.boringssl-info.outputs.short_sha }}'
166
104
body : |
167
105
## 🔄 Automated BoringSSL Update
168
106
169
- This PR updates BoringSSL to the latest revision.
170
-
171
- ### Changes
172
- - **From**: `${{ steps.get-revision.outputs.current_revision }}`
173
- - **To**: `${{ steps.get-revision.outputs.latest_revision }}`
107
+ This PR updates BoringSSL to revision **${{ steps.boringssl-info.outputs.short_sha }}**.
174
108
175
- ### Latest Commit Details
176
- - **Subject**: ${{ steps.boringssl-info.outputs.commit_subject }}
109
+ ### 📋 Update Summary
110
+ - **Revision**: [${{ steps.boringssl-info.outputs.short_sha }}](https://boringssl.googlesource.com/boringssl/+/${{ steps.update.outputs.new_revision }})
111
+ - **Commit**: ${{ steps.boringssl-info.outputs.commit_subject }}
177
112
- **Author**: ${{ steps.boringssl-info.outputs.commit_author }}
178
113
- **Date**: ${{ steps.boringssl-info.outputs.commit_date }}
179
- - **SHA**: [${{ steps.boringssl-info.outputs.short_sha }}](https://boringssl.googlesource.com/boringssl/+/${{ steps.get-revision.outputs.latest_revision }})
180
114
181
- ### What's Updated
182
- - Updated `tool/update-boringssl.py` with new revision
183
- - Refreshed BoringSSL source files and headers
184
- - Updated CMake configuration files
185
- - Regenerated symbols table and FFI bindings
186
- - **Tests passed** ✅ (verified during update process)
115
+ ### 🔧 What's Updated
116
+ - ✅ **BoringSSL Sources**: Updated to latest revision
117
+ - ✅ **CMake Configuration**: Regenerated `sources.cmake`
118
+ - ✅ **FFI Bindings**: Updated Dart bindings for BoringSSL
119
+ - ✅ **Symbols Table**: Regenerated symbol lookup table
120
+ - ✅ **Darwin Sources**: Updated fake Darwin sources
121
+ - ✅ **Tests**: All tests pass (verified during update)
122
+
123
+ ### 🧪 Testing Status
124
+ - [x] **Build Tests**: ✅ Passed
125
+ - [x] **Unit Tests**: ✅ Passed
126
+ - [x] **Integration Tests**: ✅ Passed
127
+ - [x] **Chrome Tests**: ✅ Passed
128
+ - [x] **Firefox Tests**: ✅ Passed
129
+ - [ ] **Manual Verification**: Pending review
187
130
188
- ### Testing Status
189
- - [x] Build tests pass
190
- - [x] Unit tests pass
191
- - [x] Integration tests pass
192
- - [ ] Manual verification on target platforms
131
+ ### 📁 Files Changed
132
+ - `tool/REVISION` - Updated to new revision
133
+ - `third_party/boringssl/` - Updated source files
134
+ - `darwin/third_party/boringssl/` - Updated Darwin sources
135
+ - `lib/src/third_party/boringssl/generated_bindings.dart` - Updated FFI bindings
136
+ - `src/symbols.generated.c` - Updated symbol table
193
137
194
138
---
195
139
196
- 🤖 This PR was created automatically by the Update BoringSSL workflow.
140
+ 🤖 **Automated by**: Update BoringSSL workflow
197
141
198
142
**Review Guidelines:**
199
- 1. Check that the build and tests pass
200
- 2. Review any breaking changes in the BoringSSL changelog
201
- 3. Test critical cryptographic operations
202
- 4. Verify Windows compatibility (especially ECDH PKCS8 operations)
143
+ 1. ✅ Verify all tests pass in CI
144
+ 2. 🔍 Review any breaking changes in BoringSSL changelog
145
+ 3. 🧪 Test critical cryptographic operations locally
146
+ 4. 🌐 Verify cross-platform compatibility (Windows, macOS, Linux)
147
+ 5. 📱 Test mobile platforms if applicable
203
148
149
+ **Note**: This update was performed using the automated `bump-boringssl-revision.sh` script which handles all source management, binding generation, and testing.
204
150
branch : update-boringssl-${{ steps.boringssl-info.outputs.short_sha }}
205
151
branch-suffix : timestamp
206
152
delete-branch : true
207
153
labels : |
208
154
dependencies
209
155
automated-pr
210
156
boringssl-update
157
+ security
211
158
212
159
- name : Summary
213
160
run : |
214
- if [ "${{ steps.get-revision.outputs.needs_update }}" = "false" ]; then
215
- echo "✅ No update needed - already at latest BoringSSL revision"
216
- elif [ "${{ steps.changes.outputs.has_changes }}" = "false" ]; then
217
- echo "ℹ️ Update script ran but no changes were detected"
161
+ if [ "${{ steps.changes.outputs.has_changes }}" = "false" ]; then
162
+ echo "ℹ️ No changes detected - BoringSSL is already up to date"
218
163
else
219
164
echo "🚀 Successfully created PR to update BoringSSL"
220
- echo " From : ${{ steps.get-revision .outputs.current_revision }}"
221
- echo " To : ${{ steps.get-revision .outputs.latest_revision }}"
165
+ echo " Revision : ${{ steps.update .outputs.new_revision }}"
166
+ echo " Commit : ${{ steps.boringssl-info .outputs.commit_subject }}"
222
167
fi
0 commit comments