diff --git a/.cargo/config.toml b/.cargo/config.toml index 0c1c209..06ac229 100644 --- a/.cargo/config.toml +++ b/.cargo/config.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" diff --git a/.github/workflows/build-release-binary.yml b/.github/workflows/build-release-binary.yml index 35bde87..dc43ddb 100644 --- a/.github/workflows/build-release-binary.yml +++ b/.github/workflows/build-release-binary.yml @@ -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 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3188a86..6266404 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 diff --git a/rust-toolchain.toml b/rust-toolchain.toml index 4f39af3..d317dce 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,4 +1,4 @@ [toolchain] channel = "1.55" components = ["clippy"] -targets = ["armv7-unknown-linux-gnueabihf"] +targets = ["armv7-unknown-linux-gnueabihf", "aarch64-unknown-linux-gnu"]