Skip to content

Commit

Permalink
Merge pull request #575 from NordSecurity/LLT-5075-fix-cargo-doc-on-mac
Browse files Browse the repository at this point in the history
Fix cargo doc on mac and add a test for it
  • Loading branch information
tomaszklak authored May 28, 2024
2 parents ba19683 + 535b567 commit f92608f
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 3 deletions.
18 changes: 17 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,4 +93,20 @@ jobs:
- uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
with:
name: libtelio-build-${{ matrix.target_os }}-${{ matrix.arch }}-with-replaced-version
path: dist/
path: dist/

build-docs-on-mac:
runs-on: macos-13
env:
RUSTDOCFLAGS: "-Zunstable-options --enable-index-page -Aunknown_lints --html-in-header ./rustdoc/header.html --html-after-content ./rustdoc/multi-code.html --html-after-content ./rustdoc/footer.html"
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Build Rust Docs
uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2024-04-17
components: rust-docs

- run: cargo +nightly-2024-04-17 doc --no-deps --workspace --document-private-items
1 change: 1 addition & 0 deletions .unreleased/LLT-5075
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix cargo doc on mac and add a test for it
4 changes: 2 additions & 2 deletions crates/telio-wg/src/adapter/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#[cfg_attr(docsrs, doc(cfg(not(windows))))]
mod boring;

#[cfg(any(target_os = "linux", doc))]
#[cfg(target_os = "linux")]
#[cfg_attr(docsrs, doc(cfg(target_os = "linux")))]
mod linux_native_wg;

Expand Down Expand Up @@ -82,7 +82,7 @@ pub enum Error {
BoringTun(#[from] boringtun::device::Error),

/// Error types from Linux Native implementation
#[cfg(any(target_os = "linux", doc))]
#[cfg(target_os = "linux")]
#[cfg_attr(docsrs, doc(cfg(target_os = "linux")))]
#[error("LinuxNativeWg adapter error {0}")]
LinuxNativeWg(#[from] linux_native_wg::Error),
Expand Down

0 comments on commit f92608f

Please sign in to comment.