Skip to content

Commit 64dc645

Browse files
committed
Convert the tests to Github Workflows
Because Cirrus Labs is shutting down soon.
1 parent 6a4cf06 commit 64dc645

2 files changed

Lines changed: 135 additions & 105 deletions

File tree

.cirrus.yml

Lines changed: 0 additions & 105 deletions
This file was deleted.

.github/workflows/ci.yml

Lines changed: 135 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,135 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main, master]
6+
pull_request:
7+
8+
env:
9+
CARGO_TERM_COLOR: always
10+
11+
jobs:
12+
test:
13+
runs-on: ubuntu-latest
14+
strategy:
15+
fail-fast: false
16+
matrix:
17+
include:
18+
- freebsd_version: "15.0"
19+
rust_version: nightly
20+
target: x86_64-unknown-freebsd
21+
- freebsd_version: "14.4"
22+
rust_version: nightly
23+
target: x86_64-unknown-freebsd
24+
# Test i686 FreeBSD in 32-bit emulation on a 64-bit host.
25+
- freebsd_version: "14.4"
26+
rust_version: nightly
27+
target: i686-unknown-freebsd
28+
env:
29+
RUSTFLAGS: -D warnings
30+
name: FreeBSD/${{ matrix.target }} ${{ matrix.freebsd_version }} ${{ matrix.rust_version }}
31+
steps:
32+
- uses: actions/checkout@v6
33+
- name: Start VM
34+
uses: vmactions/freebsd-vm@v1
35+
with:
36+
release: ${{ matrix.freebsd_version }}
37+
usesh: true
38+
envs: RUSTFLAGS
39+
- name: Install dependencies
40+
shell: freebsd {0}
41+
run: |
42+
pkg install -y curl llvm
43+
fetch https://sh.rustup.rs -o rustup.sh
44+
sh rustup.sh -y --profile=minimal --default-toolchain ${{ matrix.rust_version }}
45+
. $HOME/.cargo/env
46+
rustup target add --toolchain ${{ matrix.rust_version }} ${{ matrix.target }}
47+
- name: Test
48+
shell: freebsd {0}
49+
run: |
50+
. $HOME/.cargo/env
51+
cargo test --all-features --all-targets --target ${{ matrix.target }}
52+
- name: Doc
53+
shell: freebsd {0}
54+
run: |
55+
. $HOME/.cargo/env
56+
cargo doc --target ${{ matrix.target }} --no-deps --all-features
57+
58+
msrv:
59+
runs-on: ubuntu-latest
60+
name: FreeBSD 14.4 amd64 MSRV
61+
steps:
62+
- uses: actions/checkout@v6
63+
- name: Start VM
64+
uses: vmactions/freebsd-vm@v1
65+
with:
66+
release: "14.4"
67+
usesh: true
68+
- name: Install dependencies
69+
shell: freebsd {0}
70+
run: |
71+
pkg install -y curl llvm
72+
fetch https://sh.rustup.rs -o rustup.sh
73+
sh rustup.sh -y --profile=minimal --default-toolchain 1.80.0
74+
- name: Check
75+
shell: freebsd {0}
76+
run: |
77+
. $HOME/.cargo/env
78+
cargo update -p sysctl --precise 0.6.0
79+
cargo update -p rctl --precise 0.3.0
80+
cargo +1.80.0 check --all-features
81+
82+
lint:
83+
runs-on: ubuntu-latest
84+
name: lint
85+
env:
86+
RUSTFLAGS: -D warnings
87+
steps:
88+
- uses: actions/checkout@v6
89+
- name: Start VM
90+
uses: vmactions/freebsd-vm@v1
91+
with:
92+
release: "14.4"
93+
usesh: true
94+
envs: RUSTFLAGS
95+
- name: Install dependencies
96+
shell: freebsd {0}
97+
run: |
98+
pkg install -y curl llvm cargo-audit
99+
fetch https://sh.rustup.rs -o rustup.sh
100+
sh rustup.sh -y --profile=minimal --default-toolchain nightly
101+
- name: Setup
102+
shell: freebsd {0}
103+
run: |
104+
. $HOME/.cargo/env
105+
rustup component add --toolchain nightly clippy
106+
rustup component add --toolchain nightly rustfmt
107+
- name: Clippy
108+
shell: freebsd {0}
109+
run: |
110+
. $HOME/.cargo/env
111+
cargo +nightly clippy --all-targets -- -D warnings
112+
cargo +nightly clippy --all-targets --all-features -- -D warnings
113+
- name: Audit
114+
shell: freebsd {0}
115+
run: |
116+
. $HOME/.cargo/env
117+
cargo audit
118+
- name: Minver
119+
shell: freebsd {0}
120+
run: |
121+
. $HOME/.cargo/env
122+
cargo +nightly update -Zdirect-minimal-versions
123+
cargo +nightly check --all-features --all-targets --all
124+
125+
style:
126+
name: style
127+
runs-on: ubuntu-latest
128+
container:
129+
image: rustlang/rust:nightly
130+
steps:
131+
- uses: actions/checkout@v6
132+
- name: Fmt
133+
run: |
134+
rustup component add rustfmt
135+
cargo fmt --all -- --check --color=never

0 commit comments

Comments
 (0)