Skip to content

Commit

Permalink
updated workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
ctlcltd committed May 9, 2024
1 parent 9860b88 commit 630ee81
Show file tree
Hide file tree
Showing 9 changed files with 62 additions and 41 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: test-cli-linux-appimage
name: build-cli-linux-appimage

on:
workflow_dispatch:
Expand All @@ -21,7 +21,7 @@ jobs:
run: |
sudo apt-get install cmake ninja-build
- name: Download tools
- name: Download deploy tools
run: |
sudo apt-get install fuse wget
wget https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage
Expand All @@ -45,7 +45,7 @@ jobs:
working-directory: ${{github.workspace}}/e2-sat-editor/src/cli
run: cmake --build build --config ${{ env.BUILD_TYPE }}

- name: Deploy
- name: Deploy artifact
working-directory: ${{github.workspace}}/e2-sat-editor/src/cli
continue-on-error: true
run: |
Expand All @@ -57,15 +57,14 @@ jobs:
mkdir -p AppDir/usr/share/icons/hicolor/64x64/apps
cp ../../dist/xdg/icons/64x64/e2-sat-editor.png AppDir/usr/share/icons/hicolor/64x64/apps/e2se-cli.png
mkdir -p AppDir/usr/share/doc/e2se-cli
mv AppDir/usr/share/e2se-cli/Readme.txt AppDir/usr/share/doc/e2se-cli/README
mv AppDir/usr/share/e2se-cli/License.txt AppDir/usr/share/doc/e2se-cli/LICENSE
mv AppDir/usr/share/e2se-cli/Readme.txt AppDir/usr/share/doc/e2se-cli/readme
mv AppDir/usr/share/e2se-cli/License.txt AppDir/usr/share/doc/e2se-cli/copyright
# run linuxdeploy
linuxdeploy --appdir AppDir --output appimage
# package
mv e2se-cli-x86_64.AppImage ../../artifact
chmod +x ../../artifact
- name: Upload Artifact
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
path: ${{github.workspace}}/e2-sat-editor/artifact
9 changes: 6 additions & 3 deletions .github/workflows/build-macos-intel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:
path: user-manual
run-id: ${{ needs.user-manual.outputs.run-id }}

- name: Deploy
- name: Deploy artifact
working-directory: ${{github.workspace}}/e2-sat-editor/src
continue-on-error: true
run: |
Expand All @@ -83,7 +83,10 @@ jobs:
mv AppDir/usr/local/e2se-cli ../artifact/cli/
mv "${{github.workspace}}/user-manual" ../artifact/
- name: Upload Artifact
- name: Tar artifact
run: tar -cvf artifact.tar ${{github.workspace}}/e2-sat-editor/artifact

- name: Upload artifact
uses: actions/upload-artifact@v4
with:
path: ${{github.workspace}}/e2-sat-editor/artifact
path: artifact.tar
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: test-macos-silicon
name: build-macos-silicon

on:
workflow_dispatch:
Expand Down Expand Up @@ -57,7 +57,7 @@ jobs:
path: user-manual
run-id: ${{ needs.user-manual.outputs.run-id }}

- name: Deploy
- name: Deploy artifact
working-directory: ${{github.workspace}}/e2-sat-editor/src
continue-on-error: true
run: |
Expand All @@ -83,7 +83,10 @@ jobs:
mv AppDir/usr/local/e2se-cli ../artifact/cli/
mv "${{github.workspace}}/user-manual" ../artifact/
- name: Upload Artifact
- name: Tar artifact
run: tar -cvf artifact.tar ${{github.workspace}}/e2-sat-editor/artifact

- name: Upload artifact
uses: actions/upload-artifact@v4
with:
path: ${{github.workspace}}/e2-sat-editor/artifact
path: artifact.tar
4 changes: 2 additions & 2 deletions .github/workflows/build-win32.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:
path: user-manual
run-id: ${{ needs.user-manual.outputs.run-id }}

- name: Deploy
- name: Deploy artifact
working-directory: ${{github.workspace}}/e2-sat-editor/src
continue-on-error: true
shell: msys2 {0}
Expand Down Expand Up @@ -91,7 +91,7 @@ jobs:
cp ../artifact/{libgcc_s_dw2-1,libstdc++-6,libwinpthread-1}.dll ../artifact/cli/
mv "${{github.workspace}}/user-manual" ../artifact/
- name: Upload Artifact
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
path: ${{github.workspace}}/e2-sat-editor/artifact
4 changes: 2 additions & 2 deletions .github/workflows/build-win64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
path: user-manual
run-id: ${{ needs.user-manual.outputs.run-id }}

