Release 0.9.8.3 #38
Workflow file for this run
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
name: Packaging | |
on: | |
push: | |
tags: | |
- "*" | |
jobs: | |
Source: | |
name: Source | |
runs-on: ubuntu-24.04 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Get Version | |
id: version | |
run: | | |
VERSION=$(git describe --tags) | |
echo $VERSION | |
echo "version=$VERSION" >> $GITHUB_OUTPUT | |
- name: Archive source files | |
run: | | |
pip3 install --break-system-packages git-archive-all | |
git-archive-all Makhber-${{ steps.version.outputs.version }}-src.zip | |
git-archive-all Makhber-${{ steps.version.outputs.version }}-src.tar.xz | |
- name: Upload source files | |
uses: softprops/action-gh-release@v2 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
name: Makhber ${{ steps.version.outputs.version }} | |
draft: true | |
files: | | |
Makhber*.zip | |
Makhber*.tar.xz | |
Windows: | |
name: Windows | |
runs-on: windows-2022 | |
env: | |
VCPKG_BINARY_SOURCES: "clear;nuget,GitHub,readwrite" | |
VCPKG_DEFAULT_TRIPLET: x64-windows | |
QT_VER: 5.15.2 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Setup NuGet Credentials | |
run: | | |
& $(vcpkg fetch nuget | select -last 1) sources add ` | |
-source "https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json" ` | |
-name "GitHub" ` | |
-username ${{ github.repository_owner }} ` | |
-password "${{ secrets.GITHUB_TOKEN }}" | |
- name: vcpkg package restore | |
run: | | |
cd $Env:VCPKG_INSTALLATION_ROOT | |
git pull origin master | |
Add-Content $Env:VCPKG_INSTALLATION_ROOT\triplets\$Env:VCPKG_DEFAULT_TRIPLET.cmake "set(VCPKG_BUILD_TYPE release)" | |
vcpkg install qt5-svg qt5-tools qt5-translations zlib gsl muparser liborigin opengl gl2ps openssl pkgconf | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.13' | |
- name: Install Python packages | |
run: | | |
pip3 install pyqt5 sip pyqt-builder numpy | |
- name: Configuring | |
run: | | |
mkdir build; cd build | |
cmake .. ` | |
-DCMAKE_BUILD_TYPE=Release ` | |
-DCMAKE_SYSTEM_VERSION="10.0" ` | |
-DPython3_ROOT_DIR=${{ env.pythonLocation }} ` | |
-DMAKHBER_SCRIPTING_PYTHON=ON ` | |
-DBUILD_SHARED_LIBS=ON ` | |
-DVCPKG_TARGET_TRIPLET="$Env:VCPKG_DEFAULT_TRIPLET" ` | |
-DCMAKE_TOOLCHAIN_FILE="$Env:VCPKG_INSTALLATION_ROOT\scripts\buildsystems\vcpkg.cmake" ` | |
-DRUNTIME_DIRS="$Env:VCPKG_INSTALLATION_ROOT\installed\$Env:VCPKG_DEFAULT_TRIPLET\bin" | |
- name: Building | |
run: | | |
cmake --build build --config Release -- -maxCpuCount | |
- name: Packaging | |
run: | | |
$Env:PATH = "C:/vcpkg/installed/$Env:VCPKG_DEFAULT_TRIPLET/tools/qt5/bin;$Env:PATH" | |
cd build | |
cpack -G NSIS | |
- name: Upload Windows installers | |
uses: softprops/action-gh-release@v2 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
draft: true | |
files: | | |
build/Makhber*.exe | |
macos: | |
runs-on: macos-13 | |
name: macos | |
env: | |
HOMEBREW_NO_AUTO_UPDATE: 1 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Install prerequisties | |
run: | | |
brew list -1 | grep python | while read formula; do brew unlink $formula; brew link --overwrite $formula; done | |
brew update | |
brew install --display-times muparser liborigin gsl gl2ps qt@5 | |
- name: Configuring | |
run: | | |
export PATH=/usr/local/opt/qt@5/bin:$PATH | |
mkdir build && cd build | |
cmake .. \ | |
-DCMAKE_BUILD_TYPE=Release | |
- name: Building | |
run: | | |
make -j$(sysctl -n hw.logicalcpu) -C build | |
- name: Packaging | |
continue-on-error: true | |
run: | | |
cd build | |
cpack -G DragNDrop | |
mv *.dmg Makhber-$(git describe --tags)-macos-$(uname -m).dmg | |
- name: Upload MacOS package | |
uses: softprops/action-gh-release@v2 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
draft: true | |
files: build/Makhber*.dmg | |
Snap: | |
runs-on: ubuntu-22.04 | |
name: Snap | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Install snapcraft | |
run: | | |
sudo snap install snapcraft --classic | |
- name: Building & Packaging | |
id: snap_build | |
run: | | |
sudo snapcraft --debug --destructive-mode | |
echo "snap=$(echo $(ls *.snap))" >> $GITHUB_OUTPUT | |
- name: Upload Snap | |
uses: softprops/action-gh-release@v2 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
draft: true | |
files: ${{ steps.snap_build.outputs.snap }} | |
- name: Installing | |
run: | | |
sudo snap install --dangerous *.snap | |
- name: Show contents | |
run: | | |
tree /snap/makhber/current/usr | |
Flatpak: | |
runs-on: ubuntu-20.04 | |
name: Flatpak | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Install prerequisties | |
run: | | |
sudo add-apt-repository -y ppa:alexlarsson/flatpak | |
sudo apt update | |
sudo apt install -y --no-install-recommends \ | |
flatpak-builder \ | |
elfutils | |
flatpak remote-add --user --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo | |
flatpak install --user -y org.kde.Platform//5.15-23.08 org.kde.Sdk//5.15-23.08 | |
- name: Building | |
run: | | |
mkdir build | |
cd build | |
flatpak-builder \ | |
--repo=repo \ | |
--install-deps-from=flathub \ | |
--user \ | |
--force-clean \ | |
./build \ | |
../packaging/flatpak/com.github.makhber.Makhber.yaml | |
- name: Packaging | |
run: | | |
cd build | |
flatpak \ | |
build-bundle \ | |
--runtime-repo=https://dl.flathub.org/repo/flathub.flatpakrepo \ | |
repo \ | |
Makhber-$(git describe --tags)-x86_64.flatpak \ | |
com.github.makhber.Makhber | |
- name: Upload Flatpak | |
uses: softprops/action-gh-release@v2 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
draft: true | |
files: build/Makhber*.flatpak | |
- name: Installing | |
run: | | |
flatpak install --user -y build/*.flatpak | |
- name: Show contents | |
run: | | |
tree $HOME/.local/share/flatpak/app/com.github.makhber.Makhber/x86_64/master/active/files | |
AppImage: | |
runs-on: ubuntu-20.04 | |
name: AppImage | |
env: | |
VCPKG_BINARY_SOURCES: "clear;nuget,GitHub,readwrite" | |
VCPKG_DEFAULT_TRIPLET: x64-linux | |
QT_VER: 5.15.2 | |
PYTHON_VERSION: "3.12" | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Restore cached Qt | |
id: cache-qt | |
uses: actions/cache@v4 | |
with: | |
path: ${{ github.workspace }}/Qt | |
key: ${{ runner.os }}-Qt-${{ env.QT_VER }}-Cache | |
- name: Install Qt | |
uses: jurplel/install-qt-action@v3 | |
with: | |
setup-python: false | |
version: ${{ env.QT_VER }} | |
cache: ${{ steps.cache-qt.outputs.cache-hit }} | |
dir: ${{ github.workspace }}/Qt | |
archives: qtbase qtsvg qttools qttranslations | |
# Python version used to build makhber must be the same for miniconda | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '${{ env.PYTHON_VERSION }}' | |
- name: Install prerequisties | |
run: | | |
sudo apt remove -y libgsl23 libgslcblas0 | |
sudo apt install -y --no-install-recommends \ | |
libglu1-mesa-dev \ | |
libgl2ps-dev \ | |
xvfb \ | |
wget | |
pip3 install pyqt5 sip pyqt-builder | |
- name: Setup NuGet Credentials | |
run: | | |
mono `vcpkg fetch nuget | tail -n 1` sources add \ | |
-source "https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json" \ | |
-storepasswordincleartext \ | |
-name "GitHub" \ | |
-username ${{ github.repository_owner }} \ | |
-password "${{ secrets.GITHUB_TOKEN }}" | |
- name: vcpkg package restore | |
run: | | |
echo "set(VCPKG_BUILD_TYPE release)" >> $VCPKG_INSTALLATION_ROOT/triplets/$VCPKG_DEFAULT_TRIPLET.cmake | |
vcpkg install gsl muparser liborigin | |
- name: Configuring | |
run: | | |
mkdir build && cd build | |
cmake .. \ | |
-DMAKHBER_SCRIPTING_PYTHON=ON \ | |
-DCMAKE_INSTALL_PREFIX=/usr \ | |
-DCMAKE_BUILD_TYPE=Release \ | |
-DBUILD_SHARED_LIBS=ON \ | |
-DOpenGL_GL_PREFERENCE=LEGACY \ | |
-DVCPKG_TARGET_TRIPLET="$VCPKG_DEFAULT_TRIPLET" \ | |
-DCMAKE_TOOLCHAIN_FILE=$VCPKG_INSTALLATION_ROOT/scripts/buildsystems/vcpkg.cmake | |
- name: Building | |
run: | | |
xvfb-run make -j$(nproc) -C build | |
- name: Packaging | |
run: | | |
cd build | |
make install DESTDIR=AppDir | |
export LD_LIBRARY_PATH=$PWD/bin:$LD_LIBRARY_PATH | |
wget https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage | |
wget https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/continuous/linuxdeploy-plugin-qt-x86_64.AppImage | |
wget https://raw.githubusercontent.com/linuxdeploy/linuxdeploy-plugin-conda/master/linuxdeploy-plugin-conda.sh | |
chmod +x linuxdeploy* | |
export VERSION=$(git describe --tags) | |
export PIP_REQUIREMENTS="pyqt5 pyqt5-sip --no-deps" | |
export CONDA_PYTHON_VERSION=${{ env.PYTHON_VERSION }} | |
./linuxdeploy-x86_64.AppImage \ | |
--appdir ./AppDir \ | |
--plugin qt \ | |
--plugin conda \ | |
--output appimage \ | |
--custom-apprun=../packaging/appimage/AppRun | |
- name: Upload AppImage | |
uses: softprops/action-gh-release@v2 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
draft: true | |
files: build/Makhber*.AppImage | |
DEB: | |
name: Ubuntu 22.04 DEB | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Install prerequisties | |
run: | | |
sudo apt update | |
sudo apt install -y --no-install-recommends \ | |
pkgconf \ | |
qtbase5-dev \ | |
libqt5svg5-dev \ | |
libqt5opengl5-dev \ | |
qttools5-dev \ | |
libgsl-dev \ | |
libmuparser-dev \ | |
libgl2ps-dev \ | |
pyqt5-dev \ | |
python3-pyqt5 \ | |
python3-pyqtbuild \ | |
sip-tools \ | |
ninja-build | |
- name: Configuring | |
run: | | |
mkdir build && cd build | |
cmake .. \ | |
-GNinja \ | |
-DCMAKE_BUILD_TYPE=Release \ | |
-DMAKHBER_SCRIPTING_PYTHON=ON \ | |
-DBUILD_SHARED_LIBS=ON | |
- name: Building | |
run: | | |
ninja -C build | |
- name: Packaging | |
run: | | |
cd build | |
cpack -G DEB | |
mv Makhber*.deb Makhber_$(git describe --tags)~22.04_amd64.deb | |
- name: Upload Debian package | |
uses: softprops/action-gh-release@v2 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
draft: true | |
files: build/Makhber*.deb | |
RPM: | |
name: OpenSUSE leap | |
runs-on: ubuntu-24.04 | |
container: opensuse/leap | |
steps: | |
- uses: actions/checkout@v1 | |
with: | |
submodules: true | |
- name: Install prerequisties | |
run: | | |
zypper -n install \ | |
gcc-c++ \ | |
cmake \ | |
ninja \ | |
libqt5-qtbase-devel \ | |
libqt5-qtsvg-devel \ | |
libqt5-linguist-devel \ | |
gsl-devel \ | |
muparser-devel \ | |
liborigin-devel \ | |
gl2ps-devel \ | |
zlib-devel \ | |
python3-qt5-devel \ | |
python3-pyqt-builder \ | |
glu-devel \ | |
python3 \ | |
xvfb-run \ | |
rpm-build \ | |
git | |
- name: Configuring | |
run: | | |
mkdir build && cd build | |
cmake .. \ | |
-GNinja \ | |
-DCMAKE_BUILD_TYPE=Release \ | |
-DBUILD_SHARED_LIBS=ON \ | |
-DMAKHBER_SCRIPTING_PYTHON=ON | |
- name: Building | |
run: | | |
ninja -C build | |
- name: Packaging | |
run: | | |
git config --global --add safe.directory /__w/makhber/makhber | |
cd build | |
cpack -G RPM | |
mv Makhber*.rpm makhber-$(git describe --tags).x86_64.rpm | |
- name: Upload RPM package | |
uses: softprops/action-gh-release@v2 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
draft: true | |
files: build/makhber*.rpm |