Update shell_test.yml #28
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: test Zona | |
on: | |
push: | |
branches: ['**'] | |
pull_request: | |
branches: ['**'] | |
jobs: | |
minimal_cmake_version: | |
name: "Minimal CMake version" | |
timeout-minutes: 30 | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: "Get Current CMake version" | |
id: cmake_version | |
run: | | |
current_cmake_major_ver=$(echo "VERSION 13.12.0" | grep -oP "\d+\.\d+" | cut -d'.' -f 1) | |
current_cmake_minor_ver=$(echo "VERSION 13.12.0" | grep -oP "\d+\.\d+" | cut -d'.' -f 2) | |
echo $current_cmake_major_ver | |
echo $current_cmake_minor_ver | |
# Saving cmake output in GitHub output | |
echo "current_cmake_major_ver=$current_cmake_major_ver" >> $GITHUB_OUTPUT | |
echo "current_cmake_minor_ver=$current_cmake_minor_ver" >> $GITHUB_OUTPUT | |
- name: "Check minimal CMake version" | |
env: | |
EXPECTED_CMAKE_MAJOR_VER: 5 | |
EXPECTED_CMAKE_MINOR_VER: 8 | |
CURRENT_CMAKE_MAJOR_VER: ${{ steps.cmake_version.outputs.current_cmake_major_ver }} | |
CURRENT_CMAKE_MINOR_VER: ${{ steps.cmake_version.outputs.current_cmake_minor_ver }} | |
if: env.CURRENT_CMAKE_MAJOR_VER < env.EXPECTED_CMAKE_MAJOR_VER | |
run: | | |
echo "PASSED" | |