43 lines
1019 B
YAML
43 lines
1019 B
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [ "main" ]
|
|
pull_request:
|
|
branches: [ "main" ]
|
|
|
|
env:
|
|
CARGO_TERM_COLOR: always
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
container:
|
|
image: ubuntu:24.04
|
|
options: --cap-add=SYS_ADMIN
|
|
steps:
|
|
- name: Set up container image
|
|
run: |
|
|
apt-get update
|
|
apt-get install -y nodejs sudo
|
|
- uses: actions/checkout@v6
|
|
- uses: dtolnay/rust-toolchain@stable
|
|
with:
|
|
components: rustfmt
|
|
- name: Check format
|
|
run: cargo fmt --check
|
|
- name: Install build dependencies
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y pkg-config libssl-dev
|
|
- name: Build
|
|
run: cargo build
|
|
- name: Install runtime system dependencies
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y pristine-tar sbuild mmdebstrap util-linux dpkg-dev
|
|
- name: Run tests with verbose logging (timeout 30min)
|
|
env:
|
|
RUST_LOG: debug
|
|
run: timeout 30m cargo test -- --nocapture
|