mirror of
https://codeberg.org/DawnMagnet/reflect-cpp
synced 2026-12-02 16:16:19 +08:00
Publish benchmarks on the Actions tab (#117)
This commit is contained in:
@@ -1,51 +0,0 @@
|
||||
# Sample workflow for building and deploying a Jekyll site to GitHub Pages
|
||||
name: Deploy Jekyll with GitHub Pages dependencies preinstalled
|
||||
|
||||
on:
|
||||
# Runs on pushes targeting the default branch
|
||||
push:
|
||||
branches: ["main"]
|
||||
|
||||
# Allows you to run this workflow manually from the Actions tab
|
||||
workflow_dispatch:
|
||||
|
||||
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
|
||||
permissions:
|
||||
contents: read
|
||||
pages: write
|
||||
id-token: write
|
||||
|
||||
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
|
||||
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
|
||||
concurrency:
|
||||
group: "pages"
|
||||
cancel-in-progress: false
|
||||
|
||||
jobs:
|
||||
# Build job
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
- name: Setup Pages
|
||||
uses: actions/configure-pages@v5
|
||||
- name: Build with Jekyll
|
||||
uses: actions/jekyll-build-pages@v1
|
||||
with:
|
||||
source: ./
|
||||
destination: ./_site
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-pages-artifact@v3
|
||||
|
||||
# Deployment job
|
||||
deploy:
|
||||
environment:
|
||||
name: github-pages
|
||||
url: ${{ steps.deployment.outputs.page_url }}
|
||||
runs-on: ubuntu-latest
|
||||
needs: build
|
||||
steps:
|
||||
- name: Deploy to GitHub Pages
|
||||
id: deployment
|
||||
uses: actions/deploy-pages@v4
|
||||
@@ -1,4 +1,4 @@
|
||||
name: test
|
||||
name: linux-clang
|
||||
|
||||
on: [ push, pull_request ]
|
||||
|
||||
@@ -29,7 +29,7 @@ jobs:
|
||||
clang --version
|
||||
cmake -S . -B build -DREFLECTCPP_BUILD_TESTS=ON -DREFLECTCPP_BUILD_BENCHMARKS=ON -DREFLECTCPP_BSON=ON -DREFLECTCPP_CBOR=ON -DREFLECTCPP_FLEXBUFFERS=ON -DREFLECTCPP_MSGPACK=ON -DREFLECTCPP_TOML=ON -DREFLECTCPP_XML=ON -DREFLECTCPP_YAML=ON -DCMAKE_BUILD_TYPE=Release
|
||||
cmake --build build -j 4
|
||||
- name: Run tests
|
||||
- name: Run tess
|
||||
run: |
|
||||
./build/tests/bson/reflect-cpp-bson-tests
|
||||
./build/tests/cbor/reflect-cpp-cbor-tests
|
||||
@@ -41,11 +41,19 @@ jobs:
|
||||
./build/tests/yaml/reflect-cpp-yaml-tests
|
||||
- name: Run benchmarks
|
||||
run: |
|
||||
./build/benchmarks/json/reflect-cpp-json-benchmarks --benchmark_filter=canada
|
||||
./build/benchmarks/json/reflect-cpp-json-benchmarks --benchmark_filter=person_read
|
||||
./build/benchmarks/all/reflect-cpp-all-format-benchmarks --benchmark_filter=canada_read
|
||||
./build/benchmarks/all/reflect-cpp-all-format-benchmarks --benchmark_filter=canada_write
|
||||
./build/benchmarks/all/reflect-cpp-all-format-benchmarks --benchmark_filter=licenses_read
|
||||
./build/benchmarks/all/reflect-cpp-all-format-benchmarks --benchmark_filter=licenses_write
|
||||
./build/benchmarks/all/reflect-cpp-all-format-benchmarks --benchmark_filter=person_read
|
||||
./build/benchmarks/all/reflect-cpp-all-format-benchmarks --benchmark_filter=person_write
|
||||
echo '# Benchmarks' >> $GITHUB_STEP_SUMMARY
|
||||
echo '## Benchmarks across different formats' >> $GITHUB_STEP_SUMMARY
|
||||
echo '```' >> $GITHUB_STEP_SUMMARY
|
||||
./build/benchmarks/all/reflect-cpp-all-format-benchmarks --benchmark_filter=canada_read >> $GITHUB_STEP_SUMMARY
|
||||
./build/benchmarks/all/reflect-cpp-all-format-benchmarks --benchmark_filter=canada_write >> $GITHUB_STEP_SUMMARY
|
||||
./build/benchmarks/all/reflect-cpp-all-format-benchmarks --benchmark_filter=licenses_read >> $GITHUB_STEP_SUMMARY
|
||||
./build/benchmarks/all/reflect-cpp-all-format-benchmarks --benchmark_filter=licenses_write >> $GITHUB_STEP_SUMMARY
|
||||
./build/benchmarks/all/reflect-cpp-all-format-benchmarks --benchmark_filter=person_read >> $GITHUB_STEP_SUMMARY
|
||||
./build/benchmarks/all/reflect-cpp-all-format-benchmarks --benchmark_filter=person_write >> $GITHUB_STEP_SUMMARY
|
||||
echo '```' >> $GITHUB_STEP_SUMMARY
|
||||
echo '## Benchmarks for JSON' >> $GITHUB_STEP_SUMMARY
|
||||
echo '```' >> $GITHUB_STEP_SUMMARY
|
||||
./build/benchmarks/json/reflect-cpp-json-benchmarks --benchmark_filter=person_read >> $GITHUB_STEP_SUMMARY
|
||||
./build/benchmarks/json/reflect-cpp-json-benchmarks --benchmark_filter=canada >> $GITHUB_STEP_SUMMARY
|
||||
echo '```' >> $GITHUB_STEP_SUMMARY
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
name: test
|
||||
name: linux-gcc
|
||||
|
||||
on: [ push, pull_request ]
|
||||
|
||||
@@ -34,11 +34,20 @@ jobs:
|
||||
./build/tests/yaml/reflect-cpp-yaml-tests
|
||||
- name: Run benchmarks
|
||||
run: |
|
||||
./build/benchmarks/json/reflect-cpp-json-benchmarks --benchmark_filter=canada
|
||||
./build/benchmarks/json/reflect-cpp-json-benchmarks --benchmark_filter=person_read
|
||||
./build/benchmarks/all/reflect-cpp-all-format-benchmarks --benchmark_filter=canada_read
|
||||
./build/benchmarks/all/reflect-cpp-all-format-benchmarks --benchmark_filter=canada_write
|
||||
./build/benchmarks/all/reflect-cpp-all-format-benchmarks --benchmark_filter=licenses_read
|
||||
./build/benchmarks/all/reflect-cpp-all-format-benchmarks --benchmark_filter=licenses_write
|
||||
./build/benchmarks/all/reflect-cpp-all-format-benchmarks --benchmark_filter=person_read
|
||||
./build/benchmarks/all/reflect-cpp-all-format-benchmarks --benchmark_filter=person_write
|
||||
echo '# Benchmarks' >> $GITHUB_STEP_SUMMARY
|
||||
echo '## Benchmarks across different formats' >> $GITHUB_STEP_SUMMARY
|
||||
echo '```' >> $GITHUB_STEP_SUMMARY
|
||||
./build/benchmarks/all/reflect-cpp-all-format-benchmarks --benchmark_filter=canada_read >> $GITHUB_STEP_SUMMARY
|
||||
./build/benchmarks/all/reflect-cpp-all-format-benchmarks --benchmark_filter=canada_write >> $GITHUB_STEP_SUMMARY
|
||||
./build/benchmarks/all/reflect-cpp-all-format-benchmarks --benchmark_filter=licenses_read >> $GITHUB_STEP_SUMMARY
|
||||
./build/benchmarks/all/reflect-cpp-all-format-benchmarks --benchmark_filter=licenses_write >> $GITHUB_STEP_SUMMARY
|
||||
./build/benchmarks/all/reflect-cpp-all-format-benchmarks --benchmark_filter=person_read >> $GITHUB_STEP_SUMMARY
|
||||
./build/benchmarks/all/reflect-cpp-all-format-benchmarks --benchmark_filter=person_write >> $GITHUB_STEP_SUMMARY
|
||||
echo '```' >> $GITHUB_STEP_SUMMARY
|
||||
echo '## Benchmarks for JSON' >> $GITHUB_STEP_SUMMARY
|
||||
echo '```' >> $GITHUB_STEP_SUMMARY
|
||||
./build/benchmarks/json/reflect-cpp-json-benchmarks --benchmark_filter=person_read >> $GITHUB_STEP_SUMMARY
|
||||
./build/benchmarks/json/reflect-cpp-json-benchmarks --benchmark_filter=canada >> $GITHUB_STEP_SUMMARY
|
||||
echo '```' >> $GITHUB_STEP_SUMMARY
|
||||
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
name: test
|
||||
name: macos-clang-arm
|
||||
|
||||
on: [ push, pull_request ]
|
||||
|
||||
@@ -36,11 +36,18 @@ jobs:
|
||||
./build/tests/yaml/reflect-cpp-yaml-tests
|
||||
- name: Run benchmarks
|
||||
run: |
|
||||
./build/benchmarks/json/reflect-cpp-json-benchmarks --benchmark_filter=canada
|
||||
./build/benchmarks/json/reflect-cpp-json-benchmarks --benchmark_filter=person_read
|
||||
./build/benchmarks/all/reflect-cpp-all-format-benchmarks --benchmark_filter=canada_read
|
||||
./build/benchmarks/all/reflect-cpp-all-format-benchmarks --benchmark_filter=canada_write
|
||||
./build/benchmarks/all/reflect-cpp-all-format-benchmarks --benchmark_filter=licenses_read
|
||||
./build/benchmarks/all/reflect-cpp-all-format-benchmarks --benchmark_filter=licenses_write
|
||||
./build/benchmarks/all/reflect-cpp-all-format-benchmarks --benchmark_filter=person_read
|
||||
./build/benchmarks/all/reflect-cpp-all-format-benchmarks --benchmark_filter=person_write
|
||||
echo '# Benchmarks' >> $GITHUB_STEP_SUMMARY
|
||||
echo '## Benchmarks across different formats' >> $GITHUB_STEP_SUMMARY
|
||||
echo '```' >> $GITHUB_STEP_SUMMARY
|
||||
./build/benchmarks/all/reflect-cpp-all-format-benchmarks --benchmark_filter=canada_read >> $GITHUB_STEP_SUMMARY
|
||||
./build/benchmarks/all/reflect-cpp-all-format-benchmarks --benchmark_filter=canada_write >> $GITHUB_STEP_SUMMARY
|
||||
./build/benchmarks/all/reflect-cpp-all-format-benchmarks --benchmark_filter=licenses_read >> $GITHUB_STEP_SUMMARY
|
||||
./build/benchmarks/all/reflect-cpp-all-format-benchmarks --benchmark_filter=licenses_write >> $GITHUB_STEP_SUMMARY
|
||||
./build/benchmarks/all/reflect-cpp-all-format-benchmarks --benchmark_filter=person_read >> $GITHUB_STEP_SUMMARY
|
||||
./build/benchmarks/all/reflect-cpp-all-format-benchmarks --benchmark_filter=person_write >> $GITHUB_STEP_SUMMARY
|
||||
echo '```' >> $GITHUB_STEP_SUMMARY
|
||||
echo '## Benchmarks for JSON' >> $GITHUB_STEP_SUMMARY
|
||||
echo '```' >> $GITHUB_STEP_SUMMARY
|
||||
./build/benchmarks/json/reflect-cpp-json-benchmarks --benchmark_filter=person_read >> $GITHUB_STEP_SUMMARY
|
||||
./build/benchmarks/json/reflect-cpp-json-benchmarks --benchmark_filter=canada >> $GITHUB_STEP_SUMMARY
|
||||
echo '```' >> $GITHUB_STEP_SUMMARY
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
name: test
|
||||
name: macos-clang-x64
|
||||
|
||||
on: [ push, pull_request ]
|
||||
|
||||
@@ -33,11 +33,18 @@ jobs:
|
||||
./build/tests/yaml/reflect-cpp-yaml-tests
|
||||
- name: Run benchmarks
|
||||
run: |
|
||||
./build/benchmarks/json/reflect-cpp-json-benchmarks --benchmark_filter=canada
|
||||
./build/benchmarks/json/reflect-cpp-json-benchmarks --benchmark_filter=person_read
|
||||
./build/benchmarks/all/reflect-cpp-all-format-benchmarks --benchmark_filter=canada_read
|
||||
./build/benchmarks/all/reflect-cpp-all-format-benchmarks --benchmark_filter=canada_write
|
||||
./build/benchmarks/all/reflect-cpp-all-format-benchmarks --benchmark_filter=licenses_read
|
||||
./build/benchmarks/all/reflect-cpp-all-format-benchmarks --benchmark_filter=licenses_write
|
||||
./build/benchmarks/all/reflect-cpp-all-format-benchmarks --benchmark_filter=person_read
|
||||
./build/benchmarks/all/reflect-cpp-all-format-benchmarks --benchmark_filter=person_write
|
||||
echo '# Benchmarks' >> $GITHUB_STEP_SUMMARY
|
||||
echo '## Benchmarks across different formats' >> $GITHUB_STEP_SUMMARY
|
||||
echo '```' >> $GITHUB_STEP_SUMMARY
|
||||
./build/benchmarks/all/reflect-cpp-all-format-benchmarks --benchmark_filter=canada_read >> $GITHUB_STEP_SUMMARY
|
||||
./build/benchmarks/all/reflect-cpp-all-format-benchmarks --benchmark_filter=canada_write >> $GITHUB_STEP_SUMMARY
|
||||
./build/benchmarks/all/reflect-cpp-all-format-benchmarks --benchmark_filter=licenses_read >> $GITHUB_STEP_SUMMARY
|
||||
./build/benchmarks/all/reflect-cpp-all-format-benchmarks --benchmark_filter=licenses_write >> $GITHUB_STEP_SUMMARY
|
||||
./build/benchmarks/all/reflect-cpp-all-format-benchmarks --benchmark_filter=person_read >> $GITHUB_STEP_SUMMARY
|
||||
./build/benchmarks/all/reflect-cpp-all-format-benchmarks --benchmark_filter=person_write >> $GITHUB_STEP_SUMMARY
|
||||
echo '```' >> $GITHUB_STEP_SUMMARY
|
||||
echo '## Benchmarks for JSON' >> $GITHUB_STEP_SUMMARY
|
||||
echo '```' >> $GITHUB_STEP_SUMMARY
|
||||
./build/benchmarks/json/reflect-cpp-json-benchmarks --benchmark_filter=person_read >> $GITHUB_STEP_SUMMARY
|
||||
./build/benchmarks/json/reflect-cpp-json-benchmarks --benchmark_filter=canada >> $GITHUB_STEP_SUMMARY
|
||||
echo '```' >> $GITHUB_STEP_SUMMARY
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
name: test
|
||||
name: windows-msvc
|
||||
|
||||
on: [ push, pull_request ]
|
||||
|
||||
@@ -29,11 +29,18 @@ jobs:
|
||||
.\build\tests\yaml\Release\reflect-cpp-yaml-tests.exe
|
||||
- name: Run benchmarks
|
||||
run: |
|
||||
.\build\benchmarks\json\Release\reflect-cpp-json-benchmarks.exe --benchmark_filter=canada
|
||||
.\build\benchmarks\json\Release\reflect-cpp-json-benchmarks.exe --benchmark_filter=person_read
|
||||
.\build\benchmarks\all\Release\reflect-cpp-all-format-benchmarks.exe --benchmark_filter=canada_read
|
||||
.\build\benchmarks\all\Release\reflect-cpp-all-format-benchmarks.exe --benchmark_filter=canada_write
|
||||
.\build\benchmarks\all\Release\reflect-cpp-all-format-benchmarks.exe --benchmark_filter=licenses_read
|
||||
.\build\benchmarks\all\Release\reflect-cpp-all-format-benchmarks.exe --benchmark_filter=licenses_write
|
||||
.\build\benchmarks\all\Release\reflect-cpp-all-format-benchmarks.exe --benchmark_filter=person_read
|
||||
.\build\benchmarks\all\Release\reflect-cpp-all-format-benchmarks.exe --benchmark_filter=person_write
|
||||
echo '# Benchmarks' >> $env:GITHUB_STEP_SUMMARY
|
||||
echo '## Benchmarks across different formats' >> $env:GITHUB_STEP_SUMMARY
|
||||
echo '```' >> $env:GITHUB_STEP_SUMMARY
|
||||
.\build\benchmarks\all\Release\reflect-cpp-all-format-benchmarks.exe --benchmark_filter=canada_read >> $env:GITHUB_STEP_SUMMARY
|
||||
.\build\benchmarks\all\Release\reflect-cpp-all-format-benchmarks.exe --benchmark_filter=canada_write >> $env:GITHUB_STEP_SUMMARY
|
||||
.\build\benchmarks\all\Release\reflect-cpp-all-format-benchmarks.exe --benchmark_filter=licenses_read >> $env:GITHUB_STEP_SUMMARY
|
||||
.\build\benchmarks\all\Release\reflect-cpp-all-format-benchmarks.exe --benchmark_filter=licenses_write >> $env:GITHUB_STEP_SUMMARY
|
||||
.\build\benchmarks\all\Release\reflect-cpp-all-format-benchmarks.exe --benchmark_filter=person_read >> $env:GITHUB_STEP_SUMMARY
|
||||
.\build\benchmarks\all\Release\reflect-cpp-all-format-benchmarks.exe --benchmark_filter=person_write >> $env:GITHUB_STEP_SUMMARY
|
||||
echo '```' >> $env:GITHUB_STEP_SUMMARY
|
||||
echo '## Benchmarks for JSON' >> $env:GITHUB_STEP_SUMMARY
|
||||
echo '```' >> $env:GITHUB_STEP_SUMMARY
|
||||
.\build\benchmarks\json\Release\reflect-cpp-json-benchmarks.exe --benchmark_filter=canada >> $env:GITHUB_STEP_SUMMARY
|
||||
.\build\benchmarks\json\Release\reflect-cpp-json-benchmarks.exe --benchmark_filter=person_read >> $env:GITHUB_STEP_SUMMARY
|
||||
echo '```' >> $env:GITHUB_STEP_SUMMARY
|
||||
|
||||
Reference in New Issue
Block a user