@@ -7,17 +7,23 @@ inputs:
77 required : true
88 cxx_compiler :
99 required : true
10+ allow_skipped_tests :
11+ required : true
1012runs :
1113 using : composite
1214 steps :
1315 - name : remove-build-directory
1416 run : rm -rf build
1517 shell : bash
1618
19+ - name : prepare-python-env
20+ uses : ./.github/actions/prepare-python-env
21+
1722 - name : install-gridformat
1823 run : |
1924 cmake -DCMAKE_C_COMPILER=${{inputs.c_compiler}} \
2025 -DCMAKE_CXX_COMPILER=${{inputs.cxx_compiler}} \
26+ -DCMAKE_BUILD_TYPE=Release \
2127 -DGRIDFORMAT_BUILD_TESTS=ON \
2228 -DGRIDFORMAT_BUILD_BINARIES=ON \
2329 -DCMAKE_INSTALL_PREFIX=$(pwd)/install \
@@ -34,14 +40,18 @@ runs:
3440 uses : ./.github/actions/set-test-commands
3541 with :
3642 build_directory : build
43+ source_remote : ${{ env.GFMT_SOURCE_REMOTE }}
3744 source_tree : ${{ env.GFMT_SOURCE_TREE }}
38- target_tree : main
45+ target_remote : ${{ env.GFMT_TARGET_REMOTE }}
46+ target_tree : ${{ env.GFMT_TARGET_TREE }}
3947
4048 - name : test-readme-cli-snippets
4149 run : |
42- export PATH=$PATH:$(pwd)/install/bin
43- python3 test/test_readme_cli_snippets.py \
44- -c "-DCMAKE_C_COMPILER=${{inputs.c_compiler}} -DCMAKE_CXX_COMPILER=${{inputs.cxx_compiler}}"
50+ mkdir readme_snippet_test && pushd readme_snippet_test
51+ cp ../install/bin/* .
52+ export PATH=$PATH:$(pwd)
53+ python3 ../test/test_readme_cli_snippets.py \
54+ -c "-DCMAKE_C_COMPILER=${{inputs.c_compiler}} -DCMAKE_CXX_COMPILER=${{inputs.cxx_compiler}}"
4555 shell : bash
4656
4757 - name : test-installed-pkg
@@ -67,26 +77,48 @@ runs:
6777 popd
6878 shell : bash
6979
80+ - name : verify-no-skipped-tests
81+ run : |
82+ if [[ '${{ inputs.allow_skipped_tests }}' != 'true' ]]; then
83+ if [[ -e installation-test/build/Testing/Temporary/LastTestsDisabled.log ]]; then
84+ echo "The full test suite should not skip any tests. Making the job fail..."
85+ exit 1
86+ else
87+ echo "No skipped tests detected"
88+ fi
89+ else
90+ echo "Skipping verification that no tests have been skipped"
91+ fi
92+ shell : bash
93+
7094 - name : test-examples
7195 run : |
72- pushd examples
73- cmake -DCMAKE_C_COMPILER=${{inputs.c_compiler}} \
74- -DCMAKE_CXX_COMPILER=${{inputs.cxx_compiler}} \
75- -DCMAKE_PREFIX_PATH=/gfmt-dependencies \
76- -Dgridformat_ROOT=$(pwd)/../install \
77- -B build
78- pushd build && make && ctest --output-on-failure
96+ if [[ '${{ env.GFMT_TEST_EXAMPLES }}' == 'true' ]]; then
97+ pushd examples
98+ cmake -DCMAKE_C_COMPILER=${{inputs.c_compiler}} \
99+ -DCMAKE_CXX_COMPILER=${{inputs.cxx_compiler}} \
100+ -DCMAKE_PREFIX_PATH=/gfmt-dependencies \
101+ -Dgridformat_ROOT=$(pwd)/../install \
102+ -B build
103+ pushd build && make && ctest --output-on-failure
104+ else
105+ echo "Skipping example testing"
106+ fi
79107 shell : bash
80108
81109 - name : test-examples-with-fetch-content
82110 run : |
83- rm -rf examples/build && pushd examples
84- cmake -DCMAKE_C_COMPILER=${{inputs.c_compiler}} \
85- -DCMAKE_CXX_COMPILER=${{inputs.cxx_compiler}} \
86- -DCMAKE_BUILD_TYPE=Release \
87- -DCMAKE_PREFIX_PATH=/gfmt-dependencies \
88- -DGRIDFORMAT_FETCH_TREE="$GFMT_TREE" \
89- -DGRIDFORMAT_ORIGIN="$GFMT_ORIGIN" \
90- -B build
91- pushd build && make && ctest --output-on-failure
111+ if [[ '${{ env.GFMT_TEST_EXAMPLES }}' == 'true' ]]; then
112+ rm -rf examples/build && pushd examples
113+ cmake -DCMAKE_C_COMPILER=${{inputs.c_compiler}} \
114+ -DCMAKE_CXX_COMPILER=${{inputs.cxx_compiler}} \
115+ -DCMAKE_BUILD_TYPE=Release \
116+ -DCMAKE_PREFIX_PATH=/gfmt-dependencies \
117+ -DGRIDFORMAT_FETCH_TREE="$GFMT_SOURCE_TREE" \
118+ -DGRIDFORMAT_ORIGIN="$GFMT_SOURCE_REMOTE" \
119+ -B build
120+ pushd build && make && ctest --output-on-failure
121+ else
122+ echo "Skipping example testing"
123+ fi
92124 shell : bash
0 commit comments