Skip to content

Commit

Permalink
Merge pull request #5 from tashcan/feature/docs
Browse files Browse the repository at this point in the history
  • Loading branch information
tashcan authored Nov 21, 2024
2 parents 3529e5e + fdf629d commit d286699
Show file tree
Hide file tree
Showing 63 changed files with 7,285 additions and 686 deletions.
17 changes: 8 additions & 9 deletions .github/workflows/benchmark.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ permissions:

jobs:
benchmark:
name: Detour check
name: Detour check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: 'recursive'
submodules: "recursive"

- name: Set reusable strings
id: strings
shell: bash
Expand All @@ -37,20 +37,19 @@ jobs:
- name: Build
run: cmake --build ${{ steps.strings.outputs.build-output-dir }} --config Release -j
- name: Benchmark

- name: Benchmark
working-directory: ${{ steps.strings.outputs.build-output-dir }}
run: ${{ steps.strings.outputs.build-output-dir }}/spud.benchmark | tee ${{ github.workspace }}/benchmark_result.txt

- name: Store benchmark result
uses: tashcan/github-action-benchmark@tash
with:
name: Detour Benchmark
tool: 'catch2'
tool: "catch2"
output-file-path: benchmark_result.txt
github-token: ${{ secrets.GITHUB_TOKEN }}
auto-push: true
alert-threshold: '200%'
alert-threshold: "200%"
comment-on-alert: true
fail-on-alert: true

91 changes: 59 additions & 32 deletions .github/workflows/build-and-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: Build and test

on:
push:
branches: [ "main" ]
branches: ["main"]
pull_request:
branches: [ "main" ]
branches: ["main"]

jobs:
build:
Expand All @@ -13,20 +13,27 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
os: [ubuntu-latest, windows-latest, macos-13, macos-14]
build_type: [Release, Debug]
c_compiler: [gcc, clang, cl]
c_compiler: [gcc, clang, cl, clang-cl]
include:
- os: windows-latest
c_compiler: cl
cpp_compiler: cl
- os: windows-latest
c_compiler: clang-cl
cpp_compiler: clang-cl
toolset: ClangCL
- os: ubuntu-latest
c_compiler: gcc
cpp_compiler: g++
- os: ubuntu-latest
c_compiler: clang
cpp_compiler: clang++
- os: macos-latest
- os: macos-13
c_compiler: clang
cpp_compiler: clang++
- os: macos-14
c_compiler: clang
cpp_compiler: clang++
exclude:
Expand All @@ -36,37 +43,57 @@ jobs:
c_compiler: clang
- os: ubuntu-latest
c_compiler: cl
- os: macos-latest
- os: ubuntu-latest
c_compiler: clang-cl
- os: macos-13
c_compiler: cl
- os: macos-13
c_compiler: clang-cl
- os: macos-13
c_compiler: gcc
- os: macos-14
c_compiler: cl
- os: macos-latest
- os: macos-14
c_compiler: clang-cl
- os: macos-14
c_compiler: gcc
steps:
- uses: actions/checkout@v3
with:
submodules: 'recursive'
- uses: actions/checkout@v4
with:
submodules: "recursive"

- name: Set reusable strings
id: strings
shell: bash
run: |
echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT"
- uses: mjp41/workaround8649@c8550b715ccdc17f89c8d5c28d7a48eeff9c94a8
with:
os: ${{ matrix.os }}

- name: Set reusable strings
id: strings
shell: bash
run: |
echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT"
- uses: mjp41/workaround8649@c8550b715ccdc17f89c8d5c28d7a48eeff9c94a8
with:
os: ${{ matrix.os }}

- name: Configure CMake
run: >
cmake -B ${{ steps.strings.outputs.build-output-dir }}
-DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }}
-DCMAKE_C_COMPILER=${{ matrix.c_compiler }}
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
-S ${{ github.workspace }}
- name: Configure CMake
if: ${{ startsWith(matrix.toolset, 'ClangCL') }}
run: >
cmake -B ${{ steps.strings.outputs.build-output-dir }}
-DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }}
-DCMAKE_C_COMPILER=${{ matrix.c_compiler }}
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
-T ${{ matrix.toolset }}
-S ${{ github.workspace }}
- name: Build
run: cmake --build ${{ steps.strings.outputs.build-output-dir }} --config ${{ matrix.build_type }} -j
- name: Configure CMake
if: ${{ ! startsWith(matrix.toolset, 'ClangCL') }}
run: >
cmake -B ${{ steps.strings.outputs.build-output-dir }}
-DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }}
-DCMAKE_C_COMPILER=${{ matrix.c_compiler }}
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
-S ${{ github.workspace }}
- name: Test
working-directory: ${{ steps.strings.outputs.build-output-dir }}
run: ctest --build-config ${{ matrix.build_type }} --output-on-failure -R spud.test
- name: Build
run: cmake --build ${{ steps.strings.outputs.build-output-dir }} --config ${{ matrix.build_type }} -j

- name: Test
working-directory: ${{ steps.strings.outputs.build-output-dir }}
run: ctest --build-config ${{ matrix.build_type }} --output-on-failure -R spud.test
38 changes: 38 additions & 0 deletions .github/workflows/publish-docs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Deploy Docs

on:
push:

jobs:
publish:
environment: docs
runs-on: ubuntu-latest
permissions:
contents: read
deployments: write
steps:
- name: Checkout
uses: actions/checkout@v4

- uses: pnpm/action-setup@v2
name: Install pnpm
with:
version: 8
run_install: false

- name: Build
run: |
cd docs
pnpm install
pnpm run build
- name: Pages deploy
uses: cloudflare/pages-action@v1
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
projectName: spud-docs
directory: dist
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
branch: main
workingDirectory: docs
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,6 @@
/.vscode/
.DS_Store
compile_commands.json
/build-*/
/vs/
/.xmake/
Loading

0 comments on commit d286699

Please sign in to comment.