- name: Deploy
- name: Deploy artifact
working-directory: ${{github.workspace}}/e2-sat-editor/src
continue-on-error: true
shell: msys2 {0}
Expand Down Expand Up @@ -87,7 +87,7 @@ jobs:
cp ../artifact/{libgcc_s_seh-1,libstdc++-6,libwinpthread-1}.dll ../artifact/cli/
mv "${{github.workspace}}/user-manual" ../artifact/
- name: Upload Artifact
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
path: ${{github.workspace}}/e2-sat-editor/artifact
42 changes: 29 additions & 13 deletions .github/workflows/test-linux-appimage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,11 @@ jobs:

- name: Setup Aptitude
run: |
sudo apt-get install curl libcurl4-openssl-dev
sudo apt-get install qt6-base-dev qt6-translations-l10n
sudo apt-get install libgl1-mesa-dev libglvnd-dev libxcb-xkb-dev libxkbcommon-x11-dev libvulkan-dev
sudo apt-get install cmake ninja-build
sudo apt-get install libgl1-mesa-dev libglvnd-dev libxcb-xkb-dev libxkbcommon-x11-dev libvulkan-dev
sudo apt-get install curl libcurl4-openssl-dev
- name: Download tools
- name: Download deploy tools
run: |
sudo apt-get install fuse wget
wget https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage
Expand All @@ -37,6 +36,17 @@ jobs:
mv linuxdeploy-plugin-qt-x86_64.AppImage /usr/local/bin/linuxdeploy-plugin-qt
mv appimagetool-x86_64.AppImage /usr/local/bin/appimagetool
- name: Setup Miniconda
uses: conda-incubator/setup-miniconda@v3
with:
miniforge-version: latest
auto-update-conda: true

- name: Install conda-forge packages
run: |
conda install conda-forge::qt6-main
conda install conda-forge::curl
- name: Configure CMake
working-directory: ${{github.workspace}}/e2-sat-editor/src
run: |
Expand All @@ -49,33 +59,39 @@ jobs:
-DWITHOUT_CLI=ON \
-DDOWNLOAD_CURL_CABUNDLE=ON
- name: Force fresh libcurl4 dependency
working-directory: ${{github.workspace}}/e2-sat-editor/src
run: |
sudo apt-get remove curl
cmake \
-B build \
-DCURL_LIBRARY=/home/runner/miniconda3/envs/test/lib \
-DCURL_INCLUDE_DIR=/home/runner/miniconda3/envs/test/include
- name: Build
working-directory: ${{github.workspace}}/e2-sat-editor/src
run: cmake --build build --config ${{ env.BUILD_TYPE }}

