Skip to content

Commit

Permalink
[INFRA] Remove vercel
Browse files Browse the repository at this point in the history
  • Loading branch information
eseiler committed Aug 19, 2024
1 parent f4321f8 commit 0cab5ec
Show file tree
Hide file tree
Showing 14 changed files with 50 additions and 177 deletions.
52 changes: 46 additions & 6 deletions .github/workflows/ci_documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@ on:
push:
branches:
- 'main'
pull_request:
pull_request_target:
types:
- unlabeled
- closed
workflow_dispatch:

concurrency:
Expand All @@ -22,29 +23,68 @@ env:

defaults:
run:
shell: bash -Eexuo pipefail {0}
shell: bash -Eeuxo pipefail {0}

jobs:
build:
name: Documentation
runs-on: ubuntu-latest
if: github.repository_owner == 'seqan' || github.event_name == 'workflow_dispatch' || github.event.label.name == 'lint'
if: ( github.repository_owner == 'seqan' || github.event_name == 'workflow_dispatch' || github.event.label.name == 'lint' ) && github.event.action != 'closed'
steps:
- name: Checkout
if: github.event_name != 'pull_request_target'
uses: actions/checkout@v4

# pull_request_target does not checkout the merge commit by default
- name: Checkout
if: github.event_name == 'pull_request_target'
uses: actions/checkout@v4
with:
ref: "refs/pull/${{ github.event.number }}/merge"

- name: Install Doxygen
uses: seqan/actions/setup-doxygen@main
with:
doxygen: 1.10.0

- name: Configure tests
run: |
mkdir build
cd build
mkdir build && cd build
cmake ../test/documentation
make -j download-cppreference-doxygen-web-tag
- name: Run tests
working-directory: build
run: ctest . -j --output-on-failure

- name: Deploy Preview
if: github.event_name == 'pull_request_target'
uses: seqan/actions/documentation_deploy_preview@main
with:
deploy_host: ${{ secrets.DEPLOY_HOST }}
deploy_user: ${{ secrets.DEPLOY_USER }}
deploy_ssh_key: ${{ secrets.DEPLOY_SSH_KEY }}
deploy_base_path: ${{ secrets.DEPLOY_PREVIEW_BASE_PATH }}
source_path_user_doc: build/html
token: ${{ secrets.SEQAN_ACTIONS_PAT }}

- name: Deploy Documentation
if: github.event_name == 'push'
uses: seqan/actions/documentation_deploy_production@main
with:
deploy_host: ${{ secrets.DEPLOY_HOST }}
deploy_user: ${{ secrets.DEPLOY_USER }}
deploy_ssh_key: ${{ secrets.DEPLOY_SSH_KEY }}
source_path_user_doc: build/html/
deploy_path_user_doc: ${{ secrets.DEPLOY_PRODUCTION_BASE_PATH }}/main
delete:
name: Delete Preview
runs-on: ubuntu-latest
if: github.repository_owner == 'seqan' && github.event_name == 'pull_request_target' && github.event.action == 'closed'
steps:
- name: Delete Preview
uses: seqan/actions/documentation_delete_preview@main
with:
deploy_host: ${{ secrets.DEPLOY_HOST }}
deploy_user: ${{ secrets.DEPLOY_USER }}
deploy_ssh_key: ${{ secrets.DEPLOY_SSH_KEY }}
deploy_base_path: ${{ secrets.DEPLOY_PREVIEW_BASE_PATH }}
5 changes: 0 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,3 @@ int main()
<!-- The below code snippet is automatically added from ./test/snippet/readme.cpp -->
<!-- MARKDOWN-AUTO-DOCS:END -->

## Sponsorships

