Skip to content
Open
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
62 changes: 44 additions & 18 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,29 +96,42 @@ jobs:
curl zip unzip tar pkg-config

# Use the capy branch with the same name as this build's branch
# (for pull requests: the source branch, then the target branch);
# fall back to capy's default branch.
# (for pull requests: the source branch, then the target branch).
# Inside a fork (a push or a PR within the fork) the owner's capy
# fork is preferred, so fork branches build against their matching
# capy fork branch. Cross-repo PRs into cppalliance resolve against
# cppalliance/capy as before. Fall back to capy's default branch.
- name: Resolve Capy branch
id: capy-ref
shell: bash
run: |
url=https://github.com/cppalliance/capy.git
repo=cppalliance/capy
ref=
for candidate in "${{ github.head_ref }}" "${{ github.base_ref }}" "${{ github.ref_name }}"; do
if [ -n "$candidate" ] && git ls-remote --exit-code --heads "$url" "$candidate" > /dev/null; then
ref="$candidate"
break
fi
[ -n "$candidate" ] || continue
probed=
for fork in "${{ github.repository_owner }}/capy" cppalliance/capy; do
# Skip a fork already probed for this candidate (the owner
# fork equals cppalliance/capy when running in cppalliance).
[ "$fork" = "$probed" ] && continue
probed="$fork"
if GIT_TERMINAL_PROMPT=0 git ls-remote --exit-code --heads "https://github.com/$fork.git" "$candidate" > /dev/null; then
repo="$fork"
ref="$candidate"
break 2
fi
done
done
if [ -z "$ref" ]; then
ref=$(git ls-remote --symref "$url" HEAD | awk '/^ref:/ { sub("refs/heads/", "", $2); print $2 }')
ref=$(GIT_TERMINAL_PROMPT=0 git ls-remote --symref "https://github.com/$repo.git" HEAD | awk '/^ref:/ { sub("refs/heads/", "", $2); print $2 }')
fi
echo "repo=$repo" >> "$GITHUB_OUTPUT"
echo "ref=$ref" >> "$GITHUB_OUTPUT"

- name: Clone Capy
uses: actions/checkout@v4
with:
repository: cppalliance/capy
repository: ${{ steps.capy-ref.outputs.repo }}
ref: ${{ steps.capy-ref.outputs.ref }}
path: capy-root

Expand Down Expand Up @@ -800,29 +813,42 @@ jobs:
path: corosio-root

# Use the capy branch with the same name as this build's branch
# (for pull requests: the source branch, then the target branch);
# fall back to capy's default branch.
# (for pull requests: the source branch, then the target branch).
# Inside a fork (a push or a PR within the fork) the owner's capy
# fork is preferred, so fork branches build against their matching
# capy fork branch. Cross-repo PRs into cppalliance resolve against
# cppalliance/capy as before. Fall back to capy's default branch.
- name: Resolve Capy branch
id: capy-ref
shell: bash
run: |
url=https://github.com/cppalliance/capy.git
repo=cppalliance/capy
ref=
for candidate in "${{ github.head_ref }}" "${{ github.base_ref }}" "${{ github.ref_name }}"; do
if [ -n "$candidate" ] && git ls-remote --exit-code --heads "$url" "$candidate" > /dev/null; then
ref="$candidate"
break
fi
[ -n "$candidate" ] || continue
probed=
for fork in "${{ github.repository_owner }}/capy" cppalliance/capy; do
# Skip a fork already probed for this candidate (the owner
# fork equals cppalliance/capy when running in cppalliance).
[ "$fork" = "$probed" ] && continue
probed="$fork"
if GIT_TERMINAL_PROMPT=0 git ls-remote --exit-code --heads "https://github.com/$fork.git" "$candidate" > /dev/null; then
repo="$fork"
ref="$candidate"
break 2
fi
done
done
if [ -z "$ref" ]; then
ref=$(git ls-remote --symref "$url" HEAD | awk '/^ref:/ { sub("refs/heads/", "", $2); print $2 }')
ref=$(GIT_TERMINAL_PROMPT=0 git ls-remote --symref "https://github.com/$repo.git" HEAD | awk '/^ref:/ { sub("refs/heads/", "", $2); print $2 }')
fi
echo "repo=$repo" >> "$GITHUB_OUTPUT"
echo "ref=$ref" >> "$GITHUB_OUTPUT"

- name: Clone Capy
uses: actions/checkout@v4
with:
repository: cppalliance/capy
repository: ${{ steps.capy-ref.outputs.repo }}
ref: ${{ steps.capy-ref.outputs.ref }}
path: capy-root

