Skip to content

fixing ctest for slide player #212

fixing ctest for slide player

fixing ctest for slide player #212

name: macOS
on: [push]
jobs:
clone-macos:
runs-on: [self-hosted, macOS]
environment: RUNNER-MACOS
steps:
- name: remove existing clone
working-directory: ${{ vars.ADDONS_DIR }}
run: |
pwd
#echo "the commit that dispatched this job-- ${GITHUB_SHA}"
if [ -d ofxEmotiBit ]; then
echo "Directory exists."
rm -rf ofxEmotiBit
echo "clone removed"
else
echo "Directory does not already exist"
fi
- name: checkout repository
uses: actions/checkout@v4
- name: move fresh clone to OF_ROOT
run: cp -r ../$(echo ${{ github.repository }} | cut -d '/' -f 2) ${{ vars.ADDONS_DIR }}
- name: download addon dependencies
working-directory: ${{ vars.ADDONS_DIR }}
run: bash ofxEmotiBit/scripts/download-dependencies.sh ${{ vars.ADDONS_DIR }}
- name: record dependency commits
working-directory: ${{ vars.ADDONS_DIR }}
run: bash ofxEmotiBit/scripts/record-dependencies.sh ${{ vars.ADDONS_DIR }} macos
- name: upload dependencies report
uses: actions/upload-artifact@v4
with:
name: dependencies-report-macos
path: ${{ vars.OFXEMOTIBIT_DIR }}/dependencies-report-macos.txt
build-oscilloscope-macos:
needs: clone-macos
runs-on: [self-hosted, macOS]
environment: RUNNER-MACOS
steps:
- name: build using xcode
working-directory: ${{ vars.OFXEMOTIBIT_DIR }}
run: |
echo "current working directory" && pwd
cd EmotiBitOscilloscope
xcodebuild -project EmotiBitOscilloscope.xcodeproj -scheme Release-x86_64
build-dataparser-macos:
needs: clone-macos
runs-on: [self-hosted, macOS]
environment: RUNNER-MACOS
steps:
- name: build using xcode
working-directory: ${{ vars.OFXEMOTIBIT_DIR }}
run: |
echo "current working directory" && pwd
cd EmotiBitDataParser
xcodebuild -project EmotiBitDataParser.xcodeproj -scheme Release
build-firmwareinstaller-macos:
needs: clone-macos
runs-on: [self-hosted, macOS]
environment: RUNNER-MACOS
steps:
- name: build using xcode
working-directory: ${{ vars.OFXEMOTIBIT_DIR }}
run: |
echo "current working directory" && pwd
cd EmotiBitFirmwareInstaller
xcodebuild -project EmotiBitFirmwareInstaller.xcodeproj -scheme Release
build-slideplayer-macos:
needs: clone-macos
runs-on: [self-hosted, macOS]
environment: RUNNER-MACOS
steps:
- name: build using xcode
working-directory: ${{ vars.OFXEMOTIBIT_DIR }}
run: |
echo "current working directory" && pwd
cd SlidePlayer
xcodebuild -project SlidePlayer.xcodeproj -scheme Release
upload-artifact-macos:
needs: [build-oscilloscope-macos, build-dataparser-macos, build-firmwareinstaller-macos, build-slideplayer-macos]
if: github.ref == 'refs/heads/dev'
runs-on: [self-hosted, macOS]
environment: RUNNER-MACOS
steps:
- name: get version for artifact name
id: get_version
working-directory: ${{ vars.OFXEMOTIBIT_DIR }}
run: |
version=$(grep ./src/ofxEmotiBitVersion.h -e "string ofxEmotiBitVersion" | cut -d '"' -f 2)
echo "version=$version" >> $GITHUB_OUTPUT
echo "Staging release for version: $version"
- name: create stage-release
working-directory: ${{ vars.OFXEMOTIBIT_DIR }}
run: mkdir -p stageRelease/EmotiBitSoftware-macos-${{ steps.get_version.outputs.version }}
- name: Move application binaries
working-directory: ${{ vars.OFXEMOTIBIT_DIR }}
run: |
mv EmotiBitOscilloscope/bin/EmotiBitOscilloscope.app stageRelease/EmotiBitSoftware-macos-${{ steps.get_version.outputs.version }}
mv EmotiBitDataParser/bin/EmotiBitDataParser.app stageRelease/EmotiBitSoftware-macos-${{ steps.get_version.outputs.version }}
mv EmotiBitFirmwareInstaller/bin/EmotiBitFirmwareInstaller.app stageRelease/EmotiBitSoftware-macos-${{ steps.get_version.outputs.version }}
mv SlidePlayer/bin/SlidePlayer.app stageRelease/EmotiBitSoftware-macos-${{ steps.get_version.outputs.version }}
- name: copy SiLabs drivers
working-directory: ${{ vars.ADDONS_DIR }}
run: |
silabsDriverPath="../../drivers/macOS_VCP_Driver"
if [ -d "$silabsDriverPath" ]; then
echo "copying drivers!"
cp -r "$silabsDriverPath/" "ofxEmotiBit/stageRelease/EmotiBitSoftware-macos-${{ steps.get_version.outputs.version }}"
else
echo "drivers not found! proceeding without drivers!"
exit 1
fi
- name: upload artifact
uses: actions/upload-artifact@v4
with:
name: EmotiBitSoftware_v${{ steps.get_version.outputs.version }}-macOS
path: ${{ vars.OFXEMOTIBIT_DIR }}/stageRelease/EmotiBitSoftware-macos-${{ steps.get_version.outputs.version }}/
cleanup-dependencies-macos:
needs: [build-oscilloscope-macos, build-dataparser-macos, build-firmwareinstaller-macos, build-slideplayer-macos]
runs-on: [self-hosted, macOS]
environment: RUNNER-MACOS
steps:
- name: remove cloned dependencies
working-directory: ${{ vars.ADDONS_DIR }}
run: bash ofxEmotiBit/scripts/download-dependencies.sh --cleanup ${{ vars.ADDONS_DIR }}