Skip to content
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
62 changes: 50 additions & 12 deletions .github/workflows/build-all-on-macos.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Build all on macos
name: macOS
on: [push]
jobs:
clone-to-OF_ROOT:
clone-macos:
runs-on: [self-hosted, macOS]
environment: RUNNER-MACOS
steps:
Expand All @@ -18,39 +18,77 @@ jobs:
echo "Directory does not already exist"
fi
- name: checkout repository
uses: actions/checkout@v4
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
build-oscilloscope-macos:
needs: clone-macos
runs-on: [self-hosted, macOS]
environment: RUNNER-MACOS
steps:
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
build-dataparser-macos:
needs: clone-macos
runs-on: [self-hosted, macOS]
environment: RUNNER-MACOS
steps:
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
build-firmwareinstaller-macos:
needs: clone-macos
runs-on: [self-hosted, macOS]
environment: RUNNER-MACOS
steps:
steps:
- name: build using xcode
working-directory: ${{ vars.OFXEMOTIBIT_DIR }}
run: |
echo "current working directory" && pwd
cd EmotiBitFirmwareInstaller
xcodebuild -project EmotiBitFirmwareInstaller.xcodeproj -scheme Release
upload-artifact-macos:
needs: [build-oscilloscope-macos, build-dataparser-macos, build-firmwareinstaller-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 }}
- 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 }}/
115 changes: 101 additions & 14 deletions .github/workflows/build-all-on-win.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Build all on Windows
name: Windows
on: [push]
jobs:
clone-to-OF_ROOT:
clone-windows:
runs-on: [self-hosted, Windows]
environment: RUNNER-WINDOWS
steps:
Expand All @@ -19,45 +19,132 @@ jobs:
echo "Directory does not already exist"
fi
- name: checkout repository
uses: actions/checkout@v4
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
build-oscilloscope-windows:
needs: clone-windows
runs-on: [self-hosted, Windows]
environment: RUNNER-WINDOWS
steps:
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
MSBuild EmotiBitOscilloscope.sln -t:Build -p:Configuration=Release
build-dataparser-windows:
needs: clone-windows
runs-on: [self-hosted, Windows]
environment: RUNNER-WINDOWS
steps:
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
build-firmwareinstaller-windows:
needs: clone-windows
runs-on: [self-hosted, Windows]
environment: RUNNER-WINDOWS
steps:
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
MSBuild EmotiBitFirmwareInstaller.sln -t:Build -p:Configuration=Release
build-installer-windows:
needs: [build-oscilloscope-windows, build-dataparser-windows, build-firmwareinstaller-windows]
if: github.ref == 'refs/heads/dev'
runs-on: [self-hosted, Windows]
environment: RUNNER-WINDOWS
steps:
- name: check INNO Setup installation
shell: powershell -ExecutionPolicy Bypass -File {0}
run: |
$innoPath = "C:\Program Files (x86)\Inno Setup 6\ISCC.exe"
if (-not (Test-Path $innoPath)) {
Write-Host "INNO Setup 6 not found at $innoPath"
Write-Host "Downloading INNO Setup 6..."
$innoUrl = "https://files.jrsoftware.org/is/6/innosetup-6.3.3.exe"
$innoInstaller = "$env:TEMP\innosetup-6.3.3.exe"
Invoke-WebRequest -Uri $innoUrl -OutFile $innoInstaller
Write-Host "Installing INNO Setup 6..."
Start-Process -FilePath $innoInstaller -Args "/VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-" -Wait
Write-Host "INNO Setup 6 installed successfully"
} else {
Write-Host "INNO Setup 6 found at $innoPath"
}
- name: Download VC++ Redistributable
shell: powershell -ExecutionPolicy Bypass -File {0}
working-directory: ${{ vars.OFXEMOTIBIT_DIR }}
run: |
$redistPath = "EmotiBitInstaller\redist"
$redistFile = "$redistPath\vc_redist.x64.exe"
if (-not (Test-Path $redistFile)) {
Write-Host "VC++ Redistributable not found, downloading..."
New-Item -ItemType Directory -Force -Path $redistPath | Out-Null
$url = "https://aka.ms/vs/17/release/vc_redist.x64.exe"
Invoke-WebRequest -Uri $url -OutFile $redistFile
Write-Host "Downloaded VC++ Redistributable to $redistFile"
} else {
Write-Host "VC++ Redistributable already exists at $redistFile"
}
- name: build installer with INNO Setup
shell: cmd
working-directory: ${{ vars.OFXEMOTIBIT_DIR }}
run: |
cd EmotiBitInstaller
"C:\Program Files (x86)\Inno Setup 6\ISCC.exe" EmotiBitInstaller.iss
upload-artifact-windows:
needs: build-installer-windows
if: github.ref == 'refs/heads/dev'
runs-on: [self-hosted, Windows]
environment: RUNNER-WINDOWS
steps:
- name: populate stage release
shell: bash
working-directory: ${{ vars.OFXEMOTIBIT_DIR }}
run: |
version=$(grep ./src/ofxEmotiBitVersion.h -e "string ofxEmotiBitVersion" | cut -d '"' -f 2)
releaseFolder="EmotiBitSoftware-Windows-${version}"
echo "Staging release for version: $version"
echo "Release folder: $releaseFolder"
mkdir -p "stageRelease/$releaseFolder"
installerPath="./EmotiBitInstaller/Output/EmotiBitInstaller-${version}.exe"
if [ -f "$installerPath" ]; then
echo "INNO Setup installer found: $installerPath"
echo "copying installer"
cp "$installerPath" "./stageRelease/$releaseFolder/"
echo "copying drivers"
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
echo "Release staged successfully in: stageRelease/$releaseFolder"
else
echo "ERROR: Installer not found at $installerPath"
exit 1
fi
- name: get version for artifact name
id: get_version
shell: bash
working-directory: ${{ vars.OFXEMOTIBIT_DIR }}
run: |
version=$(grep ./src/ofxEmotiBitVersion.h -e "string ofxEmotiBitVersion" | cut -d '"' -f 2)
echo "version=$version" >> $GITHUB_OUTPUT
- name: upload artifact
uses: actions/upload-artifact@v4
with:
name: EmotiBitSoftware_v${{ steps.get_version.outputs.version }}-Windows
path: ${{ vars.OFXEMOTIBIT_DIR }}\\stageRelease\\EmotiBitSoftware-Windows-${{ steps.get_version.outputs.version }}
8 changes: 4 additions & 4 deletions .github/workflows/create-draft-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ jobs:
- name: Download Mac artifacts
uses: dawidd6/action-download-artifact@v6
with:
workflow: upload-build-artifact-mac.yml
branch: master
workflow: build-all-on-macos.yml
branch: dev
name: EmotiBitSoftware_v${{ steps.get_version.outputs.version }}-macOS
path: ./
skip_unpack: true
Expand All @@ -36,8 +36,8 @@ jobs:
- name: Download Windows artifacts
uses: dawidd6/action-download-artifact@v6
with:
workflow: upload-build-artifact-win.yml
branch: master
workflow: build-all-on-win.yaml
branch: dev
name: EmotiBitSoftware_v${{ steps.get_version.outputs.version }}-Windows
path: ./
skip_unpack: true
Expand Down
22 changes: 11 additions & 11 deletions .github/workflows/linux-workflows.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Linux workflows
name: Linux
on: [push]
jobs:
clone-to-OF_ROOT:
clone-linux:
runs-on: [self-hosted, Linux]
environment: RUNNER-LINUX
steps:
Expand All @@ -18,21 +18,21 @@ jobs:
echo "Directory does not already exist"
fi
- name: checkout repository
uses: actions/checkout@v4
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
build-oscilloscope-linux:
needs: clone-linux
uses: ./.github/workflows/reusable-workflow-build-oscilloscope-linux.yml

