Add convenience constructors for grids #4480
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: ClimaCoreVTK CI | |
on: | |
pull_request: | |
# Needed to allow julia-actions/cache to delete old caches that it has created | |
permissions: | |
actions: write | |
contents: read | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
lib-climacore-vtk: | |
runs-on: ubuntu-20.04 | |
timeout-minutes: 30 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- uses: julia-actions/setup-julia@v2 | |
with: | |
version: '1.10' | |
- uses: julia-actions/cache@v2 | |
- name: Install Paraview | |
run: | | |
sudo apt-get update && sudo apt-get -y install paraview python3-paraview | |
- name: Install Julia dependencies | |
run: | | |
julia --project=monorepo -e 'using Pkg; Pkg.develop(path="$(pwd())/lib/ClimaCoreVTK")' | |
- name: Run the tests | |
env: | |
CI_OUTPUT_DIR: output | |
run: > | |
julia --project=monorepo -e 'using Pkg; Pkg.test("ClimaCoreVTK")' | |
&& echo "TESTS_SUCCESSFUL=true" >> $GITHUB_ENV | |
- name: Render the VTK images | |
run: > | |
for f in lib/ClimaCoreVTK/test/output/*.vtu; | |
do | |
xvfb-run -a pvpython lib/ClimaCoreVTK/paraview/renderimage.py "$f" "$f.png"; | |
done | |
continue-on-error: true | |
- name: Upload test Artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: climacore-vtk-output | |
path: | | |
lib/ClimaCoreVTK/test/output/*.png | |
- name: Fail after artifacts if tests failed | |
if: ${{ env.TESTS_SUCCESSFUL != 'true' }} | |
run: exit 1 |