Expand Down
62 changes: 44 additions & 18 deletions .github/workflows/code-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -151,29 +151,42 @@ jobs:
echo "CMAKE_WOLFSSL_LIBRARY=${vcpkg_installed}/lib/libwolfssl.a" >> $GITHUB_ENV

# Use the capy branch with the same name as this build's branch
# (for pull requests: the source branch, then the target branch);
# fall back to capy's default branch.
# (for pull requests: the source branch, then the target branch).
# Inside a fork (a push or a PR within the fork) the owner's capy
# fork is preferred, so fork branches build against their matching
# capy fork branch. Cross-repo PRs into cppalliance resolve against
# cppalliance/capy as before. Fall back to capy's default branch.
- name: Resolve Capy branch
id: capy-ref
shell: bash
run: |
url=https://github.com/cppalliance/capy.git
repo=cppalliance/capy
ref=
for candidate in "${{ github.head_ref }}" "${{ github.base_ref }}" "${{ github.ref_name }}"; do
if [ -n "$candidate" ] && git ls-remote --exit-code --heads "$url" "$candidate" > /dev/null; then
ref="$candidate"
break
fi
[ -n "$candidate" ] || continue
probed=
for fork in "${{ github.repository_owner }}/capy" cppalliance/capy; do
# Skip a fork already probed for this candidate (the owner
# fork equals cppalliance/capy when running in cppalliance).
[ "$fork" = "$probed" ] && continue
probed="$fork"
if GIT_TERMINAL_PROMPT=0 git ls-remote --exit-code --heads "https://github.com/$fork.git" "$candidate" > /dev/null; then
repo="$fork"
ref="$candidate"
break 2
fi
done
done
if [ -z "$ref" ]; then
ref=$(git ls-remote --symref "$url" HEAD | awk '/^ref:/ { sub("refs/heads/", "", $2); print $2 }')
ref=$(GIT_TERMINAL_PROMPT=0 git ls-remote --symref "https://github.com/$repo.git" HEAD | awk '/^ref:/ { sub("refs/heads/", "", $2); print $2 }')
fi
echo "repo=$repo" >> "$GITHUB_OUTPUT"
echo "ref=$ref" >> "$GITHUB_OUTPUT"

- name: Clone Capy
uses: actions/checkout@v6
with:
repository: cppalliance/capy
repository: ${{ steps.capy-ref.outputs.repo }}
ref: ${{ steps.capy-ref.outputs.ref }}
path: capy-root

Expand Down Expand Up @@ -392,29 +405,42 @@ jobs:
echo "CMAKE_OPENSSL_ROOT=C:/msys64/mingw64" >> $GITHUB_ENV

# Use the capy branch with the same name as this build's branch
# (for pull requests: the source branch, then the target branch);
# fall back to capy's default branch.
# (for pull requests: the source branch, then the target branch).
# Inside a fork (a push or a PR within the fork) the owner's capy
# fork is preferred, so fork branches build against their matching
# capy fork branch. Cross-repo PRs into cppalliance resolve against
# cppalliance/capy as before. Fall back to capy's default branch.
- name: Resolve Capy branch
id: capy-ref
shell: bash
run: |
url=https://github.com/cppalliance/capy.git
repo=cppalliance/capy
ref=
for candidate in "${{ github.head_ref }}" "${{ github.base_ref }}" "${{ github.ref_name }}"; do
if [ -n "$candidate" ] && git ls-remote --exit-code --heads "$url" "$candidate" > /dev/null; then
ref="$candidate"
break
fi
[ -n "$candidate" ] || continue
probed=
for fork in "${{ github.repository_owner }}/capy" cppalliance/capy; do
# Skip a fork already probed for this candidate (the owner
# fork equals cppalliance/capy when running in cppalliance).
[ "$fork" = "$probed" ] && continue
probed="$fork"
if GIT_TERMINAL_PROMPT=0 git ls-remote --exit-code --heads "https://github.com/$fork.git" "$candidate" > /dev/null; then
repo="$fork"
ref="$candidate"
break 2
fi
done
done
if [ -z "$ref" ]; then
ref=$(git ls-remote --symref "$url" HEAD | awk '/^ref:/ { sub("refs/heads/", "", $2); print $2 }')
ref=$(GIT_TERMINAL_PROMPT=0 git ls-remote --symref "https://github.com/$repo.git" HEAD | awk '/^ref:/ { sub("refs/heads/", "", $2); print $2 }')
fi
echo "repo=$repo" >> "$GITHUB_OUTPUT"
echo "ref=$ref" >> "$GITHUB_OUTPUT"

- name: Clone Capy
uses: actions/checkout@v6
with:
repository: cppalliance/capy
repository: ${{ steps.capy-ref.outputs.repo }}
ref: ${{ steps.capy-ref.outputs.ref }}
path: capy-root

