Skip to content

Commit ce7bfe0

Browse files
committed
Merge branch 'develop'
2 parents 7e75e12 + 43cfe30 commit ce7bfe0

File tree

5 files changed

+49
-27
lines changed

5 files changed

+49
-27
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Copyright 2020-2021 Peter Dimov
22
# Copyright 2021 Andrey Semashev
3-
# Copyright 2021-2025 Alexander Grund
3+
# Copyright 2021-2026 Alexander Grund
44
# Copyright 2022 James E. King III
55
#
66
# Distributed under the Boost Software License, Version 1.0.
@@ -9,6 +9,9 @@
99
---
1010
name: CI
1111

12+
permissions:
13+
contents: write
14+
1215
on:
1316
pull_request:
1417
push:

.github/workflows/ci_tests.yml

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
1-
# Copyright 2019 - 2025 Alexander Grund
1+
# Copyright 2019 - 2026 Alexander Grund
22
# Distributed under the Boost Software License, Version 1.0.
33
# https://www.boost.org/LICENSE_1_0.txt
44

55
name: CI Tests
66

7+
permissions:
8+
contents: write
9+
710
on:
811
pull_request:
912
push:
@@ -55,10 +58,10 @@ jobs:
5558
# Boost.Iostreams doesn't support VS 2022 until 1.69
5659
BOOST_VERSION: ${{ startsWith(matrix.generator, 'Visual Studio') && '1.69.0' || '1.66.0' }}
5760
steps:
58-
- uses: actions/checkout@v4
61+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
5962
- name: Sanity check version
6063
run: grep -E 'set\(_version [0-9]' CMakeLists.txt
61-
- uses: actions/cache@v4
64+
- uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
6265
id: cache-boost
6366
with:
6467
path: ${{env.DEP_DIR}}
@@ -72,7 +75,7 @@ jobs:
7275
run: echo "BOOST_ROOT=${DEP_DIR//\\/\/}/boost_${BOOST_VERSION//./_}" >> $GITHUB_ENV
7376

7477
# Install Boost
75-
- uses: actions/checkout@v4
78+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
7679
if: matrix.standalone == 'Boost' && steps.cache-boost.outputs.cache-hit != 'true'
7780
with:
7881
repository: boostorg/boost
@@ -178,7 +181,7 @@ jobs:
178181
CreateDocuTest:
179182
runs-on: ubuntu-latest
180183
steps:
181-
- uses: actions/checkout@v4
184+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
182185
- name: Create documentation
183186
run: |
184187
sudo apt-get install -y doxygen
@@ -187,9 +190,9 @@ jobs:
187190
CreateBoostDocuTest:
188191
runs-on: ubuntu-latest
189192
steps:
190-
- uses: actions/checkout@v4
193+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
191194
- name: Fetch Boost.CI
192-
uses: actions/checkout@v4
195+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
193196
with:
194197
repository: boostorg/boost-ci
195198
ref: master
@@ -206,8 +209,8 @@ jobs:
206209
CheckFormatting:
207210
runs-on: ubuntu-latest
208211
steps:
209-
- uses: actions/checkout@v4
210-
- uses: DoozyX/clang-format-lint-action@v0.18
212+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
213+
- uses: DoozyX/clang-format-lint-action@bcb4eb2cb0d707ee4f3e5cc3b456eb075f12cf73 # v0.20
211214
with:
212215
exclude: './doc'
213216
clangFormatVersion: 10

.github/workflows/release.yml

Lines changed: 23 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
# Distributed under the Boost Software License, Version 1.0.
33
# https://www.boost.org/LICENSE_1_0.txt
44

