diff --git a/.github/workflows/build-test-macos.yml b/.github/workflows/build-test-macos.yml new file mode 100644 index 0000000000..c6dcd99c70 --- /dev/null +++ b/.github/workflows/build-test-macos.yml @@ -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 diff --git a/Svc/TlmPacketizer/TlmPacketizer.cpp b/Svc/TlmPacketizer/TlmPacketizer.cpp index d856198ff1..7d77865faa 100644 --- a/Svc/TlmPacketizer/TlmPacketizer.cpp +++ b/Svc/TlmPacketizer/TlmPacketizer.cpp @@ -25,7 +25,6 @@ namespace Svc { TlmPacketizerComponentBase(compName) ,m_numPackets(0) ,m_configured(false) - ,m_runCount(0) ,m_startLevel(0) ,m_maxLevel(0) { diff --git a/Svc/TlmPacketizer/TlmPacketizer.hpp b/Svc/TlmPacketizer/TlmPacketizer.hpp index 4e3fef78ef..d8492946be 100644 --- a/Svc/TlmPacketizer/TlmPacketizer.hpp +++ b/Svc/TlmPacketizer/TlmPacketizer.hpp @@ -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 diff --git a/ci/tests/fputil.bash b/ci/tests/fputil.bash index 5402a8cd66..10d4ab26e6 100755 --- a/ci/tests/fputil.bash +++ b/ci/tests/fputil.bash @@ -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" @@ -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