Ensure loadVtpFile works when the vtp file doesn't have a <PointData>… #1
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: continuous-integration | |
# syntax https://help.github.com/en/articles/workflow-syntax-for-github-actions | |
on: | |
pull_request: | |
branches: | |
- '*' | |
push: | |
branches: | |
- master | |
tags: | |
- '*' | |
jobs: | |
windows: | |
name: Windows | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Doxygen | |
# choco install doxygen.portable # <-- too unreliable. | |
run: | | |
(New-Object System.Net.WebClient).DownloadFile("https://github.com/doxygen/doxygen/releases/download/Release_1_12_0/doxygen-1.12.0.windows.x64.bin.zip", "doxygen.zip") | |
7z x $env:GITHUB_WORKSPACE/doxygen.zip -odoxygen | |
echo "$env:GITHUB_WORKSPACE\\doxygen" >> $GITHUB_PATH | |
- name: Obtain short git commit hash | |
id: commithash | |
shell: bash | |
# https://stackoverflow.com/questions/58886293/getting-current-branch-and-commit-hash-in-github-action | |
run: echo "::set-output name=hash::$(git rev-parse --short HEAD)" | |
- name: Configure | |
run: | | |
cmake -S $env:GITHUB_WORKSPACE --preset ci-msvc-windows-release -LAH | |
- name: Build | |
run: | | |
cmake --build --preset ci-msvc-windows-release --parallel 4 | |
- name: Test | |
run: | | |
ctest --preset ci-msvc-windows-release --parallel 4 | |
- name: Install | |
run: | | |
cmake --build --preset ci-msvc-windows-release --config Release --parallel 4 --target doxygen | |
cmake --install $env:GITHUB_WORKSPACE\\out\\build\\ci-msvc-windows-release --config Release | |
move $env:GITHUB_WORKSPACE\\out\\install\\ci-msvc-windows-release simbody-${{ steps.commithash.outputs.hash }} | |
- name: Upload | |
uses: actions/upload-artifact@v4 | |
with: | |
name: simbody-${{ steps.commithash.outputs.hash }}-win | |
path: simbody-${{ steps.commithash.outputs.hash }} | |
mac: | |
name: Mac | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Homebrew packages | |
run: | | |
brew install doxygen | |
- name: Obtain short git commit hash | |
id: commithash | |
shell: bash | |
run: echo "::set-output name=hash::$(git rev-parse --short HEAD)" | |
- name: Configure | |
run: | | |
cmake -S $GITHUB_WORKSPACE --preset ci-make-macos-release -LAH | |
- name: Build | |
run: | | |
cmake --build --preset ci-make-macos-release --parallel 4 | |
- name: Test | |
run: | | |
ctest --preset ci-make-macos-release --parallel 4 | |
- name: Install | |
run: | | |
cmake --build --preset ci-make-macos-release --target doxygen | |
cmake --install $GITHUB_WORKSPACE/out/build/ci-make-macos-release | |
mv $GITHUB_WORKSPACE/out/install/ci-make-macos-release simbody-${{ steps.commithash.outputs.hash }} | |
zip --symlinks --recurse-paths --quiet simbody-${{ steps.commithash.outputs.hash }}.zip simbody-${{ steps.commithash.outputs.hash }} | |
- name: Upload | |
uses: actions/upload-artifact@v4 | |
with: | |
# The upload-artifact zipping does not preserve symlinks or executable | |
# bits. So we zip ourselves, even though this causes a double-zip. | |
name: simbody-${{ steps.commithash.outputs.hash }}-mac | |
path: simbody-${{ steps.commithash.outputs.hash }}.zip | |
ubuntu: | |
name: Ubuntu | |
runs-on: ubuntu-20.04 | |
strategy: | |
matrix: | |
build_type: [release, debug] | |
compiler: [gcc, clang] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Obtain short git commit hash | |
id: commithash | |
shell: bash | |
run: echo "::set-output name=hash::$(git rev-parse --short HEAD)" | |
- name: Install packages | |
run: sudo apt-get install --yes liblapack-dev freeglut3-dev libxi-dev libxmu-dev doxygen | |
- name: Configure | |
run: | | |
cmake -S $GITHUB_WORKSPACE --preset ci-make-${{ matrix.compiler }}-linux-${{ matrix.build_type }} -LAH | |
- name: Build | |
run: | | |
cmake --build --preset ci-make-${{ matrix.compiler }}-linux-${{ matrix.build_type }} --parallel 4 | |
- name: Test | |
run: | | |
ctest --preset ci-make-${{ matrix.compiler }}-linux-${{ matrix.build_type }} --output-on-failure | |
- name: Install | |
run: | | |
cmake --build --preset ci-make-${{ matrix.compiler }}-linux-${{ matrix.build_type }} --target doxygen | |
cmake --install $GITHUB_WORKSPACE/out/build/ci-make-${{ matrix.compiler }}-linux-${{ matrix.build_type }} | |
mv $GITHUB_WORKSPACE/out/install/ci-make-${{ matrix.compiler }}-linux-${{ matrix.build_type }} simbody-${{ steps.commithash.outputs.hash }} | |
zip --symlinks --recurse-paths --quiet simbody-${{ steps.commithash.outputs.hash }}.zip simbody-${{ steps.commithash.outputs.hash }} | |
- name: Upload | |
uses: actions/upload-artifact@v4 | |
with: | |
# The upload-artifact zipping does not preserve symlinks or executable | |
# bits. So we zip ourselves, even though this causes a double-zip. | |
name: simbody-${{ steps.commithash.outputs.hash }}-linux-${{ matrix.compiler }}-${{ matrix.build_type }} | |
path: simbody-${{ steps.commithash.outputs.hash }}.zip | |
style: | |
name: Style | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Check for tabs | |
# Ensure that there are no tabs in source code. | |
# GREP returns 0 (true) if there are any matches, and | |
# we don't want any matches. If there are matches, | |
# print a helpful message, and make the test fail by using "false". | |
# The GREP command here checks for any tab characters in the the files | |
# that match the specified pattern. GREP does not pick up explicit tabs | |
# (e.g., literally a \t in a source file). | |
run: if grep --recursive --include={*.cpp,*.c,*.h,*.md,*.yml,*.cmake.*.xml,*.html,*.in,*.txt} --exclude-dir=c-cmaes -P "\t" . ; then echo "Tabs found in the lines shown above. See CONTRIBUTING.md about tabs."; false; else echo "Repo passed no-tabs check."; fi |