From c40b4e6b962791935f638c675fa4d79e463988ca Mon Sep 17 00:00:00 2001 From: Casey Rodarmor Date: Thu, 27 May 2021 18:14:01 -0700 Subject: [PATCH] Release `aarch64-unknown-linux-gnu` binaries (#843) --- .cargo/config | 2 ++ .github/workflows/build.yaml | 45 +++++++++++++++++++++++++----------- 2 files changed, 33 insertions(+), 14 deletions(-) create mode 100644 .cargo/config diff --git a/.cargo/config b/.cargo/config new file mode 100644 index 0000000..3c32d25 --- /dev/null +++ b/.cargo/config @@ -0,0 +1,2 @@ +[target.aarch64-unknown-linux-gnu] +linker = "aarch64-linux-gnu-gcc" diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index e4f10b1..293e87d 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -16,17 +16,24 @@ jobs: strategy: matrix: - os: - - macos-latest - - ubuntu-latest - - windows-2016 + target: + - x86_64-unknown-linux-musl + - x86_64-apple-darwin + - x86_64-pc-windows-msvc + - aarch64-unknown-linux-gnu include: - - os: ubuntu-latest - target: x86_64-unknown-linux-musl - - os: macos-latest - target: x86_64-apple-darwin - - os: windows-2016 - target: x86_64-pc-windows-msvc + - target: x86_64-unknown-linux-musl + os: ubuntu-latest + native: true + - target: x86_64-apple-darwin + os: macos-latest + native: true + - target: x86_64-pc-windows-msvc + os: windows-2016 + native: true + - target: aarch64-unknown-linux-gnu + os: ubuntu-latest + native: false runs-on: ${{matrix.os}} @@ -51,7 +58,12 @@ jobs: ~/.cargo/registry ~/.cargo/git target - key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} + key: ${{ matrix.configration.os }}-${{ matrix.target }} cargo-${{ hashFiles('**/Cargo.lock') }} + + - name: Update Ubuntu Packages + if: matrix.os == 'ubuntu-latest' + run: | + sudo apt-get update - name: Install Main Toolchain uses: actions-rs/toolchain@v1 @@ -59,9 +71,13 @@ jobs: toolchain: stable target: ${{ matrix.target }} profile: minimal - components: clippy, rustfmt + components: clippy override: true + - name: Install AArch64 Toolchain + if: matrix.target == 'aarch64-unknown-linux-gnu' + run: sudo apt-get install gcc-aarch64-linux-gnu + - name: Version run: | rustup --version @@ -69,10 +85,11 @@ jobs: cargo clippy --version - name: Build - run: cargo build --all --verbose + run: cargo build --all --target ${{ matrix.target }} - name: Test - run: cargo test --all --verbose + if: matrix.native + run: cargo test --all --target ${{ matrix.target }} - name: Clippy run: cargo clippy --all --all-targets --all-features