Skip to content

Commit

Permalink
Split CMake tests and run with minimum cmake (#2619)
Browse files Browse the repository at this point in the history
* Split CMake tests and run with minimum cmake

* Fix bad environment variable

* Fixing archive type
  • Loading branch information
LeStarch authored Mar 28, 2024
1 parent 5bffaa3 commit 40ff91d
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 13 deletions.
13 changes: 0 additions & 13 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 changes: 45 additions & 0 deletions .github/workflows/cmake-test.yml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 40ff91d

Please sign in to comment.