-
Notifications
You must be signed in to change notification settings - Fork 38
100 lines (98 loc) · 3.09 KB
/
cross.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
name: CrossCompiling
on:
push:
paths-ignore:
- 'ansible/**'
- 'doc/**'
- 'sphinx/**'
- 'scripts/**'
branches:
- 'master'
- 'lts/**'
pull_request:
branches:
- 'master'
- 'lts/**'
jobs:
build:
name: Build
runs-on: ubuntu-latest
container:
image: debian:sid
env:
CARGO_TERM_COLOR: always
CROSS_FEATURES: --no-default-features --features vendored-openssl,rustls-ring,quic,vendored-c-ares,hickory
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER: aarch64-linux-gnu-gcc
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
CARGO_TARGET_I686_UNKNOWN_LINUX_GNU_LINKER: i686-linux-gnu-gcc
strategy:
matrix:
target: [
{
rustc: x86_64-pc-windows-gnu,
gcc: gcc-mingw-w64-x86-64,
},
{
rustc: i686-unknown-linux-gnu,
gcc: gcc-i686-linux-gnu,
},
{
rustc: aarch64-unknown-linux-gnu,
gcc: gcc-aarch64-linux-gnu,
},
{
rustc: armv7-unknown-linux-gnueabihf,
gcc: gcc-arm-linux-gnueabihf,
},
{
rustc: arm-unknown-linux-gnueabihf,
gcc: gcc-arm-linux-gnueabihf,
},
{
rustc: arm-unknown-linux-gnueabi,
gcc: gcc-arm-linux-gnueabi,
},
{
rustc: riscv64gc-unknown-linux-gnu,
gcc: gcc-riscv64-linux-gnu,
},
{
rustc: powerpc64le-unknown-linux-gnu,
gcc: gcc-powerpc64le-linux-gnu,
},
{
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 gcc make pkgconf cmake
- name: Checkout sources
uses: actions/checkout@v4
with:
submodules: true
- name: Install stable toolchain
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target.rustc }}
components: clippy
- name: Install dependencies
run: |
apt-get -y install capnproto ${{ matrix.target.gcc }}
- name: Cargo build
run: cargo build --target=${{ matrix.target.rustc }} $CROSS_FEATURES
- name: Cargo clippy
run: cargo clippy --target=${{ matrix.target.rustc }} $CROSS_FEATURES --tests -- --deny warnings