-
Notifications
You must be signed in to change notification settings - Fork 66
Provide raw Linux and AppImage builds as part of CI #365
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
base: master
Are you sure you want to change the base?
Changes from all commits
43b6a82
b9a8296
d320420
fef412d
4f1d7cf
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -23,12 +23,30 @@ 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 | ||
| # imagemagick/file/libfuse2 are only needed for the AppImage steps but are | ||
| # cheap to install everywhere. libqwt-qt5-* dropped: Qwt is built from | ||
| # source below and the distro Qt5 flavor was never linked against. | ||
| - 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 | ||
|
|
||
| # ---- version string, mirrors build-windows.yml ---- | ||
| - 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 | ||
|
|
||
| # ---- build ---- | ||
| - run: /usr/lib/qt6/bin/qmake DFTFringe.pro | ||
| - uses: ammaraskar/gcc-problem-matcher@master | ||
| - run: echo "::add-matcher::.github/matcher/uic_matcher.json" | ||
|
|
@@ -50,3 +68,74 @@ jobs: | |
| tidy-review: true | ||
| passive-reviews: true | ||
| ignore: 'bezier|boost|SingleApplication|spdlog|zernike|cnpy|moc_*|ui_*|qwt*' | ||
|
|
||
| # ---- bare build artifact, one per matrix OS ---- | ||
| # tar first: upload-artifact zips files and would strip the executable bit. | ||
| # Note: the bare binary expects Qwt in /usr/local/qwt-6.3.0 (rpath) and the | ||
| # distro Qt6/OpenCV/Armadillo packages on the target machine. | ||
| - name: Pack bare build | ||
| run: tar -czf DFTFringe-bare-${{ matrix.os }}.tar.gz DFTFringe | ||
| - name: Upload bare build | ||
| uses: actions/upload-artifact@v7 | ||
| with: | ||
| name: DFTFringe-bare-${{ matrix.os }} | ||
| path: DFTFringe-bare-${{ matrix.os }}.tar.gz | ||
| if-no-files-found: error | ||
|
Comment on lines
+76
to
+83
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's unclear to me, why do we upload the bare build ? I though we require mainly the appImage for end user
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I should have explained it better as part of the initial PR. Some linux users (me included) prefer bare builds, but with your comment I'm starting to think that kind of user can just compile themselves. Let's focus on AppImages
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. From my understanding this is too OS-specific to distribute. I agree those people can build easily themselfs. |
||
|
|
||
| # ---- AppImage: only from the oldest matrix OS (lowest glibc baseline) ---- | ||
| - 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 # make the qt plugin pick Qt6, not Qt5 | ||
| VERSION: ${{ env.WORKFLOW_VERSION }} # used for the output filename | ||
| 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 | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thank you for this change comment. Should probably be removed in source