@@ -356,6 +356,238 @@ jobs:
356356 asset_path : rpm_output/*.rpm
357357 asset_name : eim-cli-${{ matrix.package_name }}.rpm
358358
359+ build-cli-linux-armv7 :
360+ name : Build CLI (Linux - linux-armv7)
361+ needs : [setup, build-test-lib, build-cli-linux]
362+ if : (needs.build-test-lib.result == 'success' || needs.build-test-lib.result == 'skipped') && (needs.build-cli-linux.result == 'success')
363+ runs-on : ubuntu-latest
364+ env :
365+ CROSS_TARGET : armv7-unknown-linux-musleabihf
366+ steps :
367+ - name : Checkout repository
368+ uses : actions/checkout@v4
369+
370+ - name : Set up Rust
371+ uses : dtolnay/rust-toolchain@stable
372+ with :
373+ targets : armv7-unknown-linux-musleabihf
374+
375+ - name : Install cross
376+ run : cargo install cross --git https://github.com/cross-rs/cross --tag v0.2.5
377+
378+ - name : Cache cargo
379+ uses : actions/cache@v4
380+ with :
381+ path : |
382+ ~/.cargo/registry
383+ ~/.cargo/git
384+ target
385+ key : linux-armv7-cargo-${{ hashFiles('**/Cargo.lock') }}
386+ restore-keys : linux-armv7-cargo-
387+
388+ - name : Build CLI
389+ env :
390+ LIBZ_SYS_STATIC : 1
391+ ZLIB_STATIC : 1
392+ LZMA_API_STATIC : 1
393+ APP_INSIGHTS_CONNECTION_STRING : ${{ secrets.APP_INSIGHTS_CONNECTION_STRING }}
394+ run : |
395+ cd src-tauri
396+ cross build --release --no-default-features --features cli --target ${{ env.CROSS_TARGET }}
397+ shell : bash
398+
399+ - name : Create release directory
400+ run : mkdir -p release_cli/linux-armv7
401+
402+ - name : Copy binary
403+ run : |
404+ cp src-tauri/target/${{ env.CROSS_TARGET }}/release/eim release_cli/linux-armv7/eim
405+ chmod +x release_cli/linux-armv7/eim
406+ cd release_cli/linux-armv7
407+ zip -r eim.zip eim
408+ shell : bash
409+
410+ - name : Download completions from linux-x64 build
411+ uses : actions/download-artifact@v4
412+ with :
413+ name : eim-cli-linux-x64-${{ (github.event_name == 'release' && github.ref_name) || github.run_number }}
414+ path : /tmp/x64-cli-artifact/
415+
416+ - name : Generate Completions from x64 binary
417+ shell : bash
418+ run : |
419+ set -euo pipefail
420+ # Completions are architecture-independent (just text from clap),
421+ # so we reuse the x64 binary to generate them.
422+ X64_BIN="/tmp/x64-cli-artifact/eim"
423+ chmod +x "$X64_BIN"
424+
425+ cd src-tauri
426+ OUTDIR="target/${{ env.CROSS_TARGET }}/release/completions"
427+ mkdir -p "$OUTDIR"
428+
429+ "$X64_BIN" completions zsh > "$OUTDIR/_eim"
430+ "$X64_BIN" completions bash > "$OUTDIR/eim.bash"
431+ "$X64_BIN" completions fish > "$OUTDIR/eim.fish"
432+ "$X64_BIN" completions elvish > "$OUTDIR/eim.elv"
433+
434+ mkdir -p target/release/completions
435+ cp -a "$OUTDIR"/. target/release/completions/
436+
437+ - name : Upload build artifacts
438+ uses : actions/upload-artifact@v4
439+ with :
440+ name : eim-cli-linux-armv7-${{ (github.event_name == 'release' && github.ref_name) || github.run_number }}
441+ path : release_cli/linux-armv7/eim
442+
443+ - name : Upload Release Asset
444+ if : github.event_name == 'release' && github.event.action == 'created'
445+ uses : shogo82148/actions-upload-release-asset@v1
446+ env :
447+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
448+ with :
449+ upload_url : ${{ github.event.release.upload_url }}
450+ asset_path : release_cli/linux-armv7/eim.zip
451+ asset_name : eim-cli-linux-armv7.zip
452+
453+ # offline installer
454+ - name : Build offline_installer_builder
455+ env :
456+ LIBZ_SYS_STATIC : 1
457+ ZLIB_STATIC : 1
458+ LZMA_API_STATIC : 1
459+ run : |
460+ cd src-tauri
461+ cross build --release --no-default-features --features offline --bin offline_installer_builder --target ${{ env.CROSS_TARGET }}
462+ shell : bash
463+
464+ - name : Copy offline_installer_builder binary
465+ run : |
466+ cp src-tauri/target/${{ env.CROSS_TARGET }}/release/offline_installer_builder release_cli/linux-armv7/offline_installer_builder
467+ chmod +x release_cli/linux-armv7/offline_installer_builder
468+ cd release_cli/linux-armv7
469+ zip -r offline_installer_builder.zip offline_installer_builder
470+ shell : bash
471+
472+ - name : Upload offline_installer_builder artifacts
473+ uses : actions/upload-artifact@v4
474+ with :
475+ name : offline_installer_builder-linux-armv7-${{ (github.event_name == 'release' && github.ref_name) || github.run_number }}
476+ path : release_cli/linux-armv7/offline_installer_builder
477+
478+ - name : Upload offline_installer_builder Release Asset
479+ if : github.event_name == 'release' && github.event.action == 'created'
480+ uses : shogo82148/actions-upload-release-asset@v1
481+ env :
482+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
483+ with :
484+ upload_url : ${{ github.event.release.upload_url }}
485+ asset_path : release_cli/linux-armv7/offline_installer_builder.zip
486+ asset_name : offline_installer_builder-linux-armv7.zip
487+
488+ # .deb package
489+ - name : Prepare manpage for deb package
490+ if : github.event_name == 'release' && github.event.action == 'created'
491+ run : |
492+ mkdir -p src-tauri/man
493+ cp man/eim.1 src-tauri/man/
494+ shell : bash
495+
496+ - name : Build CLI .deb package
497+ run : |
498+ cd src-tauri
499+ cargo install cargo-deb || true
500+
501+ if [[ "${GITHUB_REF_TYPE}" == "tag" ]]; then
502+ VERSION="${GITHUB_REF_NAME#v}"
503+ else
504+ VERSION="0.0.0-${GITHUB_SHA:0:7}"
505+ fi
506+
507+ echo "Using version: $VERSION"
508+
509+ cargo deb --no-build --no-strip --no-default-features --features cli \
510+ --target ${{ env.CROSS_TARGET }} \
511+ --deb-version $VERSION
512+ shell : bash
513+
514+ - name : Upload CLI .deb artifact
515+ uses : actions/upload-artifact@v4
516+ with :
517+ name : eim-cli-linux-armv7-${{ (github.event_name == 'release' && github.ref_name) || github.run_number }}-deb
518+ path : src-tauri/target/debian/eim*.deb
519+ if-no-files-found : warn
520+
521+ - name : Upload CLI .deb Release Asset
522+ if : github.event_name == 'release' && github.event.action == 'created'
523+ uses : shogo82148/actions-upload-release-asset@v1
524+ env :
525+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
526+ with :
527+ upload_url : ${{ github.event.release.upload_url }}
528+ asset_path : src-tauri/target/debian/eim*.deb
529+ asset_name : eim-cli-linux-armv7.deb
530+
531+ # .rpm package
532+ - name : Build CLI .rpm package
533+ run : |
534+ cd src-tauri
535+ cargo install cargo-generate-rpm || true
536+
537+ if [[ "${GITHUB_REF_TYPE}" == "tag" ]]; then
538+ VERSION="${GITHUB_REF_NAME#v}"
539+ else
540+ VERSION="0.0.0-${GITHUB_SHA:0:7}"
541+ fi
542+
543+ echo "Using version: $VERSION"
544+
545+ mkdir -p ~/.rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
546+
547+ cargo generate-rpm \
548+ --target ${{ env.CROSS_TARGET }} \
549+ --payload-compress gzip \
550+
551+ echo "Generated RPM files:"
552+ find target -name "*.rpm" -type f
553+ shell : bash
554+
555+ - name : Find and upload RPM artifacts
556+ id : find-rpms
557+ run : |
558+ RPM_DIR="rpm_output"
559+ mkdir -p "$RPM_DIR"
560+ find src-tauri/target -name "*.rpm" -type f -exec cp {} "$RPM_DIR/" \;
561+
562+ echo "Contents of $RPM_DIR:"
563+ ls -la "$RPM_DIR"/
564+
565+ if [ -d "$RPM_DIR" ] && [ "$(ls -A $RPM_DIR)" ]; then
566+ echo "rpm_files_found=true" >> $GITHUB_OUTPUT
567+ else
568+ echo "rpm_files_found=false" >> $GITHUB_OUTPUT
569+ echo "No RPM files found!" >&2
570+ exit 1
571+ fi
572+
573+ - name : Upload RPM artifacts
574+ if : steps.find-rpms.outputs.rpm_files_found == 'true'
575+ uses : actions/upload-artifact@v4
576+ with :
577+ name : eim-cli-linux-armv7-${{ (github.event_name == 'release' && github.ref_name) || github.run_number }}-rpm
578+ path : rpm_output/*.rpm
579+ if-no-files-found : warn
580+
581+ - name : Upload CLI .rpm Release Asset
582+ if : github.event_name == 'release' && github.event.action == 'created' && steps.find-rpms.outputs.rpm_files_found == 'true'
583+ uses : shogo82148/actions-upload-release-asset@v1
584+ env :
585+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
586+ with :
587+ upload_url : ${{ github.event.release.upload_url }}
588+ asset_path : rpm_output/*.rpm
589+ asset_name : eim-cli-linux-armv7.rpm
590+
359591 build-cli :
360592 name : Build CLI (${{ matrix.package_name }})
361593 needs : [setup, build-test-lib]
@@ -673,8 +905,8 @@ jobs:
673905
674906 build-offline-archives :
675907 name : Build Offline Archives
676- needs : [build-cli, build-cli-linux]
677- if : (needs.build-cli.result == 'success' || needs.build-cli.result == 'skipped') && (needs.build-cli-linux.result == 'success' || needs.build-cli-linux.result == 'skipped') && github.event_name == 'release'
908+ needs : [build-cli, build-cli-linux, build-cli-linux-armv7 ]
909+ if : (needs.build-cli.result == 'success' || needs.build-cli.result == 'skipped') && (needs.build-cli-linux.result == 'success' || needs.build-cli-linux.result == 'skipped') && (needs.build-cli-linux-armv7.result == 'success' || needs.build-cli-linux-armv7.result == 'skipped') && github.event_name == 'release'
678910 uses : ./.github/workflows/build_offline_installer_archives.yaml
679911 with :
680912 ref : ${{ github.ref }}
@@ -1048,7 +1280,7 @@ jobs:
10481280
10491281 Autotest-CLI :
10501282 name : Autotest CLI
1051- needs : [build-cli, build-cli-linux]
1283+ needs : [build-cli, build-cli-linux, build-cli-linux-armv7 ]
10521284 if : needs.build-cli.result == 'success' && needs.build-cli-linux.result == 'success'
10531285 uses : ./.github/workflows/test_cli.yml
10541286 with :
@@ -1069,7 +1301,7 @@ jobs:
10691301
10701302 update-release-info :
10711303 name : Update Release Information
1072- needs : [build-cli, build-cli-linux, build-gui]
1304+ needs : [build-cli, build-cli-linux, build-cli-linux-armv7, build- gui]
10731305 runs-on : ubuntu-latest
10741306 if : github.event_name == 'release' || github.event_name == 'workflow_dispatch'
10751307 steps :
@@ -1088,7 +1320,7 @@ jobs:
10881320
10891321 update-homebrew :
10901322 name : Update Homebrew Formula and Cask
1091- needs : [build-cli, build-cli-linux, build-gui, update-release-info]
1323+ needs : [build-cli, build-cli-linux, build-cli-linux-armv7, build- gui, update-release-info]
10921324 uses : ./.github/workflows/update-homebrew.yml
10931325 with :
10941326 version : ${{ github.ref_name }}
@@ -1097,7 +1329,7 @@ jobs:
10971329
10981330 update-linux-repos :
10991331 name : Update APT and RPM Repositories
1100- needs : [build-cli-linux, build-gui, update-release-info]
1332+ needs : [build-cli-linux, build-cli-linux-armv7, build- gui, update-release-info]
11011333 uses : ./.github/workflows/update-linux-repos.yml
11021334 if : github.event_name == 'release' && github.event.action == 'created'
11031335 with :
0 commit comments