Skip to content

Fix string pool lookup performance #482

Fix string pool lookup performance

Fix string pool lookup performance #482

Workflow file for this run

name: Build
on:
push:
branches: [ master, main ]
pull_request:
branches: [ '**' ]
paths-ignore:
- '**/*.md'
- '**/*.txt'
jobs:
build-linux:
name: Linux
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Install dependencies
run: |
sudo apt-get update && sudo apt-get install gcovr ninja-build valgrind
- name: Install Conan 2
run: |
pip install conan
conan profile detect
- name: Build
run: |
mkdir build
conan install . -of build --build=missing -s compiler.cppstd=20
cmake . -B build -GNinja -DSIMFIL_FPIC=YES -DSIMFIL_SHARED=NO
cmake --build build
- name: Run CTest
working-directory: build/test
run: |
ctest --verbose --output-junit result-junit.xml
- name: Publish Test Results
uses: EnricoMi/publish-unit-test-result-action@v2
id: test-results
if: always()
with:
files: |
build/test/*.xml
- name: Set badge color
shell: bash
run: |
case ${{ fromJSON( steps.test-results.outputs.json ).conclusion }} in
success)
echo "BADGE_COLOR=31c653" >> $GITHUB_ENV
;;
failure)
echo "BADGE_COLOR=800000" >> $GITHUB_ENV
;;
neutral)
echo "BADGE_COLOR=696969" >> $GITHUB_ENV
;;
esac
- name: Create badge
uses: emibcn/badge-action@d6f51ff11b5c3382b3b88689ae2d6db22d9737d1
with:
label: Tests
status: '${{ fromJSON( steps.test-results.outputs.json ).formatted.stats.tests }} tests, ${{ fromJSON( steps.test-results.outputs.json ).formatted.stats.runs }} runs: ${{ fromJSON( steps.test-results.outputs.json ).conclusion }}'
color: ${{ env.BADGE_COLOR }}
path: badge.svg
- name: Upload badge to Gist
# Upload only for main branch
if: >
github.event_name == 'workflow_run' && github.event.workflow_run.head_branch == 'main' ||
github.event_name != 'workflow_run' && github.ref == 'refs/heads/main'
uses: andymckay/append-gist-action@1fbfbbce708a39bd45846f0955ed5521f2099c6d
with:
token: ${{ secrets.GIST_TOKEN }}
gistURL: https://gist.githubusercontent.com/johannes-wolf/61e57af50757b03e0c7cd119ec2d2f4b
file: badge.svg
- name: Run Valgrind Memcheck
working-directory: build/test
run: |
valgrind --tool=memcheck ./test.simfil
- name: Run Valgrind Helgrind
working-directory: build/test
run: |
valgrind --tool=helgrind ./test.simfil
- name: Run Valgrind Cachegrind
working-directory: build/test
run: |
valgrind --tool=cachegrind ./test.simfil | tee cachegrind-out.txt
- name: Run Valgrind Callgrind
working-directory: build/test
run: |
valgrind --tool=callgrind --instr-atstart=no ./test.simfil
- name: Publish Callgrind Output
uses: actions/upload-artifact@v3
with:
name: Callgrind Output
path: build/test/callgrind.out.*
build-windows:
name: Windows
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Install Conan 2
run: |
pip install conan
conan profile detect
- name: Build
run: |
mkdir build
conan install . -of build --build=missing -s compiler.cppstd=20
cmake . -B build -DSIMFIL_FPIC=NO -DSIMFIL_SHARED=NO
cmake --build build
- name: Run CTest
working-directory: build/test
run: |
ctest --verbose --output-junit result-junit.xml
build-macos:
name: MacOS
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Install Conan 2
run: |
pip install conan
conan profile detect
- name: Build
run: |
mkdir build
conan install . -of build --build=missing -s compiler.cppstd=20
cmake . -B build -DSIMFIL_FPIC=YES -DSIMFIL_SHARED=NO
cmake --build build
- name: Run CTest
working-directory: build/test
run: |
ctest --verbose --output-junit result-junit.xml