-
Notifications
You must be signed in to change notification settings - Fork 1
124 lines (110 loc) · 4.06 KB
/
rust.yml
File metadata and controls
124 lines (110 loc) · 4.06 KB
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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
name: Rust
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
env:
CARGO_TERM_COLOR: always
jobs:
build:
name: Build and test (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
rust: [stable]
include:
- os: ubuntu-latest
features: complex
- os: windows-latest
features: complex
- os: macos-latest
features: complex,mul_add
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.14"
- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
- name: Build
run: cargo build --verbose
- name: Run tests with num-bigint
run: cargo test --verbose --features ${{ matrix.features }},num-bigint
- name: Run tests with num-bigint (Release)
run: cargo test --verbose --features ${{ matrix.features }},num-bigint --release
- name: Run tests with malachite-bigint
run: cargo test --verbose --features ${{ matrix.features }},malachite-bigint
# macOS-specific cross-compilation checks
- name: Setup Intel macOS target
if: runner.os == 'macOS'
run: rustup target add x86_64-apple-darwin
- name: Check Intel macOS
if: runner.os == 'macOS'
run: cargo check --target x86_64-apple-darwin --features ${{ matrix.features }},malachite-bigint
- name: Setup iOS target
if: runner.os == 'macOS'
run: rustup target add aarch64-apple-ios
- name: Check iOS
if: runner.os == 'macOS'
run: cargo check --target aarch64-apple-ios --features ${{ matrix.features }},malachite-bigint
exotic_targets:
name: Check exotic targets
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
# 32-bit Linux
- name: Setup i686-unknown-linux-gnu
run: rustup target add i686-unknown-linux-gnu
- name: Install gcc-multilib
run: sudo apt-get update && sudo apt-get install -y gcc-multilib
- name: Check i686-unknown-linux-gnu
run: cargo check --target i686-unknown-linux-gnu --features complex,malachite-bigint
# Android
- name: Setup aarch64-linux-android
run: rustup target add aarch64-linux-android
- name: Check aarch64-linux-android
run: cargo check --target aarch64-linux-android --features complex,malachite-bigint
# ARM64 Linux
- name: Setup aarch64-unknown-linux-gnu
run: rustup target add aarch64-unknown-linux-gnu
- name: Install gcc-aarch64-linux-gnu
run: sudo apt-get install -y gcc-aarch64-linux-gnu
- name: Check aarch64-unknown-linux-gnu
run: cargo check --target aarch64-unknown-linux-gnu --features complex,malachite-bigint
# musl
- name: Setup i686-unknown-linux-musl
run: rustup target add i686-unknown-linux-musl
- name: Install musl-tools
run: sudo apt-get install -y musl-tools
- name: Check i686-unknown-linux-musl
run: cargo check --target i686-unknown-linux-musl --features complex,malachite-bigint
# FreeBSD
- name: Setup x86_64-unknown-freebsd
run: rustup target add x86_64-unknown-freebsd
- name: Check x86_64-unknown-freebsd
run: cargo check --target x86_64-unknown-freebsd --features complex,malachite-bigint
# WASM
- name: Setup wasm32-unknown-unknown
run: rustup target add wasm32-unknown-unknown
- name: Check wasm32-unknown-unknown
run: cargo check --target wasm32-unknown-unknown --features complex,malachite-bigint
# WASI
- name: Setup wasm32-wasip1
run: rustup target add wasm32-wasip1
- name: Check wasm32-wasip1
run: cargo check --target wasm32-wasip1 --features complex,malachite-bigint
clippy:
name: Clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- name: Run clippy
run: cargo clippy --features complex,malachite-bigint -- -Dwarnings