Skip to content

Commit

Permalink
use debian container to run cross compiling and add loongarch64
Browse files Browse the repository at this point in the history
  • Loading branch information
zh-jq-b committed Dec 23, 2024
1 parent d429245 commit 6eb20ed
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions .github/workflows/cross.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ env:
CARGO_TARGET_RISCV64GC_UNKNOWN_LINUX_GNU_LINKER: riscv64-linux-gnu-gcc
CARGO_TARGET_POWERPC64LE_UNKNOWN_LINUX_GNU_LINKER: powerpc64le-linux-gnu-gcc
CARGO_TARGET_S390X_UNKNOWN_LINUX_GNU_LINKER: s390x-linux-gnu-gcc
CARGO_TARGET_LOONGARCH64_UNKNOWN_LINUX_GNU_LINKER: loongarch64-linux-gnu-gcc
CARGO_TARGET_ARMV7_UNKNOWN_LINUX_GNUEABIHF_LINKER: arm-linux-gnueabihf-gcc
CARGO_TARGET_ARM_UNKNOWN_LINUX_GNUEABIHF_LINKER: arm-linux-gnueabihf-gcc
CARGO_TARGET_ARM_UNKNOWN_LINUX_GNUEABI_LINKER: arm-linux-gnueabi-gcc
Expand All @@ -31,6 +32,7 @@ jobs:
build:
name: Build
runs-on: ubuntu-latest
container: debian:sid
strategy:
matrix:
target: [
Expand Down Expand Up @@ -70,8 +72,16 @@ jobs:
rustc: s390x-unknown-linux-gnu,
gcc: gcc-s390x-linux-gnu,
},
{
rustc: loongarch64-unknown-linux-gnu,
gcc: gcc-loongarch64-linux-gnu,
},
]
steps:
- name: Install tools
run: |
apt-get -y update
apt-get -y install git curl
- name: Checkout sources
uses: actions/checkout@v4
with:
Expand All @@ -82,8 +92,7 @@ jobs:
targets: ${{ matrix.target.rustc }}
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install capnproto ${{ matrix.target.gcc }}
apt-get -y install capnproto ${{ matrix.target.gcc }}
- name: Cargo build
run: cargo build --target=${{ matrix.target.rustc }} $CROSS_FEATURES
- name: Cargo clippy
Expand Down

0 comments on commit 6eb20ed

Please sign in to comment.