readme stub #20
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: | |
- master | |
paths-ignore: | |
- "*.md" | |
- "*.txt" | |
- "doxyfile" | |
pull_request: | |
branches: | |
- master | |
paths-ignore: | |
- "*.md" | |
- "*.txt" | |
- "doxyfile" | |
workflow_dispatch: | |
concurrency: | |
group: ci-${{ github.head_ref }} | |
cancel-in-progress: true | |
jobs: | |
testrunner: | |
strategy: | |
fail-fast: true | |
matrix: | |
sanitizer: [none, address] | |
type: [RelWithDebInfo, Release] | |
compiler: [g++, clang++] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Clone repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Build | |
run: | | |
export cxx="/usr/bin/${{ matrix.compiler }}" | |
if [ "${{ matrix.sanitizer }}" = "none" ]; then | |
./build.sh -t "${{ matrix.type }}" | |
else | |
./build.sh -t "${{ matrix.type }}" -o "-DCMAKE_CXX_FLAGS=-fsanitize=${{ matrix.sanitizer }}" | |
fi | |
- name: Run tests | |
run: | | |
git lfs install | |
git lfs pull | |
cd test | |
tar -xvzf input.tar.gz | |
cd .. | |
for shrinkingFactor in 1 8 64 256; do | |
for threadCount in 1 2 4; do | |
for case in mok_structure mok_fluid; do | |
echo "Running $case on $threadCount threads with $shrinkingFactor shrinking ..." | |
export OMP_NUM_THREADS=$threadCount | |
if ! build/bin/mcgs_testrunner \ | |
test/${case}.mm test/${case}_rhs.mm \ | |
-s $shrinkingFactor \ | |
-i 1e2 | |
then exit 1 | |
fi | |
done | |
done | |
done | |
generate-docs: | |
needs: testrunner | |
runs-on: ubuntu-latest | |
steps: | |
- name: Clone | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Install Dependencies | |
run: sudo apt install findutils doxygen graphviz | |
- name: Update doc branch with current master | |
run: | | |
git config --local user.name $USER_NAME | |
git config --local user.email "[email protected]" | |
git branch -D doc &>/dev/null || true | |
git checkout -b doc | |
env: | |
USER_NAME: matekelemen | |
- name: Generate Docs | |
run: cd docs && doxygen doxyfile && cd .. | |
- name: Generate root index.html | |
run: echo "<meta http-equiv=\"refresh\" content=\"0; docs/html/index.html\">" > index.html | |
- name: Update Remote | |
run: | | |
git add index.html docs/html -f | |
git commit -m "update docs" | |
git push -f https://$USER_NAME:[email protected]/matekelemen/mcgs.git doc | |
env: | |
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} | |
USER_NAME: matekelemen |