Skip to content

Commit e92896e

Browse files
author
codethinki
committed
trying simplified ci
1 parent 7b77981 commit e92896e

9 files changed

Lines changed: 56 additions & 85 deletions

File tree

.clang-format

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ AlignAfterOpenBracket: BlockIndent
66
AlignConsecutiveAssignments: false
77
AlignConsecutiveDeclarations: false
88
AlignOperands: false
9-
AlignTrailingComments: false
9+
AlignEscapedNewlines: Left
1010
AllowAllArgumentsOnNextLine: false
1111
AllowAllParametersOfDeclarationOnNextLine: false
1212
AllowShortBlocksOnASingleLine: Empty
@@ -39,7 +39,7 @@ BraceWrapping:
3939
BreakBeforeBraces: Custom
4040
BreakBeforeTernaryOperators: true
4141
BreakConstructorInitializers: AfterColon
42-
BreakInheritanceList: AfterColon
42+
BreakInheritanceList: BeforeComma
4343
ColumnLimit: 110
4444
CompactNamespaces: false
4545
ConstructorInitializerAllOnOneLineOrOnePerLine: false

.github/actions/setup-windows/action.yml

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -18,26 +18,18 @@ runs:
1818
restore-keys: |
1919
buildcache-windows-${{ inputs.compiler }}-
2020
21-
- name: Restore Custom Vcpkg
22-
id: restore-vcpkg
23-
uses: actions/cache/restore@v4
24-
with:
25-
path: c:\vcpkg-custom
26-
key: vcpkg-custom-repo-windows-restore-search # Restore latest available
27-
restore-keys: |
28-
vcpkg-custom-repo-windows-
29-
3021
- name: Setup Vcpkg Environment
3122
shell: pwsh
3223
run: |
33-
$vcpkgPath = "c:\vcpkg-custom"
34-
if (!(Test-Path "$vcpkgPath\.git")) {
35-
Write-Error "Vcpkg not found! Did prepare-windows run?"
24+
$vcpkgPath = $env:VCPKG_INSTALLATION_ROOT
25+
if (-not (Test-Path "$vcpkgPath")) {
26+
Write-Error "Vcpkg not found at VCPKG_INSTALLATION_ROOT ($vcpkgPath)"
3627
exit 1
3728
}
3829
39-
echo "VCPKG_ROOT=$vcpkgPath" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
40-
echo "$vcpkgPath" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
30+
Write-Host "Using Vcpkg at $vcpkgPath"
31+
"VCPKG_ROOT=$vcpkgPath" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
32+
"VCPKG_BINARY_SOURCES=clear;x-gha,readwrite" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
4133
4234
- name: Install BuildCache
4335
shell: pwsh

.github/workflows/test.yml

Lines changed: 18 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,19 @@ name: Test CI
22

33
on:
44
push:
5-
branches: [ "main", "master" ]
5+
branches: ["main", "master"]
66
pull_request:
7-
branches: [ "main", "master" ]
7+
branches: ["main", "master"]
88
workflow_dispatch:
99

1010
permissions:
1111
contents: read
1212
packages: write
1313

1414
jobs:
15+
#
16+
#linux
17+
#
1518
linux-prepare:
1619
name: Prepare Linux Container
1720
runs-on: ubuntu-latest
@@ -31,29 +34,18 @@ jobs:
3134
- uses: actions/checkout@v4
3235
with:
3336
submodules: recursive
34-
37+
3538
- name: Setup Linux Env
3639
uses: ./.github/actions/setup-linux
3740

38-
# - name: Create vcpkg-archives
39-
# run: mkdir -p vcpkg-archives
40-
41-
# - name: Cache vcpkg artifacts
42-
# uses: actions/cache@v4
43-
# with:
44-
# path: vcpkg-archives
45-
# key: vcpkg-archives-linux-${{ hashFiles('vcpkg.json') }}
46-
# restore-keys: |
47-
# vcpkg-archives-linux-
48-
4941
- name: Cache vcpkg installed
5042
uses: actions/cache@v4
5143
with:
52-
path: |
53-
out/build/ci-linux-${{ matrix.compiler }}-release/vcpkg_installed
54-
key: vcpkg-installed-linux-${{ matrix.compiler }}-${{ hashFiles('vcpkg.json') }}
55-
restore-keys: |
56-
vcpkg-installed-linux-${{ matrix.compiler }}-
44+
path: |
45+
out/build/ci-linux-${{ matrix.compiler }}-release/vcpkg_installed
46+
key: vcpkg-installed-linux-${{ matrix.compiler }}-${{ hashFiles('vcpkg.json') }}
47+
restore-keys: |
48+
vcpkg-installed-linux-${{ matrix.compiler }}-
5749
5850
- name: Configure
5951
uses: ./.github/actions/run-linux
@@ -75,18 +67,13 @@ jobs:
7567
- name: Fix permissions
7668
if: always()
7769
run: sudo chown -R $(id -u):$(id -g) out/build
78-
79-
windows-prepare:
80-
name: Prepare Windows
81-
runs-on: windows-latest
82-
steps:
83-
- uses: actions/checkout@v4
84-
- name: Prepare Windows Env (Warmup Cache)
85-
uses: ./.github/actions/prepare-windows
70+
71+
#
72+
#windows
73+
#
8674

8775
windows-test:
8876
name: Windows Test (${{ matrix.compiler }})
89-
needs: windows-prepare
9077
runs-on: windows-latest
9178
strategy:
9279
fail-fast: false
@@ -100,9 +87,9 @@ jobs:
10087

10188
- uses: actions/setup-python@v5
10289
with:
103-
python-version: '3.x'
104-
cache: 'pip'
105-
cache-dependency-path: '.github/requirements.txt'
90+
python-version: "3.x"
91+
cache: "pip"
92+
cache-dependency-path: ".github/requirements.txt"
10693

10794
- name: Install CMake & Ninja
10895
shell: pwsh
@@ -118,22 +105,6 @@ jobs:
118105
# shell: pwsh
119106
# run: New-Item -ItemType Directory -Force -Path vcpkg-archives
120107

121-
# - name: Cache vcpkg artifacts
122-
# uses: actions/cache@v4
123-
# with:
124-
# path: vcpkg-archives
125-
# key: vcpkg-archives-windows-${{ hashFiles('vcpkg.json') }}
126-
# restore-keys: |
127-
# vcpkg-archives-windows-
128-
129-
- name: Cache vcpkg installed
130-
uses: actions/cache@v4
131-
with:
132-
path: out/build/ci-windows-*/vcpkg_installed
133-
key: vcpkg-installed-windows-${{ hashFiles('vcpkg.json') }}
134-
restore-keys: |
135-
vcpkg-installed-windows-
136-
137108
- name: Configure
138109
shell: pwsh
139110
run: |

cth_coro/incl/cth/coro/tasks/awaiters/dev/capture_promise_awaiter.hpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@
55
namespace cth::co::dev {
66

77
template<class Promise>
8-
struct capture_promise_awaiter : basic_promise_awaiter<Promise>, capture_promise_awaiter_base {
8+
struct capture_promise_awaiter
9+
: basic_promise_awaiter<Promise>
10+
, capture_promise_awaiter_base {
911
using dev::basic_promise_awaiter<Promise>::basic_promise_awaiter;
1012
};
1113
}

cth_coro/incl/cth/coro/tasks/awaiters/this_coro_promise_awaiter.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77

88
namespace cth::co {
99
template<cth_promise Promise>
10-
struct this_coro_promise_awaiter :
11-
this_coro_promise_awaiter_base,
12-
private dev::basic_promise_awaiter<Promise> {
10+
struct this_coro_promise_awaiter
11+
: this_coro_promise_awaiter_base
12+
, private dev::basic_promise_awaiter<Promise> {
1313
private:
1414
using base_t = dev::basic_promise_awaiter<Promise>;
1515

cth_coro/incl/cth/coro/tasks/dev/scheduled_task.hpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@
1010
namespace cth::co::dev {
1111

1212
template<class T>
13-
struct scheduled_promise : basic_promise<T>, this_coro_promise_base {
13+
struct scheduled_promise
14+
: basic_promise<T>
15+
, this_coro_promise_base {
1416
explicit scheduled_promise(this_coro::payload payload) : this_coro_promise_base{std::move(payload)} {}
1517

1618
template<class... Args>
@@ -25,8 +27,8 @@ struct scheduled_promise : basic_promise<T>, this_coro_promise_base {
2527
namespace cth::co {
2628

2729
template<class T>
28-
class [[nodiscard]] scheduled_task :
29-
public task_base<dev::scheduled_promise<T>, dev::capture_promise_awaiter> {
30+
class [[nodiscard]] scheduled_task
31+
: public task_base<dev::scheduled_promise<T>, dev::capture_promise_awaiter> {
3032
using base_t = task_base<dev::scheduled_promise<T>, dev::capture_promise_awaiter>;
3133

3234
using base_t::base_t;

cth_coro/incl/cth/coro/tasks/executor_task.hpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@ class executor_task;
1414

1515
namespace cth::co::dev {
1616
template<class T>
17-
struct executor_promise : basic_promise<T>, this_coro_promise_base {
17+
struct executor_promise
18+
: basic_promise<T>
19+
, this_coro_promise_base {
1820
executor_task<T> get_return_object() noexcept;
1921
};
2022
}

cth_coro/incl/cth/coro/tasks/sync_task.hpp

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@
1212

1313
namespace cth::co::dev {
1414
template<class T>
15-
struct sync_promise_template :
16-
sync_promise_base,
17-
basic_promise<T, std::suspend_always{}, final_sync_awaiter{}> {};
15+
struct sync_promise_template
16+
: sync_promise_base
17+
, basic_promise<T, std::suspend_always{}, final_sync_awaiter{}> {};
1818

1919
template<sync_promise_type Promise, template<class> class Awaiter>
2020
class [[nodiscard]] sync_task_template : public task_base<Promise, Awaiter> {
@@ -44,7 +44,9 @@ struct sync_promise : dev::sync_promise_template<T> {
4444

4545

4646
template<class T>
47-
struct sync_executor_promise : this_coro_promise_base, sync_promise_template<T> {
47+
struct sync_executor_promise
48+
: this_coro_promise_base
49+
, sync_promise_template<T> {
4850
sync_executor_task<T> get_return_object() noexcept;
4951
};
5052
}
@@ -72,8 +74,8 @@ class sync_task : public dev::sync_task_template<dev::sync_promise<T>, dev::basi
7274
using sync_void_task = sync_task<void>;
7375

7476
template<class T>
75-
class sync_executor_task :
76-
public dev::sync_task_template<dev::sync_executor_promise<T>, this_coro_promise_awaiter> {};
77+
class sync_executor_task
78+
: public dev::sync_task_template<dev::sync_executor_promise<T>, this_coro_promise_awaiter> {};
7779

7880
using sync_executor_void_task = sync_executor_task<void>;
7981
}

cth_coro/src/coro/utility/boost.hpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55

66
namespace bas = boost::asio;
77

8-
#define BOOST_EC_STABLE_THROW(ec, msg, ...) \
9-
CTH_STABLE_THROW_T(cth::except::coro_exception, ec.failed(), msg, __VA_ARGS__) { \
10-
details->add("message: {}", ec.message()); \
11-
details->add("category: {}", ec.category().name()); \
12-
if(ec.has_location()) { \
13-
auto const& loc = ec.location(); \
14-
details->add("location: {} ({}, {})", loc.file_name(), loc.line(), loc.column()); \
15-
} \
8+
#define BOOST_EC_STABLE_THROW(ec, msg, ...) \
9+
CTH_STABLE_THROW_T(cth::except::coro_exception, ec.failed(), msg, __VA_ARGS__) { \
10+
details->add("message: {}", ec.message()); \
11+
details->add("category: {}", ec.category().name()); \
12+
if(ec.has_location()) { \
13+
auto const& loc = ec.location(); \
14+
details->add("location: {} ({}, {})", loc.file_name(), loc.line(), loc.column()); \
15+
} \
1616
}

0 commit comments

Comments
 (0)