Browse Source
Build for aarch64 which is needed for RPi4
refactor/no-log-handler
Philipp Hoenisch
3 years ago
No known key found for this signature in database
GPG Key ID: E5F8E74C672BC666
4 changed files with
35 additions and
6 deletions
-
.cargo/config.toml
-
.github/workflows/build-release-binary.yml
-
.github/workflows/ci.yml
-
rust-toolchain.toml
|
|
@ -1,2 +1,4 @@ |
|
|
|
[target.armv7-unknown-linux-gnueabihf] |
|
|
|
linker = "arm-linux-gnueabihf-gcc" |
|
|
|
[target.aarch64-unknown-linux-gnu] |
|
|
|
linker = "aarch64-linux-gnu-gcc" |
|
|
|
|
|
@ -18,6 +18,10 @@ jobs: |
|
|
|
target: armv7-unknown-linux-gnueabihf |
|
|
|
os: ubuntu-latest |
|
|
|
archive_ext: tar |
|
|
|
- bin: taker |
|
|
|
target: aarch64-unknown-linux-gnu |
|
|
|
os: ubuntu-latest |
|
|
|
archive_ext: tar |
|
|
|
- bin: taker |
|
|
|
target: x86_64-apple-darwin |
|
|
|
os: macos-latest |
|
|
@ -34,6 +38,10 @@ jobs: |
|
|
|
target: armv7-unknown-linux-gnueabihf |
|
|
|
os: ubuntu-latest |
|
|
|
archive_ext: tar |
|
|
|
- bin: maker |
|
|
|
target: aarch64-unknown-linux-gnu |
|
|
|
os: ubuntu-latest |
|
|
|
archive_ext: tar |
|
|
|
- bin: maker |
|
|
|
target: x86_64-apple-darwin |
|
|
|
os: macos-latest |
|
|
@ -63,6 +71,12 @@ jobs: |
|
|
|
sudo apt-get update |
|
|
|
sudo apt-get install gcc-arm-linux-gnueabihf |
|
|
|
|
|
|
|
- name: Install compiler for aarch64 arch (armv8) |
|
|
|
if: matrix.target == 'aarch64-unknown-linux-gnu' |
|
|
|
run: | |
|
|
|
sudo apt-get update |
|
|
|
sudo apt-get install 'gcc-aarch64-linux-gnu' |
|
|
|
|
|
|
|
- uses: actions/setup-node@v2 |
|
|
|
with: |
|
|
|
node-version: '16' |
|
|
@ -80,7 +94,8 @@ jobs: |
|
|
|
run: cargo build --target=${{ matrix.target }} --release --bin ${{ matrix.bin }} |
|
|
|
|
|
|
|
- name: Smoke test the binary |
|
|
|
if: matrix.target != 'armv7-unknown-linux-gnueabihf' # armv7-unknown-linux-gnueabihf is only cross-compiled, no smoke test |
|
|
|
# armv7-* and aarch64-* is only cross-compiled, no smoke test |
|
|
|
if: matrix.target != 'armv7-unknown-linux-gnueabihf' && matrix.target != 'aarch64-unknown-linux-gnu' |
|
|
|
run: target/${{ matrix.target }}/release/${{ matrix.bin }} --help |
|
|
|
|
|
|
|
# Remove once python 3 is the default |
|
|
|
|
|
@ -94,20 +94,32 @@ jobs: |
|
|
|
|
|
|
|
daemons_arm_build: |
|
|
|
runs-on: ubuntu-latest |
|
|
|
strategy: |
|
|
|
matrix: |
|
|
|
include: |
|
|
|
- target: armv7-unknown-linux-gnueabihf |
|
|
|
- target: aarch64-unknown-linux-gnu |
|
|
|
steps: |
|
|
|
- uses: actions/checkout@v2 |
|
|
|
- name: Setup rust toolchain |
|
|
|
run: rustup show |
|
|
|
- uses: Swatinem/rust-cache@v1.3.0 |
|
|
|
- name: Install compiler for armhf arch |
|
|
|
if: matrix.target == 'armv7-unknown-linux-gnueabihf' |
|
|
|
run: | |
|
|
|
sudo apt-get update |
|
|
|
sudo apt-get install gcc-arm-linux-gnueabihf |
|
|
|
- run: cargo build --target=armv7-unknown-linux-gnueabihf --bins |
|
|
|
|
|
|
|
- name: Install compiler for aarch64 arch |
|
|
|
if: matrix.target == 'aarch64-unknown-linux-gnu' |
|
|
|
run: | |
|
|
|
sudo apt-get update |
|
|
|
sudo apt-get install gcc-aarch64-linux-gnu |
|
|
|
- run: cargo build --target=${{ matrix.target }} --bins |
|
|
|
- name: Upload binaries |
|
|
|
uses: actions/upload-artifact@v2 |
|
|
|
with: |
|
|
|
name: maker-and-taker-binaries-armv7 |
|
|
|
name: maker-and-taker-binaries-${{ matrix.target }} |
|
|
|
path: | |
|
|
|
target/armv7-unknown-linux-gnueabihf/debug/maker |
|
|
|
target/armv7-unknown-linux-gnueabihf/debug/taker |
|
|
|
target/${{ matrix.target }}/debug/maker |
|
|
|
target/${{ matrix.target }}/debug/taker |
|
|
|
|
|
@ -1,4 +1,4 @@ |
|
|
|
[toolchain] |
|
|
|
channel = "1.55" |
|
|
|
components = ["clippy"] |
|
|
|
targets = ["armv7-unknown-linux-gnueabihf"] |
|
|
|
targets = ["armv7-unknown-linux-gnueabihf", "aarch64-unknown-linux-gnu"] |
|
|
|