Split CMake tests and run with minimum cmake (#2619)

* Split CMake tests and run with minimum cmake

* Fix bad environment variable

* Fixing archive type
This commit is contained in:
M Starch 2024-03-28 16:01:08 -07:00 committed by GitHub
parent 5bffaa326a
commit 40ff91d625
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 45 additions and 13 deletions

View File

@ -104,16 +104,3 @@ jobs:
fprime-util generate -DCMAKE_C_COMPILER=gcc-10 -DCMAKE_CXX_COMPILER=g++-10 -DCMAKE_CXX_CLANG_TIDY="clang-tidy-12;--config-file=$PWD/release.clang-tidy"
fprime-util build --all -j4
CMake:
runs-on: ubuntu-latest
steps:
- name: "Checkout F´ Repository"
uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: true
- uses: ./.github/actions/setup
- name: CMake Tests
working-directory: ./cmake/test
run: pytest

45
.github/workflows/cmake-test.yml vendored Normal file
View File

@ -0,0 +1,45 @@
name: CMake Test
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
push:
branches: [ devel, release/** ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ devel, release/** ]
# Only run this test when CMake files and setup change
paths:
- 'cmake/**'
- '**/CMakeLists.txt'
- '**.cmake'
- 'requirements.txt'
- ".github/workflows/cmake-test.yml"
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
CMake:
runs-on: ubuntu-latest
steps:
- name: "Checkout F´ Repository"
uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: true
- uses: ./.github/actions/setup
# Specifically install CMake minimum version
- name: Minimum CMake Install
shell: bash
run: |
export CMAKE_TAR_FILE="https://cmake.org/files/v3.16/cmake-3.16.0-Linux-x86_64.tar.gz"
export CMAKE_INSTALL_DIRECTORY="${GITHUB_WORKSPACE}/tools-override"
mkdir -p "${GITHUB_WORKSPACE}/tools-override"
curl -Ls "${CMAKE_TAR_FILE}" | tar -zC "${CMAKE_INSTALL_DIRECTORY}" --strip-components=1 -x
- name: CMake Tests
working-directory: ./cmake/test
shell: bash
run: |
export CMAKE_INSTALL_DIRECTORY="${GITHUB_WORKSPACE}/tools-override"
export PATH="${CMAKE_INSTALL_DIRECTORY}/bin:${PATH}"
cmake --version
pytest