Skip to content

Commit 45a2d04

Browse files
authored
Merge pull request #206 from boostorg/pin-actions
2 parents a557f20 + 360eaa1 commit 45a2d04

File tree

4 files changed

+33
-21
lines changed

4 files changed

+33
-21
lines changed

.github/workflows/ci_tests.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,10 @@ jobs:
5555
# Boost.Iostreams doesn't support VS 2022 until 1.69
5656
BOOST_VERSION: ${{ startsWith(matrix.generator, 'Visual Studio') && '1.69.0' || '1.66.0' }}
5757
steps:
58-
- uses: actions/checkout@v4
58+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
5959
- name: Sanity check version
6060
run: grep -E 'set\(_version [0-9]' CMakeLists.txt
61-
- uses: actions/cache@v4
61+
- uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
6262
id: cache-boost
6363
with:
6464
path: ${{env.DEP_DIR}}
@@ -72,7 +72,7 @@ jobs:
7272
run: echo "BOOST_ROOT=${DEP_DIR//\\/\/}/boost_${BOOST_VERSION//./_}" >> $GITHUB_ENV
7373

7474
# Install Boost
75-
- uses: actions/checkout@v4
75+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
7676
if: matrix.standalone == 'Boost' && steps.cache-boost.outputs.cache-hit != 'true'
7777
with:
7878
repository: boostorg/boost
@@ -178,7 +178,7 @@ jobs:
178178
CreateDocuTest:
179179
runs-on: ubuntu-latest
180180
steps:
181-
- uses: actions/checkout@v4
181+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
182182
- name: Create documentation
183183
run: |
184184
sudo apt-get install -y doxygen
@@ -187,9 +187,9 @@ jobs:
187187
CreateBoostDocuTest:
188188
runs-on: ubuntu-latest
189189
steps:
190-
- uses: actions/checkout@v4
190+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
191191
- name: Fetch Boost.CI
192-
uses: actions/checkout@v4
192+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
193193
with:
194194
repository: boostorg/boost-ci
195195
ref: master
@@ -206,8 +206,8 @@ jobs:
206206
CheckFormatting:
207207
runs-on: ubuntu-latest
208208
steps:
209-
- uses: actions/checkout@v4
210-
- uses: DoozyX/clang-format-lint-action@v0.18
209+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
210+
- uses: DoozyX/clang-format-lint-action@bcb4eb2cb0d707ee4f3e5cc3b456eb075f12cf73 # v0.20
211211
with:
212212
exclude: './doc'
213213
clangFormatVersion: 10

.github/workflows/release.yml

Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
env:
2020
DEP_DIR: ${{github.workspace}}/dependencies
2121
steps:
22-
- uses: actions/checkout@v4
22+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
2323
- name: Extract tag name and matching commit on standalone branch
2424
id: get_tag
2525
run: |
@@ -33,18 +33,27 @@ jobs:
3333
echo "tag=v$version" >> $GITHUB_OUTPUT
3434
SOURCE_SHA=$(git rev-parse origin/develop)
3535
fi
36-
SOURCE_SHA=$(git rev-parse --short "$SOURCE_SHA")
37-
# Find matching standalone commit hash
38-
standalone_commit_matches=$(git log origin/standalone --format="%H" --grep="^Source commit: $SOURCE_SHA\$")
39-
if ! count=$(grep -c . <<<"$standalone_commit_matches"); then
36+
standalone_commit=0
37+
# Search standalone branch for last 10 more commits if the current one isn't found
38+
for i in {0..10}; do
39+
curSha=$(git rev-parse --short "${SOURCE_SHA}~${i}")
40+
# Find matching standalone commit hash
41+
standalone_commit_matches=$(git log origin/standalone --format="%H" --grep="^Source commit: $curSha\$")
42+
if ! count=$(grep -c . <<<"$standalone_commit_matches"); then
43+
echo "WARN: Did not found source commit for $curSha ($i)"
44+
elif [[ $count -ne 1 ]]; then
45+
echo "ERROR: Found more than 1 related commit for $curSha ($i): $standalone_commit_matches"
46+
exit
47+
else
48+
standalone_commit=$curSha
49+
fi
50+
done;
51+
if [[ $standalone_commit == "0" ]]; then
4052
echo "ERROR: Did not found source commit for $SOURCE_SHA"
4153
exit 1
42-
elif [[ $count -ne 1 ]]; then
43-
echo "ERROR: Found more than 1 related commit: $standalone_commit_matches"
44-
exit 1
4554
fi
4655
echo "source_commit=$SOURCE_SHA" >> $GITHUB_OUTPUT
47-
echo "standalone_commit=$standalone_commit_matches" >> $GITHUB_OUTPUT
56+
echo "standalone_commit=$standalone_commit" >> $GITHUB_OUTPUT
4857
- name: Sanity check version
4958
run: |
5059
version=${{steps.get_tag.outputs.tag}}
@@ -110,7 +119,7 @@ jobs:
110119
version=${{steps.get_tag.outputs.tag}}
111120
tag_name=standalone-$version
112121
git tag -a "$tag_name" "${{steps.get_tag.outputs.standalone_commit}}" \
113-
-m "Standalone version for v$version" \
122+
-m "Standalone version for $version" \
114123
-m "Source-Commit: ${{steps.get_tag.outputs.source_commit}}"
115124
git show "$tag_name"
116125
if [[ "{{github.event_name}}" == "push" ]]; then
@@ -119,7 +128,7 @@ jobs:
119128
120129
- name: Create Release
121130
if: github.event_name == 'push'
122-
uses: softprops/action-gh-release@v2
131+
uses: softprops/action-gh-release@a06a81a03ee405af7f2048a818ed3f03bbf83c7b # v2.5.0
123132
env:
124133
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
125134
with:

.github/workflows/update_standalone.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
name: Update standalone branch
1717
runs-on: ubuntu-latest
1818
steps:
19-
- uses: actions/checkout@v3
19+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
2020
- name: Setup git
2121
run: |
2222
git config --global user.email "$GITHUB_ACTOR@users.noreply.github.com"

test/test_iostream.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -557,7 +557,10 @@ void test_console()
557557
cerr << testString << std::flush;
558558

559559
const auto data = stderrHandle.getBufferData();
560-
TEST_EQ(data, nw::widen(testString));
560+
if(isMinGW_CI && data.empty())
561+
std::cout << "WARNING: MinGW CI issue detected, skipping part of test"; // LCOV_EXCL_LINE
562+
else
563+
TEST_EQ(data, nw::widen(testString));
561564
}
562565
std::cout << "Console tests done" << std::endl;
563566
}

0 commit comments

Comments
 (0)