+function steps_test() {
+?>
+ - name: Test
+ if: env.BUILD_TESTING == 'ON'
+ run: cmake --build build --config ${{ env.CMAKE_BUILD_TYPE }} -j2 --target test
+ - name: Install
+ if: env.BUILD_TESTING == 'ON'
+ run: cmake --install build --config ${{ env.CMAKE_BUILD_TYPE }} --prefix /tmp
+ - name: Failed tests log
+ if: ${{ env.BUILD_TESTING == 'ON' && failure() }}
+ run: cat build/Testing/Temporary/LastTest.log || true
+<?php
+}
+
+function steps_package() {
+?>
+ - name: Package
+ env:
+ PUSH_ARTIFACTS_ID: ${{ secrets.PUSH_ARTIFACTS_ID }}
+ if: env.CC_VER == 'cur' && env.CMAKE_BUILD_TYPE == 'Release'
+ run: |
+ cmake --config ${{ env.CMAKE_BUILD_TYPE }} -S . -B build
+ cmake --build build --config ${{ env.CMAKE_BUILD_TYPE }} -j2 --target package
+ cmake -DCPACK_COMPONENT_INSTALL=ON build
+ cmake --build build --config ${{ env.CMAKE_BUILD_TYPE }} -j2 --target package
+ cmake --build build --config ${{ env.CMAKE_BUILD_TYPE }} -j2 --target push-artifacts
+<?php
+}
+
+function steps_notify($os_vnd) {
+?>
+ - name: Notify Gitter
+ run: bash .github/notify-gitter.sh ${{ secrets.GITTER }} ${{ job.status }}
+<?php
+}
+
+function steps($os_vnd, $splat_map = null) {
+ steps_setenv($os_vnd, $splat_map);
+ steps_getdeps($os_vnd);