Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Split CMake tests and run with minimum cmake #2619

Merged
merged 3 commits into from
Mar 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"
LeStarch marked this conversation as resolved.
Show resolved Hide resolved
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
Loading