Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Les cibles musl embarquent leur CRT (self-contained) : rust-lld suffit pour
# lier un binaire statique, y compris en compilation croisée depuis arm64.
# musl targets ship their own CRT (self-contained): rust-lld is enough to link
# a static binary, including when cross-compiling from arm64.
[target.x86_64-unknown-linux-musl]
linker = "rust-lld"

Expand Down
20 changes: 10 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
targets: x86_64-unknown-linux-musl
- uses: Swatinem/rust-cache@v2
- run: cargo build --release --target x86_64-unknown-linux-musl
- name: Vérifier que le binaire est statique
- name: Check that the binary is static
run: |
bin=target/x86_64-unknown-linux-musl/release/envprobe
file "$bin"
Expand All @@ -51,25 +51,25 @@ jobs:
with:
name: envprobe-x86_64-linux-musl
- run: chmod +x envprobe
- name: Utilisateur normal
- name: Normal user
run: ./envprobe | tee user.txt
- name: Root
run: sudo ./envprobe | tee root.txt
- name: La sortie diffère selon les privilèges
- name: Output differs with privileges
run: |
! diff -q user.txt root.txt
grep -E '^ CAP_BPF +non' user.txt
grep -E '^ CAP_BPF +oui' root.txt
- name: Conteneurs Docker par défaut
grep -E '^ CAP_BPF +no' user.txt
grep -E '^ CAP_BPF +yes' root.txt
- name: Default Docker containers
run: |
for image in debian:12 alpine:3.20 rockylinux:9; do
echo "::group::$image"
docker run --rm -v "$PWD/envprobe:/envprobe:ro" "$image" /envprobe | tee "docker-${image%%:*}.txt"
grep -E '^ container +docker' "docker-${image%%:*}.txt"
grep -E '^ seccomp +filtre' "docker-${image%%:*}.txt"
grep -E '^ seccomp +filter' "docker-${image%%:*}.txt"
echo "::endgroup::"
done
- name: Rapports JSON et diff hôte / Alpine
- name: JSON reports and host / Alpine diff
run: |
./envprobe --json > host.json
sudo ./envprobe --json > host-root.json
Expand All @@ -85,8 +85,8 @@ jobs:
grep -q '^\[libc\]' diff.txt
grep -q '^\[shell\]' diff.txt
grep -q '^\[packages\]' diff.txt
# Même noyau : la release ne change pas. La config peut manquer dans
# le conteneur (/boot absent), d'où la vérification sur release seule.
# Same kernel: the release does not change. The config can be missing in
# the container (no /boot), hence the check on release only.
! grep -qE '^[-+] release ' diff.txt
- uses: actions/upload-artifact@v4
with:
Expand Down
22 changes: 11 additions & 11 deletions .github/workflows/matrix.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Matrice
name: Matrix

# Dogfooding : distroproof lance envprobe dans des VM de chaque distro cible
# (distroproof.toml) et publie un résumé Markdown sur la PR.
# Dogfooding: distroproof runs envprobe in VMs of each target distro
# (distroproof.toml) and posts a Markdown summary on the PR.

on:
pull_request:
Expand All @@ -21,15 +21,15 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Activer KVM
- name: Enable KVM
run: |
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' \
| sudo tee /etc/udev/rules.d/99-kvm4all.rules
sudo udevadm control --reload-rules
sudo udevadm trigger --name-match=kvm
ls -l /dev/kvm

- name: Installer QEMU et OVMF
- name: Install QEMU and OVMF
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends qemu-system-x86 qemu-utils ovmf
Expand All @@ -40,8 +40,8 @@ jobs:
- uses: Swatinem/rust-cache@v2
- run: cargo build --release --target x86_64-unknown-linux-musl

# Images cloud et noyaux extraits : renouvelés chaque semaine pour
# suivre les mises à jour des distros.
# Cloud images and extracted kernels: renewed every week to follow
# distro updates.
- id: week
run: echo "week=$(date +%G-%V)" >> "$GITHUB_OUTPUT"
- uses: actions/cache@v4
Expand All @@ -50,18 +50,18 @@ jobs:
key: distroproof-images-${{ steps.week.outputs.week }}-${{ hashFiles('distroproof.toml') }}
restore-keys: distroproof-images-

- name: Lancer la matrice
- name: Run the matrix
run: |
set +e
target/x86_64-unknown-linux-musl/release/distroproof up --no-tui --jobs 3 \
--json matrix.json --junit junit.xml --markdown summary.md
echo "code=$?" >> "$GITHUB_ENV"

- name: Résumé
- name: Summary
if: always()
run: cat summary.md >> "$GITHUB_STEP_SUMMARY"

- name: Commentaire de PR
- name: PR comment
if: always() && github.event_name == 'pull_request'
continue-on-error: true
env:
Expand All @@ -79,5 +79,5 @@ jobs:
junit.xml
summary.md

- name: Code de sortie de la matrice
- name: Matrix exit code
run: exit "$code"
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ members = ["crates/envprobe-core", "crates/envprobe", "crates/distroproof"]
version = "0.1.0"
edition = "2021"
license = "MIT OR Apache-2.0"
repository = "https://github.com/moha-bekh/distroproof"
repository = "https://github.com/devutils-org/distroproof"

[workspace.dependencies]
envprobe-core = { path = "crates/envprobe-core" }
Expand All @@ -25,7 +25,7 @@ toml = "1"
tui-term = "0.3"
vt100 = "0.16"

# Le hachage des images (plusieurs centaines de Mio) reste rapide en debug.
# Keeps image hashing (several hundred MiB) fast in debug builds.
[profile.dev.package.sha2]
opt-level = 3

Expand Down
Loading
Loading