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

[pull] main from OpenHantek:main #99

Open
wants to merge 33 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
59d7aa3
Initial support for Instrustar 205A/B
wakass Oct 14, 2023
81eb42d
Instrustar 205B: Update samplerate table
wakass Oct 14, 2023
5c44615
test for macos-12 build
Ho-Ro Dec 15, 2023
795b78f
Build MINGW and MSVC Windows packages
Ho-Ro Dec 17, 2023
d9a62fe
Add Qt binaries to MSVC package
Ho-Ro Dec 17, 2023
814886e
add version to MSVC package
Ho-Ro Dec 17, 2023
49e0efe
remove dirty tag from MSVC
Ho-Ro Dec 17, 2023
d00e32d
update build system, same setup for debian, macos, mingw, msvc
Ho-Ro Dec 18, 2023
e4767dc
doc update; tool update; clean up
Ho-Ro Dec 18, 2023
c4c79ee
README typo fix; fix binary names
Ho-Ro Dec 19, 2023
c786a8f
minor packaging update
Ho-Ro Dec 23, 2023
1c3a681
tool update
Ho-Ro Dec 23, 2023
b5e1aee
fix #390
Ho-Ro Dec 28, 2023
73de8e3
replace outdated CHANGELOG; small reformatting of MDSO model
Ho-Ro Dec 29, 2023
f986d63
prepare next release 3.4
Ho-Ro Dec 31, 2023
98959ab
prepare next release 3.4
Ho-Ro Dec 31, 2023
3b12af2
prepare next release 3.4
Ho-Ro Dec 31, 2023
7f9eb94
build system update
Ho-Ro Jan 1, 2024
e6d863d
next build system update
Ho-Ro Jan 1, 2024
1b56a17
use static fftw, usb and z libs
Ho-Ro Jan 8, 2024
211e9c8
doc update, add windows driver license info
Ho-Ro Feb 4, 2024
0e2c641
Updated calibration values after measurement.
wakass Feb 5, 2024
b8fb40b
Instrustar 205X support (PR #394)
Ho-Ro Feb 19, 2024
5531981
small fw update - functional change
Ho-Ro Feb 23, 2024
ad43d3b
Merge branch 'wakass-main' - Instrustar 205X support #394
Ho-Ro Feb 23, 2024
3ac5c3a
fw refactoring - no functional change
Ho-Ro Feb 24, 2024
9c1e9e8
fix #399 - update macos build instructions, hack nedded no more
Ho-Ro Mar 5, 2024
29dbcca
README update
Ho-Ro Mar 12, 2024
b9d6560
README update, add solution Crostini graphics issue; build info update
Ho-Ro Mar 15, 2024
a207f5f
Fix voltageScale to correct indices
wakass Mar 24, 2024
09d0e28
Merge branch 'isds205b/channelCalFix' of https://github.com/wakass/Op…
Ho-Ro Mar 24, 2024
d0f44f8
Fix voltageScale to correct indices for ISDS205b
Ho-Ro Mar 24, 2024
ffd1691
README: add hint for possible graphics issue solution for win systems
Ho-Ro Mar 24, 2024
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
327 changes: 327 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,327 @@
#
# build.yml - GitHub build action for OpenHantek6022
# Copyright (C) 2023- OpenHantek community
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#


name: Build
# check if OH6022 builds on some recent operating systems
# deploy Ubuntu / macOS / Windows binaries

on: [push]


env:
# CMake build type (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release


jobs:

# ----------------------------
# --- Linux (Ubuntu) steps ---
# ----------------------------
#
linux-x86_64:
runs-on: ubuntu-22.04
steps:

# --- Clone the latest commit ---
- name: Checkout
uses: actions/checkout@v3
with:
fetch-tags: true
submodules: recursive
fetch-depth: 0

# --- Config git and get the version from "git describe" ---
- name: Config Git
id: config_git
shell: bash
run: |
git config user.email "Ho-Ro@users.noreply.github.com"
git config user.name "Ho-Ro"
git fetch --prune --unshallow --tags || true
git submodule update --init --recursive
echo "git_describe=$(git describe)"
echo "git_describe=$(git describe)" >> $GITHUB_OUTPUT

- name: Install Ubuntu Build Requirements
run: |
mkdir build
sudo apt update
# sudo apt -y upgrade
sudo apt install g++ make cmake fakeroot rpm qttools5-dev libfftw3-dev binutils-dev \
libusb-1.0-0-dev libqt5opengl5-dev mesa-common-dev libgl1-mesa-dev libgles2-mesa-dev

- name: Ubuntu Build
# GitHub hosts Linux runners on Standard_DS2_v2 virtual machines in Microsoft Azure:
# 2-core CPU, 7 GB of RAM memory, 14 GB of SSD disk space
working-directory: ${{github.workspace}}/build
run: |
cp ../CHANGELOG changelog
cmake .. -DCMAKE_BUILD_TYPE=$BUILD_TYPE
make -j8
fakeroot make -j8 package
ls -l packages

- name: Upload Ubuntu Artifacts
# *.deb *.rpm *.tgz
uses: actions/upload-artifact@v3
with:
name: openhantek_${{ steps.config_git.outputs.git_describe }}_linux_amd64
path: ${{github.workspace}}/build/packages/*

- name: Upload Linux Release Assets
if: startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v1
with:
prerelease: true
files: ./build/packages/*
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}


# -------------------
# --- macOS steps ---
# -------------------
#
macos-x86_64:
runs-on: macos-12
steps:

# --- Clone the latest commit ---
- name: Checkout
uses: actions/checkout@v3
with:
fetch-tags: true
submodules: recursive
fetch-depth: 0

# --- Config git and get the version from "git describe" ---
- name: Config Git
id: config_git
shell: bash
run: |
git config user.email "Ho-Ro@users.noreply.github.com"
git config user.name "Ho-Ro"
git fetch --prune --unshallow --tags || true
git submodule update --init --recursive
echo "git_describe=$(git describe)"
echo "git_describe=$(git describe)" >> $GITHUB_OUTPUT

- name: Install macOS Build Requirements
run: |
mkdir build
#brew update
brew install qt5 fftw binutils create-dmg || true
#ls -lR /usr/local/opt/gcc/lib/gcc
# the next two commands (hack from @warpme) fix #314
#mkdir -p /usr/local/opt/qt5/lib/libgcc_s.1.1.dylib.framework
#ln -sf /usr/local/opt/gcc/lib/gcc/11/libgcc_s.1.1.dylib \
# /usr/local/opt/qt5/lib/libgcc_s.1.1.dylib.framework/libgcc_s.1.1.dylib
#ls -lR /usr/local/opt/qt5/lib/libgcc_s.1.1.dylib.framework

- name: macOS Build
# GitHub hosts macOS runners in GitHub's own macOS Cloud:
# 3-core CPU, 14 GB of RAM memory, 14 GB of SSD disk space
working-directory: ${{github.workspace}}/build
run: |
cp ../CHANGELOG changelog
cmake .. -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_PREFIX_PATH=$(brew --prefix qt5)
make -j12
sudo make -j12 package
if test -d openhantek/OpenHantek.app; then
export PATH=$(brew --prefix qt5)/bin:${PATH}
cd openhantek
macdeployqt OpenHantek.app -always-overwrite -verbose=1
python ../../utils/macdeployqtfix/macdeployqtfix.py \
--quiet OpenHantek.app/Contents/MacOS/OpenHantek $(brew --prefix qt5)
create-dmg --volname OpenHantek --volicon ../../openhantek/res/images/OpenHantek.icns \
--window-pos 200 120 --window-size 800 400 --icon-size 100 --icon "OpenHantek.app" 200 190 \
--skip-jenkins --hide-extension "OpenHantek.app" --app-drop-link 600 185 \
--eula ../../LICENSE OpenHantek.dmg OpenHantek.app
cd ..
else
true
fi
if test -d openhantek/OpenHantek.app; then
cd openhantek ; sudo tar -czf ../packages/openhantek_*_osx_*.tar.gz OpenHantek.app
if test -f OpenHantek.dmg; then
sudo mv OpenHantek.dmg ../packages/$(basename ../packages/openhantek_*_osx_*.tar.gz .tar.gz).dmg
fi
cd ..
ls -l packages
else
true
fi

- name: Upload macOS Artifacts
uses: actions/upload-artifact@v3
with:
name: openhantek_${{ steps.config_git.outputs.git_describe }}_osx_x86_64
path: ${{github.workspace}}/build/packages/*

- name: Upload macOS Release Assets
if: startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v1
with:
prerelease: true
files: ./build/packages/*
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}


# ---------------------------
# --- Windows MINGW steps ---
# ---------------------------
#
windows-mingw_w64:
runs-on: windows-2022
steps:

# --- Clone the latest commit ---
- name: Checkout
uses: actions/checkout@v3
with:
fetch-tags: true
submodules: recursive
fetch-depth: 0

# --- Config git and get the version from "git describe" ---
- name: Config Git
id: config_git
shell: bash
run: |
git config user.email "Ho-Ro@users.noreply.github.com"
git config user.name "Ho-Ro"
git fetch --prune --unshallow --tags || true
git submodule update --init --recursive
echo "git_describe=$(git describe)"
echo "git_describe=$(git describe)" >> $GITHUB_OUTPUT

- name: Install MSYS2 Packages
uses: msys2/setup-msys2@v2
with:
update: true
install: >-
mingw-w64-x86_64-cmake
mingw-w64-x86_64-gcc
mingw-w64-x86_64-qt5-static
mingw-w64-x86_64-fftw
mingw-w64-x86_64-libusb

- name: Start Windows Build
shell: msys2 {0}
run: |
cmake -D CMAKE_PREFIX_PATH=/mingw64/qt5-static -D CMAKE_BUILD_TYPE=$BUILD_TYPE -B build
cmake --build build --parallel 8 --target package

- name: Create Windows Package
# GitHub hosts Windows runners on Standard_DS2_v2 virtual machines in Microsoft Azure:
# 2-core CPU, 7 GB of RAM memory, 14 GB of SSD disk space
working-directory: ${{github.workspace}}/build
shell: bash
run: |
# this ZIP package contains only OpenHantek.exe, just get the name
ZIP=$(basename packages/openhantek_*_mingw_x64.zip)
rm -f packages/openhantek_*_mingw_x64.*
cd openhantek
7z a ../packages/$ZIP *.exe driver documents
ls -l ../packages

- name: Upload Windows Artifacts
uses: actions/upload-artifact@v3
with:
name: openhantek_${{ steps.config_git.outputs.git_describe }}_mingw_x64
path: ./build/packages/*.zip

- name: Upload Windows Release Assets
if: startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v1
with:
prerelease: true
files: ./build/packages/*
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}


# --------------------------
# --- Windows MSVC steps ---
# --------------------------
#
windows-msvc_x64:
runs-on: windows-2022
steps:

# --- Clone the latest commit ---
- name: Checkout
uses: actions/checkout@v3
with:
fetch-tags: true
submodules: recursive
fetch-depth: 0

# --- Config git and get the version from "git describe" ---
- name: Config Git
id: config_git
shell: bash
run: |
git config user.email "Ho-Ro@users.noreply.github.com"
git config user.name "Ho-Ro"
git fetch --prune --unshallow --tags || true
git submodule update --init --recursive
echo "git_describe=$(git describe)"
echo "git_describe=$(git describe)" >> $GITHUB_OUTPUT

- name: Install Qt for Windows
uses: jurplel/install-qt-action@v3

- name: Setup Windows MSVC Build
run:
md build &
call "%VCINSTALLDIR%/Auxiliary/Build/vcvars64.bat" &
cmake -G "Visual Studio 17 2022" -A x64 -DCMAKE_PREFIX_PATH=%Qt5_DIR% -DCMAKE_BUILD_TYPE=Release -Bbuild

- name: Windows MSVC Build
# GitHub hosts Windows runners on Standard_DS2_v2 virtual machines in Microsoft Azure:
# 2-core CPU, 7 GB of RAM memory, 14 GB of SSD disk space
working-directory: ${{github.workspace}}/build
shell: bash
run: |
cmake --build . --parallel 8 --config Release --target package
ZIP=$(basename packages/openhantek_*_msvc_x64.zip)
rm -f packages/openhantek_*_msvc_x64.*
cd openhantek/Release
7z a ../../packages/$ZIP *
cd ../..
ls -l packages

- name: Upload Windows MSVC Artifacts
uses: actions/upload-artifact@v3
with:
name: openhantek_${{ steps.config_git.outputs.git_describe }}_msvc_x64
path: ./build/packages/*.zip

- name: Upload Windows MSVC Release Assets
if: startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v1
with:
prerelease: true
files: ./build/packages/*
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Loading