Skip to content

Commit

Permalink
Add support for building armv7 and aarch64 viewer/lsp binaries
Browse files Browse the repository at this point in the history
Fixes #5707
  • Loading branch information
tronical committed Jul 29, 2024
1 parent e0f3fd4 commit 5fcff86
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/nightly_snapshot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -480,6 +480,12 @@ jobs:
- uses: actions/download-artifact@v4
with:
name: slint-lsp-linux
- uses: actions/download-artifact@v4
with:
name: slint-lsp-linux-armv7-unknown-linux-gnueabihf
- uses: actions/download-artifact@v4
with:
name: slint-lsp-linux-aarch64-unknown-linux-gnu
- uses: actions/download-artifact@v4
with:
name: slint-lsp-windows
Expand All @@ -494,6 +500,8 @@ jobs:
mv slint-viewer-linux.tar.gz artifacts/
mv slint-viewer-macos.tar.gz artifacts/
mv slint-lsp-linux.tar.gz artifacts/
mv slint-lsp-linux-armv7-unknown-linux-gnueabihf.tar.gz artifacts/
mv slint-lsp-linux-aarch64-unknown-linux-gnu.tar.gz artifacts/
mv slint-lsp-macos.tar.gz artifacts/
- name: Extract Version
id: version
Expand Down
34 changes: 34 additions & 0 deletions .github/workflows/slint_tool_binary.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,40 @@ jobs:
name: slint-${{ github.event.inputs.program || inputs.program }}-linux
path: slint-${{ github.event.inputs.program || inputs.program }}-linux.tar.gz

build_linux_arm:
runs-on: ubuntu-20.04
strategy:
matrix:
target:
- armv7-unknown-linux-gnueabihf
- aarch64-unknown-linux-gnu
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup-rust
with:
target: x86_64-unknown-linux-gnu
- uses: baptiste0928/cargo-install@v3
with:
crate: cross
- uses: baptiste0928/cargo-install@v3
with:
crate: cargo-about
- name: Build
run: cross build --target=${{ matrix.target }} --no-default-features --features backend-qt,${{ github.event.inputs.features || inputs.features }} --release -p slint-${{ github.event.inputs.program || inputs.program }}
- name: Create artifact directory
run: |
mkdir -p slint-${{ github.event.inputs.program || inputs.program }}-${{ matrix.target }}
cp target/release/slint-${{ github.event.inputs.program || inputs.program }} slint-${{ github.event.inputs.program || inputs.program }}-${{ matrix.target }}/
cd tools/${{ github.event.inputs.program || inputs.program }}
../../scripts/prepare_binary_package.sh ../../slint-${{ github.event.inputs.program || inputs.program }}-${{ matrix.target }}
- name: Tar artifacts to preserve permissions
run: tar czvf slint-${{ github.event.inputs.program || inputs.program }}-${{ matrix.target }}.tar.gz slint-${{ github.event.inputs.program || inputs.program }}-${{ matrix.target }}
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: slint-${{ github.event.inputs.program || inputs.program }}-${{ matrix.target }}
path: slint-${{ github.event.inputs.program || inputs.program }}-${{ matrix.target }}.tar.gz

build_macos:
runs-on: macos-12
steps:
Expand Down

0 comments on commit 5fcff86

Please sign in to comment.