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

Fix #44 #45

Closed
wants to merge 2 commits into from
Closed
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
22 changes: 18 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
#
# To add more build types (Release, Debug, RelWithDebInfo, etc.) customize the build_type list.
matrix:
os: [ubuntu-24.04, windows-latest]
os: [ubuntu-24.04, windows-latest, macos-latest]
build_type: [Release, Debug]
c_compiler: [gcc, clang, cl]
include:
Expand All @@ -36,26 +36,40 @@ jobs:
- os: ubuntu-24.04
c_compiler: clang
cpp_compiler: clang++
- os: macos-latest
c_compiler: clang
cpp_compiler: clang++
exclude:
- os: windows-latest
c_compiler: gcc
- os: windows-latest
c_compiler: clang
- os: ubuntu-24.04
c_compiler: cl
- os: macos-latest
c_compiler: cl
- os: macos-latest
c_compiler: gcc

steps:
- uses: actions/checkout@v4
- name: Install ninja-build tool
uses: seanmiddleditch/gha-setup-ninja@v5
- name: compiler setup

- name: compiler setup on Linux
if: startsWith(runner.os, 'Linux')
shell: bash
run: |
echo "CC=${{ matrix.c_compiler }}" >> $GITHUB_ENV
echo "CXX=${{ matrix.cpp_compiler }}" >> $GITHUB_ENV

- name: compiler setup on Mac OS
if: startsWith(runner.os, 'macOS') && startsWith(matrix.c_compiler, 'clang')
shell: bash
run: |
echo "CC=$(brew --prefix llvm@15)/bin/clang" >> $GITHUB_ENV
echo "CXX=$(brew --prefix llvm@15)/bin/clang++" >> $GITHUB_ENV

- name: Install Qt
# You may pin to the exact commit or the version.
# uses: jurplel/install-qt-action@f03f05556819ceb3781ee2f455ec44c339d683c0
Expand Down Expand Up @@ -111,7 +125,7 @@ jobs:

- name: Build
# Build your program with the given configuration. Note that --config is needed because the default Windows generator is a multi-config generator (Visual Studio generator).
run: cmake --build ${{ steps.strings.outputs.build-output-dir }} --config ${{ matrix.build_type }}
run: cmake --build ${{ steps.strings.outputs.build-output-dir }} --config ${{ matrix.build_type }} -v

- name: Test
working-directory: ${{ steps.strings.outputs.build-output-dir }}
Expand Down
4 changes: 3 additions & 1 deletion include/ucoro/awaitable.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,8 @@ namespace ucoro
await_transformer<T>::await_transform(std::move(a));
};

template<typename T>
struct is_not_awaitable : std::false_type{};

} // namespace concepts

Expand Down Expand Up @@ -358,7 +360,7 @@ namespace ucoro
}
else
{
static_assert(0, "co_await must been used on an awaitable");
static_assert(concepts::is_not_awaitable<A>::value, "co_await must be called on an awaitable type");
}
}

Expand Down
Loading