[![Vercel](https://raw.githubusercontent.com/seqan/hibf/main/test/documentation/.vercel/powered-by-vercel.svg)](https://vercel.com/?utm_source=seqan&utm_campaign=oss)

Vercel is kind enough to sponsor our documentation preview-builds within our pull requests. Check them out!
53 changes: 0 additions & 53 deletions test/documentation/.vercel/0_setup.sh

This file was deleted.

39 changes: 0 additions & 39 deletions test/documentation/.vercel/1_build.sh

This file was deleted.

12 changes: 0 additions & 12 deletions test/documentation/.vercel/Notes.md

This file was deleted.

24 changes: 0 additions & 24 deletions test/documentation/.vercel/api/doxysearch.sh

This file was deleted.

6 changes: 0 additions & 6 deletions test/documentation/.vercel/powered-by-vercel.svg

This file was deleted.

2 changes: 0 additions & 2 deletions test/documentation/.vercel/powered-by-vercel.svg.license

This file was deleted.

7 changes: 0 additions & 7 deletions test/documentation/.vercel/vercel.json

This file was deleted.

3 changes: 0 additions & 3 deletions test/documentation/.vercel/vercel.json.license

This file was deleted.

3 changes: 3 additions & 0 deletions test/documentation/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,11 @@ install (DIRECTORY "${HIBF_DOXYGEN_OUTPUT_DIR}/html"
enable_testing ()

message (STATUS "Adding docs test.")
add_test (NAME cppreference-doxygen-web-tag COMMAND ${CMAKE_COMMAND} --build ${CMAKE_BINARY_DIR} --target
download-cppreference-doxygen-web-tag)
add_test (NAME docs_no_warnings_test
COMMAND bash -c "${HIBF_TEST_DOXYGEN_FAIL_ON_WARNINGS}"
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
set_tests_properties (docs_no_warnings_test PROPERTIES DEPENDS cppreference-doxygen-web-tag)

include (hibf-doxygen-package.cmake)
14 changes: 0 additions & 14 deletions test/documentation/hibf-doxygen.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -29,20 +29,6 @@ set (HIBF_FOOTER_HTML_IN ${HIBF_DOXYGEN_INPUT_DIR}/hibf_footer.html.in)
# DoxygenLayout.xml.in is created by hibf-doxygen-layout.cmake
set (HIBF_LAYOUT_IN ${CMAKE_CURRENT_BINARY_DIR}/DoxygenLayout.xml.in)

option (HIBF_VERCEL_PREVIEW_DOC "Is this a preview build by vercel.com?" OFF)

set (HIBF_DOXYGEN_EXTERNAL_SEARCH "NO")

if (HIBF_VERCEL_PREVIEW_DOC)
set (HIBF_DOXYGEN_EXTERNAL_SEARCH "YES")
set (HIBF_DOXYGEN_DOT_NUM_THREADS "2")
set (HIBF_DOXYFILE_OPTION_POWERED_BY_VERCEL
"HTML_EXTRA_FILES += ${HIBF_DOXYGEN_SOURCE_DIR}/test/documentation/.vercel/powered-by-vercel.svg")
set (HIBF_FOOTER_HTML_OPTION_POWERED_BY_VERCEL
"<li class='footer'><a href='https://vercel.com/?utm_source=seqan&utm_campaign=oss'><img class='footer' src='$relpath^powered-by-vercel.svg' height='31' alt='Powered by Vercel' style='width:unset;'/></a></li>"
)
endif ()

### Download and extract cppreference-doxygen-web.tag.xml for std:: documentation links
set (HIBF_DOXYGEN_STD_TAGFILE "${PROJECT_BINARY_DIR}/cppreference-doxygen-web.tag.xml")
include (ExternalProject)
Expand Down
6 changes: 1 addition & 5 deletions test/documentation/hibf_doxygen_cfg.in
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ INLINE_GROUPED_CLASSES = NO
INLINE_SIMPLE_STRUCTS = NO
TYPEDEF_HIDES_STRUCT = NO
LOOKUP_CACHE_SIZE = 0
NUM_PROC_THREADS = 1
NUM_PROC_THREADS = 0
TIMESTAMP = YES
#---------------------------------------------------------------------------
# Build related configuration options
Expand Down Expand Up @@ -399,7 +399,3 @@ GENERATE_LEGEND = YES
DOT_CLEANUP = YES
MSCGEN_TOOL =
MSCFILE_DIRS =
#---------------------------------------------------------------------------
# Configuration options related to the deployment by Vercel
#---------------------------------------------------------------------------
${HIBF_DOXYFILE_OPTION_POWERED_BY_VERCEL}
1 change: 0 additions & 1 deletion test/documentation/hibf_footer.html.in
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ SPDX-License-Identifier: BSD-3-Clause
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
$navpath
${HIBF_FOOTER_HTML_OPTION_POWERED_BY_VERCEL}
<li class="footer">$generatedby <a href="https://www.doxygen.org/index.html"><img class="footer" src="$relpath^doxygen.svg" width="104" height="31" alt="doxygen"/></a> $doxygenversion </li>
</ul>
</div>
Expand Down

0 comments on commit 0cab5ec

Please sign in to comment.