-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Adding github actions for build tests * updates to actions * removed test workflow
- Loading branch information
Showing
5 changed files
with
253 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
name: Build all on linux | ||
on: [push] | ||
jobs: | ||
clone-to-OF_ROOT: | ||
runs-on: [self-hosted, Linux] | ||
environment: RUNNER-LINUX | ||
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 }} | ||
build-oscilloscope: | ||
needs: clone-to-OF_ROOT | ||
runs-on: [self-hosted, Linux] | ||
environment: RUNNER-LINUX | ||
steps: | ||
- name: build using make | ||
working-directory: ${{ vars.OFXEMOTIBIT_DIR }} | ||
run: | | ||
echo "current working directory" && pwd | ||
cd EmotiBitOscilloscope | ||
make | ||
build-dataparser: | ||
needs: clone-to-OF_ROOT | ||
runs-on: [self-hosted, Linux] | ||
environment: RUNNER-LINUX | ||
steps: | ||
- name: build using make | ||
working-directory: ${{ vars.OFXEMOTIBIT_DIR }} | ||
run: | | ||
echo "current working directory" && pwd | ||
cd EmotiBitDataParser | ||
make |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
name: Build all on macos | ||
on: [push] | ||
jobs: | ||
clone-to-OF_ROOT: | ||
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 }} | ||
build-oscilloscope: | ||
needs: clone-to-OF_ROOT | ||
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: | ||
needs: clone-to-OF_ROOT | ||
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: | ||
needs: clone-to-OF_ROOT | ||
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
name: Build all on Windows | ||
on: [push] | ||
jobs: | ||
clone-to-OF_ROOT: | ||
runs-on: [self-hosted, Windows] | ||
environment: RUNNER-WINDOWS | ||
steps: | ||
- name: remove existing clone | ||
shell: bash | ||
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 | ||
shell: bash | ||
run: | | ||
echo ${{ github.repository }} | cut -d '/' -f 2 | ||
cp -r ..\\$(echo ${{ github.repository }} | cut -d '/' -f 2) ${{ vars.ADDONS_DIR }} | ||
build-oscilloscope: | ||
needs: clone-to-OF_ROOT | ||
runs-on: [self-hosted, Windows] | ||
environment: RUNNER-WINDOWS | ||
steps: | ||
- name: build using MSBuild | ||
shell: cmd | ||
working-directory: ${{ vars.OFXEMOTIBIT_DIR }} | ||
run: | | ||
echo "current working directory" && pwd | ||
cd EmotiBitOscilloscope | ||
MSBuild EmotiBitOscilloscope.sln -t:Build -p:Configuration=Release | ||
build-dataparser: | ||
needs: clone-to-OF_ROOT | ||
runs-on: [self-hosted, Windows] | ||
environment: RUNNER-WINDOWS | ||
steps: | ||
- name: build using MSBuild | ||
shell: cmd | ||
working-directory: ${{ vars.OFXEMOTIBIT_DIR }} | ||
run: | | ||
echo "current working directory" && pwd | ||
cd EmotiBitDataParser | ||
MSBuild EmotiBitDataParser.sln -t:Build -p:Configuration=Release | ||
build-firmwareinstaller: | ||
needs: clone-to-OF_ROOT | ||
runs-on: [self-hosted, Windows] | ||
environment: RUNNER-WINDOWS | ||
steps: | ||
- name: build using MSBuild | ||
shell: cmd | ||
working-directory: ${{ vars.OFXEMOTIBIT_DIR }} | ||
run: | | ||
echo "current working directory" && pwd | ||
cd EmotiBitFirmwareInstaller | ||
MSBuild EmotiBitFirmwareInstaller.sln -t:Build -p:Configuration=Release |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
name: upload build artifact mac | ||
on: | ||
workflow_run: | ||
workflows: ["Build all on macos"] | ||
types: | ||
- completed | ||
branches: | ||
[dev] | ||
jobs: | ||
upload-artifact: | ||
runs-on: [self-hosted, macOS] | ||
environment: RUNNER-MACOS | ||
steps: | ||
- name: create stage-release | ||
working-directory: ${{ vars.OFXEMOTIBIT_DIR }} | ||
run: mkdir -p stageRelease/EmotiBitSoftware-macos | ||
- name: populate stage release | ||
working-directory: ${{ vars.OFXEMOTIBIT_DIR }} | ||
run: | | ||
mv EmotiBitOscilloscope/bin/EmotiBitOscilloscope.app stageRelease/EmotiBitSoftware-macos | ||
mv EmotiBitDataParser/bin/EmotiBitDataParser.app stageRelease/EmotiBitSoftware-macos | ||
mv EmotiBitFirmwareInstaller/bin/EmotiBitFirmwareInstaller.app stageRelease/EmotiBitSoftware-macos | ||
- name: upload artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: EmotiBitSoftware-macos | ||
path: ${{ vars.OFXEMOTIBIT_DIR }}/stageRelease/EmotiBitSoftware-macos/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
name: upload build artifact Windows | ||
on: | ||
|
||
#workflow_dispatch: | ||
workflow_run: | ||
workflows: ["Build all on Windows"] | ||
types: | ||
- completed | ||
branches: | ||
[dev] | ||
jobs: | ||
build-installer: | ||
runs-on: [self-hosted, Windows] | ||
environment: RUNNER-WINDOWS | ||
steps: | ||
- name: build installer project | ||
shell: cmd | ||
working-directory: ${{ vars.OFXEMOTIBIT_DIR }} | ||
run: | | ||
cd EmotiBitInstaller | ||
devenv EmotiBitInstaller.sln /Build Release | ||
upload-artifact: | ||
needs: build-installer | ||
runs-on: [self-hosted, Windows] | ||
environment: RUNNER-WINDOWS | ||
steps: | ||
- name: create stage-release | ||
shell: bash | ||
working-directory: ${{ vars.OFXEMOTIBIT_DIR }} | ||
run: mkdir -p stageRelease/EmotiBitSoftware-Windows | ||
- name: populate stage release | ||
shell: bash | ||
working-directory: ${{ vars.OFXEMOTIBIT_DIR }} | ||
run: | | ||
msiInstPath=./EmotiBitInstaller/EmotiBitInstaller/Release/EmotiBitInstaller.msi | ||
setupPath=./EmotiBitInstaller/EmotiBitInstaller/Release/setup.exe | ||
silabsDriverPath=../../../drivers/CP210x_Windows_Drivers | ||
releaseFolder="EmotiBitSoftware-Windows" | ||
version=$(grep ./src/ofxEmotiBitVersion.h -e "string ofxEmotiBitVersion" | cut -d '"' -f 2) | ||
echo "Staging release for version: $version" | ||
if [ -f "$msiInstPath" ] || [ -f "$setupPath" ]; then | ||
echo "msi and exe files found!" | ||
echo "staging release" | ||
echo "copying installer files" | ||
cp "$msiInstPath" "./stageRelease/$releaseFolder" | ||
cp "$setupPath" "./stageRelease/$releaseFolder" | ||
for i in $(find ../../../drivers -maxdepth 1 -mindepth 1 -name '*CP210x*' -type d); do | ||
dirname=$(basename "$i") | ||
worktree="../../../drivers/$dirname" | ||
echo "copying $dirname" | ||
cp -r "$worktree" "./stageRelease/$releaseFolder" | ||
done | ||
else | ||
echo "installer files not found! Create installer!" | ||
fi | ||
- name: upload artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: EmotiBitSoftware-Windows | ||
path: ${{ vars.OFXEMOTIBIT_DIR }}\\stageRelease\\EmotiBitSoftware-Windows |