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

lestarch: adding macOS to CI #1007

Merged
merged 6 commits into from
Sep 2, 2021
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
69 changes: 69 additions & 0 deletions .github/workflows/build-test-macos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# This is a basic workflow to help you get started with Actions

name: MacOS-CI

# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
push:
branches: [ master, devel ]
pull_request:
branches: [ master, devel ] # Can dd back release/v3.0.0 once SBT is install in the build system

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
MacOS-Framework:
runs-on: macos-latest
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- name: Install fprime tools
run: pip3 install fprime-tools fprime-gds
- name: F prime CI step
run: ./ci/tests/Framework.bash
# Archive the outputs
- name: 'Archive Logs'
uses: actions/upload-artifact@v2
if: always()
with:
name: ci-framework-logs
path: ci-logs.tar.gz
retention-days: 5

MacOS-Ref:
runs-on: macos-latest
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- name: Install fprime tools
run: pip3 install fprime-tools fprime-gds
- name: F prime CI step
run: ./ci/tests/Ref.bash
# Archive the outputs
- name: 'Archive Logs'
uses: actions/upload-artifact@v2
if: always()
with:
name: ci-ref-logs
path: ci-logs.tar.gz
retention-days: 5

MacOS-Integration:
runs-on: macos-latest
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- name: Install fprime tools
run: pip3 install fprime-tools fprime-gds
- name: Install coreutils
run: brew install coreutils
- name: F prime CI step
run: ./ci/tests/30-ints.bash
# Archive the outputs
- name: 'Archive Logs'
uses: actions/upload-artifact@v2
if: always()
with:
name: ci-int-logs
path: ci-logs.tar.gz
retention-days: 5
1 change: 0 additions & 1 deletion Svc/TlmPacketizer/TlmPacketizer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ namespace Svc {
TlmPacketizerComponentBase(compName)
,m_numPackets(0)
,m_configured(false)
,m_runCount(0)
,m_startLevel(0)
,m_maxLevel(0)
{
Expand Down
2 changes: 0 additions & 2 deletions Svc/TlmPacketizer/TlmPacketizer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,6 @@ namespace Svc {

TlmEntry* findBucket(FwChanIdType id);

NATIVE_UINT_TYPE m_runCount; //!< for testing

NATIVE_UINT_TYPE m_startLevel; //!< initial level for sending packets
NATIVE_UINT_TYPE m_maxLevel; //!< maximum level in all packets

Expand Down
28 changes: 19 additions & 9 deletions ci/tests/fputil.bash
Original file line number Diff line number Diff line change
Expand Up @@ -64,15 +64,20 @@ function integration_test {
fprime-gds -n -r "${ROOTDIR}" -g none -l "${LOG_DIR}/gds-logs" 1>${LOG_DIR}/gds-logs/fprime-gds.stdout.log 2>${LOG_DIR}/gds-logs/fprime-gds.stderr.log &
GDS_PID=$!
# run the app with valgrind in the background
valgrind \
--tool=memcheck \
--error-exitcode=1 \
--verbose \
--leak-check=full \
--show-leak-kinds=all \
--track-origins=yes \
--log-file=${LOG_DIR}/gds-logs/valgrind.log \
if command -v valgrind &> /dev/null
then
valgrind \
--tool=memcheck \
--error-exitcode=1 \
--verbose \
--leak-check=full \
--show-leak-kinds=all \
--track-origins=yes \
--log-file=${LOG_DIR}/gds-logs/valgrind.log \
${ROOTDIR}/*/bin/Ref -a 127.0.0.1 -p 50000 1>${LOG_DIR}/gds-logs/Ref.stdout.log 2>${LOG_DIR}/gds-logs/Ref.stderr.log &
else
${ROOTDIR}/*/bin/Ref -a 127.0.0.1 -p 50000 1>${LOG_DIR}/gds-logs/Ref.stdout.log 2>${LOG_DIR}/gds-logs/Ref.stderr.log &
fi
VALGRIND_PID=$!

echo "[INFO] Allowing GDS ${SLEEP_TIME} seconds to start"
Expand All @@ -84,7 +89,12 @@ function integration_test {
(
cd "${WORKDIR}/test"
echo "[INFO] Running ${WORKDIR}/test's pytest integration tests"
timeout --kill-after=10s 180s pytest
TIMEOUT="timeout"
if ! command -v ${TIMEOUT} &> /dev/null
then
TIMEOUT="gtimeout" # macOS homebrew "coreutils"
fi
${TIMEOUT} --kill-after=10s 180s pytest
)
RET_PYTEST=$?
pkill -P $GDS_PID
Expand Down