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

ci: node20 actions #846

Merged
merged 3 commits into from
Jul 5, 2024
Merged
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 36 additions & 23 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,23 +53,22 @@ jobs:
matrix: ${{ steps.cpp-matrix.outputs.matrix }}
steps:
- name: Generate Test Matrix
uses: alandefreitas/cpp-actions/[email protected].2
uses: alandefreitas/cpp-actions/[email protected].3
id: cpp-matrix
with:
compilers: |
gcc >=4.8
clang >=3.8 <18
clang >=3.8
msvc >=14.20
apple-clang *
mingw *
clang-cl *
standards: '>=11'
latest-factors: |
gcc Coverage UBSan
latest-factors: ''
factors: |
gcc ASan Shared No-Threads
gcc Coverage ASan UBSan Shared No-Threads
msvc Shared x86
clang Time-Trace Fuzz ASan+UBSan IntegerSan
clang ASan UBSan IntegerSan Time-Trace Fuzz
mingw Shared
trace-commands: true

Expand All @@ -90,25 +89,39 @@ jobs:
timeout-minutes: 120

steps:
# GitHub Actions no longer support older containers.
# The workaround is to install our own Node.js for the actions.
- name: Patch Node
# The containers that need Node.js 20 will have volumes set up so that
# the Node.js 20 installation can go there.
if: ${{ matrix.container.volumes }}
run: |
set -x
apt-get update
apt-get install -y curl xz-utils
curl -LO https://unofficial-builds.nodejs.org/download/release/v20.9.0/node-v20.9.0-linux-x64-glibc-217.tar.xz
tar -xf node-v20.9.0-linux-x64-glibc-217.tar.xz --strip-components 1 -C /node20217
ldd /__e/node20/bin/node

- name: Clone Boost.URL
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup C++
uses: alandefreitas/cpp-actions/[email protected].2
uses: alandefreitas/cpp-actions/[email protected].3
id: setup-cpp
with:
compiler: ${{ matrix.compiler }}
version: ${{ (matrix.subrange-policy == 'one-per-major' && matrix.major) || matrix.version }}
version: ${{ matrix.version }}

- name: Install packages
if: matrix.install != ''
uses: alandefreitas/cpp-actions/[email protected].2
uses: alandefreitas/cpp-actions/[email protected].3
id: package-install
with:
apt-get: ${{ matrix.install }}

- name: Clone Boost
uses: alandefreitas/cpp-actions/[email protected].2
uses: alandefreitas/cpp-actions/[email protected].3
id: boost-clone
with:
branch: ${{ (github.ref_name == 'master' && github.ref_name) || 'develop' }}
Expand Down Expand Up @@ -166,7 +179,7 @@ jobs:

- name: Fuzz corpus
if: matrix.fuzz
uses: actions/cache@v3.3.1
uses: actions/cache@v4
id: cache-corpus
with:
path: ${{ steps.patch.outputs.workspace_root }}/corpus.tar
Expand All @@ -176,7 +189,7 @@ jobs:
corpus-

- name: CMake Workflow
uses: alandefreitas/cpp-actions/[email protected].2
uses: alandefreitas/cpp-actions/[email protected].3
if: matrix.is-no-factor-intermediary != 'true'
with:
source-dir: ../boost-root
Expand All @@ -196,7 +209,7 @@ jobs:
trace-commands: true

- name: CMake Integration Workflow
uses: alandefreitas/cpp-actions/[email protected].2
uses: alandefreitas/cpp-actions/[email protected].3
if: matrix.is-no-factor-intermediary != 'true'
with:
source-dir: ../boost-root/libs/${{ steps.patch.outputs.module }}/test/cmake_test
Expand All @@ -212,7 +225,7 @@ jobs:
trace-commands: true

- name: CMake Root Workflow
uses: alandefreitas/cpp-actions/[email protected].2
uses: alandefreitas/cpp-actions/[email protected].3
if: matrix.is-no-factor-intermediary != 'true'
with:
source-dir: .
Expand All @@ -229,7 +242,7 @@ jobs:
trace-commands: true

- name: B2 Workflow
uses: alandefreitas/cpp-actions/[email protected].2
uses: alandefreitas/cpp-actions/[email protected].3
env:
# Set flags via B2 options exclusively
CFLAGS: ''
Expand Down Expand Up @@ -257,7 +270,7 @@ jobs:
warnings-as-errors: ${{ matrix.is-latest }}

- name: FlameGraph
uses: alandefreitas/cpp-actions/[email protected].2
uses: alandefreitas/cpp-actions/[email protected].3
if: matrix.time-trace
with:
source-dir: ../boost-root/libs/url
Expand Down Expand Up @@ -322,13 +335,13 @@ jobs:

steps:
- name: Clone Boost.URL
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
# Avoid the common API rate limit exceeded error in boostorg by including 100 latest commits in any case
fetch-depth: 100

- name: Changelog
uses: alandefreitas/cpp-actions/[email protected].2
uses: alandefreitas/cpp-actions/[email protected].3
with:
thank-non-regular: ${{ startsWith(github.ref, 'refs/tags/') }}
github-token: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -342,14 +355,14 @@ jobs:
runs-on: ${{ fromJSON(needs.runner-selection.outputs.labelmatrix)['ubuntu-latest'] }}
steps:
- name: Clone Boost.URL
uses: actions/checkout@v3
uses: actions/checkout@v4

- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: 18

- name: Setup C++
uses: alandefreitas/cpp-actions/[email protected].2
uses: alandefreitas/cpp-actions/[email protected].3
id: setup-cpp
with:
compiler: clang
Expand All @@ -361,7 +374,7 @@ jobs:
bash ./build_antora.sh

- name: Create Antora Docs Artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: antora-docs
path: doc/build/site
Expand Down
3 changes: 1 addition & 2 deletions extra/test_suite.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -217,8 +217,7 @@ inline std::string test_output_impl( char const& v )
else
{
char buffer[ 8 ];
std::sprintf( buffer, "\\x%02X", static_cast<unsigned char>( v ) );

std::snprintf( buffer, sizeof(buffer), "\\x%02X", static_cast<unsigned char>( v ) );
return buffer;
}
}
Expand Down
6 changes: 4 additions & 2 deletions test/unit/natvis.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,11 @@ struct natvis_test
{
auto const& c1 = boost::system::generic_category();
auto const& c2 = boost::system::system_category();
auto const& c3 = system::error_code(std::error_code()).category();
system::error_code e3{std::error_code()};
auto const& c3 = e3.category();
auto const& c4 = my_category();
auto const& c5 = system::error_code(error::not_a_base).category();
system::error_code e5(error::not_a_base);
auto const& c5 = e5.category();
ignore_unused(c1, c2, c3, c4, c5);
}

Expand Down
Loading