Skip to content

ENH: Minimal changes for side-by-side CMake build #390

ENH: Minimal changes for side-by-side CMake build

ENH: Minimal changes for side-by-side CMake build #390

Workflow file for this run

name: Build and Test
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build:
name: ${{ matrix.name }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
name: [ "Build Bionic", "Build Focal", "Build Jammy", "Build Jammy OMP" ]
include:
- name: "Build Bionic"
release: bionic
- name: "Build Focal"
release: focal
- name: "Build Jammy"
release: jammy
- name: "Build Jammy OMP"
release: jammy-omp
steps:
- name: Check Out Repo
uses: actions/checkout@v3
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_TOKEN }}
- name: Build and push
id: docker_build
uses: docker/build-push-action@v3
with:
context: .
file: docker/actions/Dockerfile.actions.${{ matrix.release }}
push: true
tags: fluidity/actions:${{ matrix.release }}-${{ github.sha }}
testing:
name: ${{ matrix.name }}
runs-on: ubuntu-latest
needs: build
if: success() || failure()
strategy:
fail-fast: false
matrix:
name: [ "Short Bionic", "Unit Focal", "Short Focal", "Medium Focal", "Unit Jammy", "Short Jammy", "Medium Jammy" ]
include:
- name: "Short Bionic"
release: bionic
command: "make THREADS=2 test"
output: "test_results.xml"
- name: "Unit Focal"
release: focal
command: "make unittest"
output: "test_results_unittests.xml"
- name: "Short Focal"
release: focal
command: "make THREADS=2 test"
output: "test_results.xml"
- name: "Medium Focal"
release: focal
command: "make THREADS=2 mediumtest"
output: "test_results_medium.xml"
- name: "Unit Jammy"
release: jammy
command: "make unittest"
output: "test_results_unittests.xml"
- name: "Short Jammy"
release: jammy
command: "make THREADS=2 test"
output: "test_results.xml"
- name: "Medium Jammy"
release: jammy
command: "make THREADS=2 mediumtest"
output: "test_results_medium.xml"
steps:
- name: ${{ matrix.name }} Testing
run: |
chmod 777 .
docker pull fluidity/actions:${{ matrix.release }}-${{ github.sha }}
docker run -v $PWD:/host fluidity/actions:${{ matrix.release }}-${{ github.sha }} /bin/bash -c "${{ matrix.command }} && cp -v tests/${{ matrix.output }} /host/${{ matrix.release }}-${{ matrix.output}}"
- uses: actions/upload-artifact@v3
with:
path: ${{ matrix.release }}-${{ matrix.output }}
name: tests_xml_outputs
- name: ${{ matrix.name }} JUnit
uses: mikepenz/action-junit-report@v3
with:
report_paths: ${{ matrix.release }}-${{ matrix.output }}
github_token: ${{ secrets.GITHUB_TOKEN }}
check_name: Test report ${{ matrix.name }}
fail_on_failure: true
longtesting:
name: longtest-${{ matrix.name }}
runs-on: ubuntu-latest
needs: build
if: success() || failure()
strategy:
fail-fast: false
matrix:
name: [
"mphase_tephra_settling_2d_adaptive",
"gyre_parallel",
"Stokes_square_convection_1e4_vv_p1p1",
"Stokes_square_convection_1e4_p1p1_Ra_Test",
"Stokes_square_convection_1e4_vv_gauss_p2p1",
"viscous_fs_drunkensailor",
"cylinder-3d-drag",
"viscosity_2d_p0_adaptive_parallel",
"circle-2d-drag",
"mphase_tephra_settling_3d",
"tidal_diagnostics",
"mms_burgers_dg_steady",
"mms_ns_p1bp1_steady",
"mms_ns_dg_steady_parallel",
"mms_burgers_cg_steady",
"mms_burgers_cg_structured_steady",
"mms_ns_cg_steady_full",
"foam_2d_p1dgp2_convergence",
"circular_duct_from_rest",
"mms_tracer_P1dg_cdg_diff_steady",
"mms_tracer_cg_supg_advdiff_steady",
"para_eddy",
"mms_ns_p1p1stabilised_steady",
"lock_exchange_3d",
"mms_tracer_p0_adv_steady_conservative",
"mms_tracer_cg_advdiff_steady",
"gls-MixedLayer",
"sphere-3D-drag-Re100",
"mms_ns_cg_steady",
"mms_tracer_P1dg_br_diff_steady",
"mphase_mms_p1dgp2_br",
"mphase_mms_p2p1_compressible_ie_heat_transfer",
"mphase_mms_p2p1_compressible_ie",
"mms_ns_p0p1_steady_periodic",
"mms_tracer_cv_advdiff_eg_steady",
"mms_ns_p1p1stabilised_supg_steady",
"sphere-3D-drag-Re1",
"mms_tracer_cv_diff_eg_steady",
"mms_tracer_cv_diff_steady_structured",
"mms_ns_p1lp1cv_steady_compressible",
"mphase_mms_p1dgp2_cdg",
"mms_tracer_cv_diff_steady",
"mms_tracer_p0_adv_steady",
"mms_ns_p0p1cv_steady_periodic",
"mphase_mms_p2p1_no_interactions",
"mms_ns_dg_steady",
"mphase_mms_p1dgp2_fpdrag",
"mms_tracer_cv_advdiff_steady",
"sphere-3D-drag-Re10",
"wetting_and_drying_thacker_dg_parallel",
"flow_past_sphere_Re1",
"flow_past_sphere_Re10",
"flow_past_sphere_Re100",
"particle_rayleigh_taylor_mu10",
"rotating_channel",
"tephra_settling",
"top_hat",
"water_collapse",
"stagnant_conical_island",
"lituya_bay_pseudo2dadapt",
"pseudo2dadapt_parallel_galerkinproj",
"mms_rans_p2p1_keps_linearmomentum_cv",
"mms_rans_p2p1_keps_lowRe",
"mphase_mms_p2p1_compressible_ie_p1cv_heat_transfer",
"mms_ns_p2lp1_steady_compressible",
"mphase_mms_p2p1_vfrac",
"lock_exchange_3d_dg",
"mms_rans_p1dgp2_upw_keps",
"mphase_mms_p2p1_compressible_ie_p1cv",
"mms_rans_p1dgp2_keps",
"open_ocean_deep_convection-parallel",
"mms_rans_p2p1_keps_linearmomentum",
"Stommel_tracer_advection",
"particle_stratified_stable_layer",
"spherical_benchmark_free_slip",
"spherical_benchmark_free_slip_p2bp1dg",
"spherical_benchmark_no_slip",
"spherical_benchmark_no_slip_p2bp1dg",
"spherical_benchmark_smooth_free_slip",
"spherical_benchmark_smooth_no_slip",
"backward_facing_step_2d",
"explicit-hyperc-shear",
"explicit-hyperc-shear-adapt",
"explicit-hyperc-superman",
"coarse-corner",
"gls-StationPapa",
"medp1dgp2",
"Stokes_mms_p1dg_p2",
"Stokes_subduction_zone_vanKeken2008_OneA",
"Stokes_subduction_zone_vanKeken2008_TwoB",
"lagrangian_detectors_3d_2e5",
"lock_exchange_2d_Lagrangian_paths",
"square-convection-1e6",
"wetting_and_drying_balzano1_dg_parallel"
## Tests still failing and in need of fixing
#"lock_exchange",
#"lock_exchange_3d_parallel",
#"saltfinger2d_adaptive",
#"driven_cavity",
]
steps:
- name: ${{ matrix.name }} Longtesting
run: |
chmod 777 .
docker pull fluidity/actions:jammy-${{ github.sha }}
docker run -v $PWD:/host fluidity/actions:jammy-${{ github.sha }} /bin/bash -c "git clone https://github.com/fluidityproject/longtests && bin/testharness -x test_results_${{ matrix.name }}.xml -f ${{ matrix.name }}.xml && cp -v test_results_${{ matrix.name }}.xml /host"
- uses: actions/upload-artifact@v3
with:
path: test_results_${{ matrix.name }}.xml
name: tests_xml_outputs
- name: ${{ matrix.name }} JUnit
uses: mikepenz/action-junit-report@v3
with:
report_paths: test_results_${{ matrix.name }}.xml
github_token: ${{ secrets.GITHUB_TOKEN }}
check_name: Longtest report ${{ matrix.name }}
fail_on_failure: true