Skip to content

Commit

Permalink
release.yml: add armv7
Browse files Browse the repository at this point in the history
  • Loading branch information
bobrippling committed Jul 27, 2024
1 parent e6b97f1 commit ac2e47d
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 4 deletions.
2 changes: 2 additions & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[profile.armv7]
rustflags = ["-C", "linker=arm-linux-androideabi-gcc"]
35 changes: 31 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,28 @@ jobs:
profile: minimal
override: true

- name: Build
- name: Setup Rust (armv7)
run: |
rustup target add armv7-unknown-linux-gnueabihf
sudo apt-get update
sudo apt-get install -y gcc-arm-linux-gnueabihf
- name: Build x64
uses: actions-rs/cargo@v1
with:
command: build
args: --release --features backend-sql

- name: Build armv7
uses: actions-rs/cargo@v1
with:
command: build
args: >
--release
--features backend-sql
--target armv7-unknown-linux-gnueabihf
--profile armv7
- name: Create Release
id: create_release
uses: actions/create-release@v1
Expand All @@ -45,13 +61,24 @@ jobs:
draft: true
prerelease: false

- name: Upload Release Asset
id: upload-release-asset
- name: Upload x64 binary
id: upload-release-asset-x64
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: target/release/podsync
asset_name: podsync
asset_name: podsync-x64
asset_content_type: application/octet-stream

- name: Upload armv7 binary
id: upload-release-asset-armv7
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: target/armv7-unknown-linux-gnueabihf/release/podsync
asset_name: podsync-armv7
asset_content_type: application/octet-stream

0 comments on commit ac2e47d

Please sign in to comment.