Skip to content
71 changes: 70 additions & 1 deletion .github/workflows/build-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,25 @@ jobs:
steps:
- uses: actions/checkout@v6
- run: sudo apt update
- run: sudo apt install -y apt-utils build-essential wget qt6-base-dev-tools qt6-declarative-dev qt6-multimedia-dev libqt6charts6-dev libqt6datavisualization6-dev libqt6svg6-dev libopencv-core-dev libopencv-dev libqwt-qt5-6 libqwt-qt5-dev libarmadillo-dev libgl1-mesa-dev libglu1-mesa-dev bear
- run: sudo apt install -y apt-utils build-essential wget qt6-base-dev-tools qt6-declarative-dev qt6-multimedia-dev libqt6charts6-dev libqt6datavisualization6-dev libqt6svg6-dev libopencv-core-dev libopencv-dev libarmadillo-dev libgl1-mesa-dev libglu1-mesa-dev bear imagemagick file libfuse2
- run: wget -O qwt-${{env.QWT_version}}.zip https://sourceforge.net/projects/qwt/files/qwt/${{env.QWT_version}}/qwt-${{env.QWT_version}}.zip/download?use_mirror=pilotfiber
- run: 7z x qwt-${{env.QWT_version}}.zip
- run: cd qwt-${{env.QWT_version}} ; /usr/lib/qt6/bin/qmake
- run: cd qwt-${{env.QWT_version}} ; make -j4
- run: cd qwt-${{env.QWT_version}} ; sudo make install

- name: Put release name into a variable (pull request)
if: ${{ github.event_name == 'pull_request' }}
run: echo "WORKFLOW_VERSION=${{github.event.pull_request.head.sha}}_${{github.event.pull_request.base.sha}}" >> $GITHUB_ENV
- name: Put release name into a variable (tag)
if: ${{ startsWith(github.event.ref, 'refs/tags/v') }}
run: echo "WORKFLOW_VERSION=${{github.ref_name}}" >> $GITHUB_ENV
- name: Put release name into a variable (single commit)
if: ${{ !startsWith(github.event.ref, 'refs/tags/v') && github.event_name != 'pull_request' }}
run: echo "WORKFLOW_VERSION=${{github.sha}}" >> $GITHUB_ENV
- name: Find and Replace MY_AUTOMATED_VERSION_STRING
run: sed -i "s/MY_AUTOMATED_VERSION_STRING/${{env.WORKFLOW_VERSION}}/" DFTFringe.pro

- run: /usr/lib/qt6/bin/qmake DFTFringe.pro
- uses: ammaraskar/gcc-problem-matcher@master
- run: echo "::add-matcher::.github/matcher/uic_matcher.json"
Expand All @@ -50,3 +63,59 @@ jobs:
tidy-review: true
passive-reviews: true
ignore: 'bezier|boost|SingleApplication|spdlog|zernike|cnpy|moc_*|ui_*|qwt*'

- name: Assemble AppDir
if: matrix.os == 'ubuntu-22.04'
run: |
mkdir -p AppDir/usr/bin
cp DFTFringe AppDir/usr/bin/
# Runtime data is resolved relative to applicationDirPath(), so it
# must sit next to the binary (see colormapviewerdlg.cpp, mainwindow.cpp)
cp -r ColorMaps AppDir/usr/bin/
mkdir -p AppDir/usr/bin/res
cp -r res/Help AppDir/usr/bin/res/
cp RevisionHistory.html AppDir/usr/bin/
# Icon: reuse the Windows .ico, keep the largest frame
convert res/surface_LeY_icon.ico ico_frame.png
cp "$(ls -S ico_frame*.png | head -n 1)" dftfringe.png
# Desktop entry (required by appimagetool)
cat > dftfringe.desktop << 'EOF'
[Desktop Entry]
Type=Application
Name=DFTFringe
Comment=Interferometry analysis for telescope mirror makers
Exec=DFTFringe
Icon=dftfringe
Categories=Science;Education;
Terminal=false
EOF
- name: Fetch linuxdeploy
if: matrix.os == 'ubuntu-22.04'
run: |
wget -q https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage
wget -q https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/continuous/linuxdeploy-plugin-qt-x86_64.AppImage
chmod +x linuxdeploy-*.AppImage
- name: Build AppImage
if: matrix.os == 'ubuntu-22.04'
env:
QMAKE: /usr/lib/qt6/bin/qmake
VERSION: ${{ env.WORKFLOW_VERSION }}
run: |
./linuxdeploy-x86_64.AppImage --appdir AppDir \
--desktop-file dftfringe.desktop \
--icon-file dftfringe.png \
--plugin qt \
--output appimage
- name: Smoke test AppImage
if: matrix.os == 'ubuntu-22.04'
run: |
./DFTFringe-*.AppImage --appimage-extract > /dev/null
ldd squashfs-root/usr/bin/DFTFringe | grep -v "not found"
! ldd squashfs-root/usr/bin/DFTFringe | grep "not found"
- name: Upload AppImage
if: matrix.os == 'ubuntu-22.04'
uses: actions/upload-artifact@v7
with:
name: DFTFringe-linux-appimage
path: DFTFringe-*.AppImage
if-no-files-found: error
10 changes: 7 additions & 3 deletions .github/workflows/make-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
call-build-windows:
needs: check-semver
uses: ./.github/workflows/build-windows.yml
# linux build is mainly here to check it builds. We have no acrtifact now.
# produces the AppImage published below
call-build-linux:
permissions:
contents: read
Expand All @@ -40,12 +40,15 @@ jobs:

download-and-publish-artifacts:
runs-on: ubuntu-latest
needs: call-build-windows
needs: [call-build-windows, call-build-linux]
steps:
# get artifact uploaded from build workflow
# get artifacts uploaded from the build workflows
- uses: actions/download-artifact@v8
with:
name: DFTFringe-windows-build-artifact
- uses: actions/download-artifact@v8
with:
name: DFTFringe-linux-appimage
# create the GitHub release and upload the artifacts
- name: publish Release
uses: softprops/action-gh-release@v3
Expand All @@ -61,3 +64,4 @@ jobs:
files: |
DFTFringeInstaller_${{github.ref_name}}.exe
Z_DFTFringe.exe.debug
DFTFringe-${{github.ref_name}}-x86_64.AppImage
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,17 @@ Additional information and help is availlable at https://groups.io/g/Interferome
:point_right: Follow the link and use the installer:
[link to latest release](https://github.com/githubdoe/dftfringe/releases/latest).

# How to install DFTFringe on Linux

:point_right: Download `DFTFringe-<version>-x86_64.AppImage` from the
[latest release](https://github.com/githubdoe/dftfringe/releases/latest), make it
executable and run it:

```
chmod +x DFTFringe-*-x86_64.AppImage
./DFTFringe-*-x86_64.AppImage
```

# How to build DFTFringe on Linux


Expand Down
Loading