From ac0361348f2e212da717ab585663ac9aafc9da34 Mon Sep 17 00:00:00 2001 From: Mattia Procopio Date: Tue, 11 Apr 2023 17:07:34 +0200 Subject: [PATCH] Split Linux and MacOS builds --- .github/workflows/build-check.yml | 28 +++----- .github/workflows/linux-arm64.yml | 103 ++++++++++++++++++++++++++ .github/workflows/macos.yml | 115 ++++++++++++++++++++++++++++++ 3 files changed, 229 insertions(+), 17 deletions(-) create mode 100644 .github/workflows/linux-arm64.yml create mode 100644 .github/workflows/macos.yml diff --git a/.github/workflows/build-check.yml b/.github/workflows/build-check.yml index ef53106..443d1a5 100644 --- a/.github/workflows/build-check.yml +++ b/.github/workflows/build-check.yml @@ -27,15 +27,9 @@ jobs: - TARGET: x86_64-unknown-linux-gnu # tested in a debian container on a mac OS: ubuntu-latest SHORT_NAME: linux-amd64 - - TARGET: aarch64-unknown-linux-gnu # raspberry 64bit + - TARGET: x86_64-unknown-linux-musl # tested in a debian container on a mac OS: ubuntu-latest - SHORT_NAME: arm64 - - TARGET: x86_64-apple-darwin # tested on a mac, is not properly signed so there are security warnings - OS: macos-latest - SHORT_NAME: macos-x64 - - TARGET: aarch64-apple-darwin - OS: macos-latest - SHORT_NAME: macos-arm64 + SHORT_NAME: linux-amd64-musl runs-on: ${{ matrix.OS }} env: @@ -52,19 +46,22 @@ jobs: ~/.cargo/registry ./target key: build-cargo-registry-${{matrix.TARGET}} - - name: Install and configure dependencies + run: | # dependencies are only needed on ubuntu as that's the only place where # we make cross-compilation if [[ $OS =~ ^ubuntu.*$ ]]; then - sudo apt-get install -qq crossbuild-essential-arm64 crossbuild-essential-armhf + sudo apt-get install -qq build-crossbuild-essential-arm64 crossbuild-essential-armhf musl-tools fi + wget https://musl.cc/aarch64-linux-musl-cross.tgz + tar -xvzf aarch64-linux-musl-cross.tgz + mv aarch64-linux-musl-cross/bin/* /usr/local/bin # some additional configuration for cross-compilation on linux cat >>~/.cargo/config <>~/.cargo/config <>~/.cargo/config <