5+
permissions:
6+
contents: write
7+
58
on:
69
push:
710
tags:
@@ -14,12 +17,10 @@ jobs:
1417
release:
1518
name: Create Release
1619
runs-on: ubuntu-latest
17-
permissions:
18-
contents: write
1920
env:
2021
DEP_DIR: ${{github.workspace}}/dependencies
2122
steps:
22-
- uses: actions/checkout@v4
23+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
2324
- name: Extract tag name and matching commit on standalone branch
2425
id: get_tag
2526
run: |
@@ -33,18 +34,27 @@ jobs:
3334
echo "tag=v$version" >> $GITHUB_OUTPUT
3435
SOURCE_SHA=$(git rev-parse origin/develop)
3536
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
37+
standalone_commit=0
38+
# Search standalone branch for last 10 more commits if the current one isn't found
39+
for i in {0..10}; do
40+
curSha=$(git rev-parse --short "${SOURCE_SHA}~${i}")
41+
# Find matching standalone commit hash
42+
standalone_commit_matches=$(git log origin/standalone --format="%H" --grep="^Source commit: $curSha\$")
43+
if ! count=$(grep -c . <<<"$standalone_commit_matches"); then
44+
echo "WARN: Did not found source commit for $curSha ($i)"
45+
elif [[ $count -ne 1 ]]; then
46+
echo "ERROR: Found more than 1 related commit for $curSha ($i): $standalone_commit_matches"
47+
exit
48+
else
49+
standalone_commit=$curSha
50+
fi
51+
done;
52+
if [[ $standalone_commit == "0" ]]; then
4053
echo "ERROR: Did not found source commit for $SOURCE_SHA"
4154
exit 1
42-
elif [[ $count -ne 1 ]]; then
43-
echo "ERROR: Found more than 1 related commit: $standalone_commit_matches"
44-
exit 1
4555
fi
4656
echo "source_commit=$SOURCE_SHA" >> $GITHUB_OUTPUT
47-
echo "standalone_commit=$standalone_commit_matches" >> $GITHUB_OUTPUT
57+
echo "standalone_commit=$standalone_commit" >> $GITHUB_OUTPUT
4858
- name: Sanity check version
4959
run: |
5060
version=${{steps.get_tag.outputs.tag}}
@@ -110,7 +120,7 @@ jobs:
110120
version=${{steps.get_tag.outputs.tag}}
111121
tag_name=standalone-$version
112122
git tag -a "$tag_name" "${{steps.get_tag.outputs.standalone_commit}}" \
113-
-m "Standalone version for v$version" \
123+
-m "Standalone version for $version" \
114124
-m "Source-Commit: ${{steps.get_tag.outputs.source_commit}}"
115125
git show "$tag_name"
116126
if [[ "{{github.event_name}}" == "push" ]]; then
@@ -119,7 +129,7 @@ jobs:
119129
120130
- name: Create Release
121131
if: github.event_name == 'push'
122-
uses: softprops/action-gh-release@v2
132+
uses: softprops/action-gh-release@a06a81a03ee405af7f2048a818ed3f03bbf83c7b # v2.5.0
123133
env:
124134
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
125135
with:

.github/workflows/update_standalone.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
# Distributed under the Boost Software License, Version 1.0.
33
# https://www.boost.org/LICENSE_1_0.txt
44

5+
permissions:
6+
contents: write
7+
58
on:
69
push:
710
branches: [develop]
@@ -16,7 +19,7 @@ jobs:
1619
name: Update standalone branch
1720
runs-on: ubuntu-latest
1821
steps:
19-
- uses: actions/checkout@v3
22+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
2023
- name: Setup git
2124
run: |
2225
git config --global user.email "$GITHUB_ACTOR@users.noreply.github.com"

test/test_iostream.cpp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -491,9 +491,9 @@ class RedirectStdio
491491
void test_console()
492492
{
493493
#ifdef __MINGW32__
494-
bool isMinGW_CI = std::getenv("CI");
494+
const bool isMinGW_CI = std::getenv("CI");
495495
#else
496-
bool isMinGW_CI = false;
496+
const bool isMinGW_CI = false;
497497
#endif
498498
#ifndef BOOST_NOWIDE_DISABLE_CIN_TEST
499499
std::cout << "Test cin console: " << std::flush;
@@ -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)