diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml new file mode 100644 index 0000000..284460d --- /dev/null +++ b/.github/workflows/android.yml @@ -0,0 +1,30 @@ +# We could use `@actions-rs/cargo` Action ability to automatically install `cross` tool +# in order to compile our application for some unusual targets. + +# Separated as another pipeline to avoid errors cancelling other targets until the cross issue is solved +# Ref: https://github.com/bltavares/multicast-socket/issues/18 + +on: [push, pull_request] + +name: Cross-compile android + +jobs: + build: + name: Build + runs-on: ubuntu-latest + strategy: + matrix: + target: + - aarch64-linux-android + steps: + - uses: actions/checkout@v2 + - uses: actions-rs/toolchain@v1 + with: + toolchain: 1.67 + target: ${{ matrix.target }} + override: true + - uses: actions-rs/cargo@v1 + with: + use-cross: true + command: build + args: --target=${{ matrix.target }} --examples \ No newline at end of file diff --git a/.github/workflows/cross_compile.yml b/.github/workflows/cross_compile.yml index d686f6e..5476662 100644 --- a/.github/workflows/cross_compile.yml +++ b/.github/workflows/cross_compile.yml @@ -13,8 +13,6 @@ jobs: matrix: target: - armv7-unknown-linux-gnueabihf - - aarch64-linux-android - - mips-unknown-linux-musl - x86_64-unknown-linux-musl - aarch64-unknown-linux-gnu steps: diff --git a/.github/workflows/mips.yml b/.github/workflows/mips.yml new file mode 100644 index 0000000..228c2f4 --- /dev/null +++ b/.github/workflows/mips.yml @@ -0,0 +1,28 @@ +# Since Rust 1.72+ MIPS is a Tier 3 platform, and there are many errors on the latest nightly to use -Z build-std. +# So we pin it to 1.71 to produce valid targets +# Ref: https://github.com/rust-lang/compiler-team/issues/648 + +on: [push, pull_request] + +name: Cross-compile MIPS + +jobs: + build: + name: Build + runs-on: ubuntu-latest + strategy: + matrix: + target: + - mips-unknown-linux-musl + steps: + - uses: actions/checkout@v2 + - uses: actions-rs/toolchain@v1 + with: + toolchain: 1.71 + target: ${{ matrix.target }} + override: true + - uses: actions-rs/cargo@v1 + with: + use-cross: true + command: build + args: --target=${{ matrix.target }} --examples \ No newline at end of file