Expand Down
31 changes: 22 additions & 9 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,29 +43,42 @@ jobs:
path: corosio-root

# Use the capy branch with the same name as this build's branch
# (for pull requests: the source branch, then the target branch);
# fall back to capy's default branch.
# (for pull requests: the source branch, then the target branch).
# Inside a fork (a push or a PR within the fork) the owner's capy
# fork is preferred, so fork branches build against their matching
# capy fork branch. Cross-repo PRs into cppalliance resolve against
# cppalliance/capy as before. Fall back to capy's default branch.
- name: Resolve Capy branch
id: capy-ref
shell: bash
run: |
url=https://github.com/cppalliance/capy.git
repo=cppalliance/capy
ref=
for candidate in "${{ github.head_ref }}" "${{ github.base_ref }}" "${{ github.ref_name }}"; do
if [ -n "$candidate" ] && git ls-remote --exit-code --heads "$url" "$candidate" > /dev/null; then
ref="$candidate"
break
fi
[ -n "$candidate" ] || continue
probed=
for fork in "${{ github.repository_owner }}/capy" cppalliance/capy; do
# Skip a fork already probed for this candidate (the owner
# fork equals cppalliance/capy when running in cppalliance).
[ "$fork" = "$probed" ] && continue
probed="$fork"
if GIT_TERMINAL_PROMPT=0 git ls-remote --exit-code --heads "https://github.com/$fork.git" "$candidate" > /dev/null; then
repo="$fork"
ref="$candidate"
break 2
fi
done
done
if [ -z "$ref" ]; then
ref=$(git ls-remote --symref "$url" HEAD | awk '/^ref:/ { sub("refs/heads/", "", $2); print $2 }')
ref=$(GIT_TERMINAL_PROMPT=0 git ls-remote --symref "https://github.com/$repo.git" HEAD | awk '/^ref:/ { sub("refs/heads/", "", $2); print $2 }')
fi
echo "repo=$repo" >> "$GITHUB_OUTPUT"
echo "ref=$ref" >> "$GITHUB_OUTPUT"

- name: Clone Capy
uses: actions/checkout@v4
with:
repository: cppalliance/capy
repository: ${{ steps.capy-ref.outputs.repo }}
ref: ${{ steps.capy-ref.outputs.ref }}
path: capy-root

Expand Down
4 changes: 1 addition & 3 deletions doc/design/physical-structure.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,6 @@ private:
| io_read_file | io_object | read_at(offset, buffers) |
| io_write_file | io_object | write_at(offset, buffers) |
| io_file | io_read_file, io_write_file | read_at, write_at (diamond) |
| io_timer | io_object | wait(duration), cancel() |
| io_signal_set | io_object | add(signal), wait(), cancel() |
| io_file_watch | io_object | watch(path), wait() yielding change events |

Expand Down Expand Up @@ -306,7 +305,7 @@ private:
| Type | Base(s) | Key Operations |
| ----------- | ------------- | ----------------------------------------------------------- |
| process | io_object | spawn(), wait_for_exit(); stdin/stdout/stderr are pipe ends |
| timer | io_timer | expires_after(), expires_at(), wait(), cancel() |
| delay/timeout | (free functions) | delay(duration/time_point), timeout(op, duration/time_point) |
| signal_set | io_signal_set | add(int), remove(int), wait(), cancel() |
| serial_port | io_stream | Baud rate, parity, flow control options |
| file_watch | io_file_watch | watch(path), wait() yields change events |
Expand Down Expand Up @@ -404,7 +403,6 @@ private:
| ------------------------------ | ---------------------------- | ---------------------------- |
| `native_tcp_socket<Backend>` | tcp_socket | Awaitables inline impl logic |
| `native_tcp_acceptor<Backend>` | tcp_acceptor | Awaitables inline impl logic |
| `native_timer<Backend>` | timer | Awaitables inline impl logic |
| `native_signal_set<Backend>` | signal_set | Awaitables inline impl logic |
| (aliases) | | |
| epoll_tcp_socket | = `native_tcp_socket<epoll>` | |
Expand Down
2 changes: 1 addition & 1 deletion doc/modules/ROOT/nav.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
** xref:4.guide/4e.tcp-acceptor.adoc[Acceptors]
** xref:4.guide/4f.endpoints.adoc[Endpoints]
** xref:4.guide/4g.composed-operations.adoc[Composed Operations]
** xref:4.guide/4h.timers.adoc[Timers]
** xref:4.guide/4h.timers.adoc[Delays and Timeouts]
** xref:4.guide/4i.signals.adoc[Signal Handling]
** xref:4.guide/4j.resolver.adoc[Name Resolution]
** xref:4.guide/4k.tcp-server.adoc[TCP Server]
Expand Down
Loading
Loading