- name: Deploy
- name: Deploy artifact
working-directory: ${{github.workspace}}/e2-sat-editor/src
continue-on-error: true
run: |
DESTDIR=../AppDir ninja -C build install
# pre actions
mkdir -p AppDir/usr/share/qt/translations
cp /usr/share/qt6/translations/qt_*.qm AppDir/usr/share/qt/translations
cp /usr/share/qt6/translations/qtbase_*.qm AppDir/usr/share/qt/translations
rm -R AppDir/usr/share/qt/translations/qt_help_*.qm
mv AppDir/usr/share/applications/e2-sat-editor.desktop AppDir/usr/share/applications/io.github.ctlcltd.e2se.desktop
mv AppDir/usr/share/metainfo/io.github.ctlcltd.e2se.metainfo.xml AppDir/usr/share/metainfo/io.github.ctlcltd.e2se.appdata.xml
mkdir -p AppDir/usr/share/doc/e2-sat-editor
mv AppDir/usr/share/e2-sat-editor/Readme.txt AppDir/usr/share/doc/e2-sat-editor/README
mv AppDir/usr/share/e2-sat-editor/License.txt AppDir/usr/share/doc/e2-sat-editor/LICENSE
mv AppDir/usr/share/e2-sat-editor/Readme.txt AppDir/usr/share/doc/e2-sat-editor/readme
mv AppDir/usr/share/e2-sat-editor/License.txt AppDir/usr/share/doc/e2-sat-editor/copyright
# run linuxdeploy
export LD_LIBRARY_PATH=/home/runner/miniconda3/envs/test/lib:/home/runner/miniconda3/lib:/usr/local/lib:/usr/lib
export QMAKE=qmake6
linuxdeploy --appdir AppDir --plugin qt --output appimage
export LD_LIBRARY_PATH=
# package
mv e2_SAT_Editor-x86_64.AppImage ../artifact
chmod +x ../artifact
- name: Upload Artifact
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
path: ${{github.workspace}}/e2-sat-editor/artifact
4 changes: 2 additions & 2 deletions dist/linux/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,6 @@ package() {

DESTDIR="$pkgdir" ninja -C build install

install -Dm644 "$pkgdir/usr/share/$pkgname/License.txt" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
install -Dm644 "$pkgdir/usr/share/$pkgname/Readme.txt" "$pkgdir/usr/share/doc/$pkgname/README"
install -Dm644 "$pkgdir/usr/share/$pkgname/License.txt" "$pkgdir/usr/share/licenses/$pkgname/copyright"
install -Dm644 "$pkgdir/usr/share/$pkgname/Readme.txt" "$pkgdir/usr/share/doc/$pkgname/readme"
}
4 changes: 2 additions & 2 deletions scripts/appimage-test-cli.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ mkdir -p AppDir/usr/share/applications
cp ../../dist/xdg/e2se-cli.desktop AppDir/usr/share/applications/io.github.ctlcltd.e2se-cli.desktop
cp ../../dist/xdg/io.github.ctlcltd.e2se-cli.metainfo.xml AppDir/usr/share/metainfo/io.github.ctlcltd.e2se-cli.appdata.xml
mkdir -p AppDir/usr/share/doc/e2se-cli
mv AppDir/usr/share/e2se-cli/Readme.txt AppDir/usr/share/doc/e2se-cli/README
mv AppDir/usr/share/e2se-cli/License.txt AppDir/usr/share/doc/e2se-cli/LICENSE
mv AppDir/usr/share/e2se-cli/Readme.txt AppDir/usr/share/doc/e2se-cli/readme
mv AppDir/usr/share/e2se-cli/License.txt AppDir/usr/share/doc/e2se-cli/copyright

linuxdeploy --appdir AppDir --output appimage

Expand Down
12 changes: 6 additions & 6 deletions scripts/appimage-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -103,17 +103,17 @@ DESTDIR=../AppDir ninja -C build install
# rm -R AppDir/usr/share/qt6/translations/qt_help_*.qm


mkdir -p AppDir/usr/share/qt/translations
cp /usr/local/share/qt6/translations/qt_*.qm AppDir/usr/share/qt/translations
cp /usr/local/share/qt6/translations/qtbase_*.qm AppDir/usr/share/qt/translations
rm -R AppDir/usr/share/qt/translations/qt_help_*.qm
# mkdir -p AppDir/usr/share/qt/translations
# cp /usr/local/share/qt6/translations/qt_*.qm AppDir/usr/share/qt/translations
# cp /usr/local/share/qt6/translations/qtbase_*.qm AppDir/usr/share/qt/translations
# rm -R AppDir/usr/share/qt/translations/qt_help_*.qm


mv AppDir/usr/share/applications/e2-sat-editor.desktop AppDir/usr/share/applications/io.github.ctlcltd.e2se.desktop
mv AppDir/usr/share/metainfo/io.github.ctlcltd.e2se.metainfo.xml AppDir/usr/share/metainfo/io.github.ctlcltd.e2se.appdata.xml
mkdir -p AppDir/usr/share/doc/e2-sat-editor
mv AppDir/usr/share/e2-sat-editor/Readme.txt AppDir/usr/share/doc/e2-sat-editor/README
mv AppDir/usr/share/e2-sat-editor/License.txt AppDir/usr/share/doc/e2-sat-editor/LICENSE
mv AppDir/usr/share/e2-sat-editor/Readme.txt AppDir/usr/share/doc/e2-sat-editor/readme
mv AppDir/usr/share/e2-sat-editor/License.txt AppDir/usr/share/doc/e2-sat-editor/copyright

export QMAKE=qmake6
linuxdeploy --appdir AppDir --plugin qt --output appimage
Expand Down

0 comments on commit 630ee81

Please sign in to comment.