Skip to content

Commit c8bd6d5

Browse files
authored
Merge pull request #90 from asomers/github-workflows
Replace Cirrus CI with Github Workflows
2 parents e1bc149 + be78209 commit c8bd6d5

3 files changed

Lines changed: 110 additions & 92 deletions

File tree

.cirrus.yml

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

.github/workflows/ci.yml

Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
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: "14.4"
19+
rust_version: "1.85.0"
20+
target: x86_64-unknown-freebsd
21+
- freebsd_version: "14.4"
22+
rust_version: "1.85.0"
23+
target: i686-unknown-freebsd
24+
- freebsd_version: "14.4"
25+
rust_version: "nightly"
26+
target: x86_64-unknown-freebsd
27+
- freebsd_version: "15.0"
28+
rust_version: "nightly"
29+
target: x86_64-unknown-freebsd
30+
env:
31+
RUSTFLAGS: -D warnings
32+
name: FreeBSD/${{ matrix.target }} ${{ matrix.freebsd_version }} ${{ matrix.rust_version }}
33+
steps:
34+
- uses: actions/checkout@v6
35+
- name: Start VM
36+
uses: vmactions/freebsd-vm@v1
37+
with:
38+
release: ${{ matrix.freebsd_version }}
39+
usesh: true
40+
envs: RUSTFLAGS
41+
- name: Install dependencies
42+
shell: freebsd {0}
43+
run: |
44+
pkg install -y curl llvm
45+
fetch https://sh.rustup.rs -o rustup.sh
46+
sh rustup.sh -y --profile=minimal --default-toolchain ${{ matrix.rust_version }}
47+
- name: Setup
48+
shell: freebsd {0}
49+
run: |
50+
. $HOME/.cargo/env
51+
if [ "${{ matrix.target }}" = "i686-unknown-freebsd" ]; then rustup target add --toolchain ${{ matrix.rust_version }} i686-unknown-freebsd; fi
52+
- name: Build
53+
shell: freebsd {0}
54+
run: |
55+
. $HOME/.cargo/env
56+
cargo build --all-targets --target ${{ matrix.target }}
57+
cargo build --all-features --all-targets --target ${{ matrix.target }}
58+
- name: Test
59+
shell: freebsd {0}
60+
run: |
61+
. $HOME/.cargo/env
62+
cargo test --target ${{ matrix.target }}
63+
cargo test --all-features --target ${{ matrix.target }}
64+
- name: Doc
65+
shell: freebsd {0}
66+
run: |
67+
. $HOME/.cargo/env
68+
cargo doc --target ${{ matrix.target }} --no-deps --all-features
69+
- name: Clippy
70+
if: matrix.rust_version == 'nightly'
71+
shell: freebsd {0}
72+
run: |
73+
. $HOME/.cargo/env
74+
rustup component add clippy
75+
cargo clippy --all-targets
76+
cargo clippy --all-targets --all-features
77+
- name: Fmt
78+
if: matrix.rust_version == 'nightly'
79+
shell: freebsd {0}
80+
run: |
81+
. $HOME/.cargo/env
82+
rustup component add rustfmt
83+
cargo fmt --all -- --check --color=never
84+
- name: Audit
85+
if: matrix.rust_version == 'nightly'
86+
shell: freebsd {0}
87+
run: |
88+
. $HOME/.cargo/env
89+
pkg install -y cargo-audit
90+
cargo audit
91+
- name: Minver
92+
if: matrix.rust_version == 'nightly'
93+
shell: freebsd {0}
94+
run: |
95+
. $HOME/.cargo/env
96+
cargo update -Zdirect-minimal-versions
97+
cargo check --all-features --all-targets --all
98+
99+
cross-docs:
100+
name: Cross docs
101+
runs-on: ubuntu-latest
102+
container:
103+
image: rustlang/rust:nightly
104+
steps:
105+
- uses: actions/checkout@v6
106+
- name: Cross compile docs
107+
run: |
108+
rustup target add x86_64-unknown-freebsd
109+
cargo doc --target x86_64-unknown-freebsd --no-deps --all-features

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
FreeBSD resource limits and accounting with RCTL / RACCT
44

5-
[![Build Status](https://api.cirrus-ci.com/github/fubarnetes/rctl.svg)](https://cirrus-ci.com/github/fubarnetes/rctl)
5+
[![Build Status](https://img.shields.io/github/actions/workflow/status/fubarnetes/rctl/ci.yml?branch=master&style=flat-square)](https://github.com/fubarnetes/rctl/actions/workflows/ci.yml?query=branch%3Amaster)
66
[![Code Coverage](https://img.shields.io/codecov/c/github/fubarnetes/rctl.svg?logo=codecov&style=flat-square)](https://codecov.io/gh/fubarnetes/rctl)
77
[![Crates.io](https://img.shields.io/crates/v/rctl.svg?style=flat-square)](https://crates.io/crates/rctl)
88
[![GitHub last commit](https://img.shields.io/github/last-commit/fubarnetes/rctl.svg?style=flat-square)](https://github.com/fubarnetes/librctl-rs/commits/master)

0 commit comments

Comments
 (0)