diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5591d80..196cbc6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,19 +21,27 @@ jobs: cc: gcc cxx: g++ werror: ON + capi: ON - name: Linux Clang os: ubuntu-latest cc: clang cxx: clang++ werror: ON + capi: ON # Warnings stay non-fatal on MSVC until /W4 output has been triaged # on a Windows runner (same policy as the sibling *Tap repos). - name: macOS AppleClang os: macos-latest werror: ON + capi: ON + # capi stays OFF on Windows: tools/capi carries no __declspec(dllexport) + # (unlike DspTap's), so an MSVC build would link a DLL exporting nothing + # — it would pass without gating anything. Turn this ON in the same + # change that gives the C ABI an export decoration. - name: Windows MSVC os: windows-latest werror: OFF + capi: OFF steps: - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6 with: @@ -47,6 +55,7 @@ jobs: cmake -B build -DCMAKE_BUILD_TYPE=Release -DMUTAP_WERROR=${{ matrix.werror }} + -DMUTAP_BUILD_CAPI=${{ matrix.capi }} - name: Build run: cmake --build build --config Release -j 4 diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 0000000..9ccd616 --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,78 @@ +name: Docs + +# Build the mdBook ("Quieting the Loop", book/) and publish it to GitHub Pages +# on every push to main. On pull requests, build only (no deploy) so breakage is +# caught in review without touching the live site — this is also the repo's only +# gate on the book, since ci.yml does not build it. +# +# TapTools' docs.yml pattern (itself AmbiTap's), minus the Doxygen site: this +# repo has no Doxyfile, so the book is the whole site and is published at the +# root. book.toml's site-url is /MuTap/ to match that; if a Doxygen site is ever +# added under /api/, assemble a site/ directory the way AmbiTap does rather than +# moving the book into a subdirectory, so site-url stays correct. + +on: + push: + branches: [main] + pull_request: + +permissions: + contents: read + pages: write + id-token: write + +# Allow one concurrent deployment; a newer push supersedes an in-flight one. +concurrency: + group: pages + cancel-in-progress: false + +env: + MDBOOK_URL: https://github.com/rust-lang/mdBook/releases/download/v0.4.40/mdbook-v0.4.40-x86_64-unknown-linux-gnu.tar.gz + MDBOOK_SHA256: "9ef07fd288ba58ff3b99d1c94e6d414d431c9a61fdb20348e5beb74b823d546b" + +jobs: + build: + name: build book + runs-on: ubuntu-latest + timeout-minutes: 15 + steps: + - uses: actions/checkout@v4 + + - name: Install mdBook (pinned) + run: | + curl -sSL "$MDBOOK_URL" -o mdbook.tar.gz + echo "$MDBOOK_SHA256 mdbook.tar.gz" | sha256sum -c - + tar -xzf mdbook.tar.gz mdbook + ./mdbook --version + + # book.toml sets create-missing = false, so a SUMMARY.md entry without a + # matching file fails the build rather than silently generating a stub. + - name: Build the book + run: ./mdbook build book + + - name: Upload Pages artifact + if: github.ref == 'refs/heads/main' + uses: actions/upload-pages-artifact@v3 + with: + path: book/book + + deploy: + name: deploy to Pages + if: github.ref == 'refs/heads/main' + needs: build + runs-on: ubuntu-latest + timeout-minutes: 10 + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + steps: + # Creates/enables the Pages site (Source: GitHub Actions) if the repo + # doesn't have one yet — deploy-pages 404s otherwise. + - name: Enable Pages + uses: actions/configure-pages@v5 + with: + enablement: true + + - name: Deploy + id: deployment + uses: actions/deploy-pages@v4 diff --git a/CMakeLists.txt b/CMakeLists.txt index a819472..44eef7b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -18,6 +18,11 @@ add_subdirectory(submodules/dsptap) add_library(mutap INTERFACE) add_library(MuTap::MuTap ALIAS mutap) +# The family-wide alias, per the namespace convention in taphouse's README: one +# `tap::` sub-namespace per repo, and the CMake alias matches it. The +# older spelling above stays so existing consumers keep working; prefer +# `tap::mu` in new code. +add_library(tap::mu ALIAS mutap) target_include_directories(mutap INTERFACE $ $) diff --git a/book/book.toml b/book/book.toml index 1a681c2..0e02cf1 100644 --- a/book/book.toml +++ b/book/book.toml @@ -11,4 +11,4 @@ create-missing = false [output.html] default-theme = "rust" git-repository-url = "https://github.com/tap/MuTap" -site-url = "/MuTap/book/" +site-url = "/MuTap/"