build-dataparser:
needs: clone-to-OF_ROOT
build-dataparser-linux:
needs: clone-linux
uses: ./.github/workflows/reusable-workflow-build-dataParser-linux.yml

test-oscilloscope:
needs: build-oscilloscope
test-oscilloscope-linux:
needs: build-oscilloscope-linux
uses: ./.github/workflows/reusable-workflow-test-oscilloscope-linux.yml

test-dataParser:
needs: build-dataparser
test-dataparser-linux:
needs: build-dataparser-linux
uses: ./.github/workflows/reusable-workflow-test-dataParser-linux.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: Build DataParser on linux
name: Build DataParser on Linux (reusable)
on:
workflow_call:
jobs:
build-dataparser:
build-dataparser-linux:
runs-on: [self-hosted, Linux]
environment: RUNNER-LINUX
steps:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: Build Oscilloscope on linux
name: Build Oscilloscope on Linux (reusable)
on:
workflow_call:
jobs:
build-oscilloscope:
build-oscilloscope-linux:
runs-on: [self-hosted, Linux]
environment: RUNNER-LINUX
steps:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/reusable-workflow-test-dataParser-linux.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: Test DataParser
name: Test DataParser on Linux (reusable)
on:
workflow_call:
jobs:
test-DataParser:
test-dataparser-linux:
runs-on: [self-hosted, Linux]
environment: RUNNER-LINUX
steps:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: Test Oscilloscope
name: Test Oscilloscope on Linux (reusable)
on:
workflow_call:
jobs:
test-oscilloscope:
test-oscilloscope-linux:
runs-on: [self-hosted, Linux]
environment: RUNNER-LINUX
steps:
Expand Down
Loading
Loading