mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 19:47:45 +00:00
gh action: build and run tests on selinux
This commit is contained in:
parent
5b649f49e8
commit
1f144618e9
1 changed files with 37 additions and 0 deletions
37
.github/workflows/CICD.yml
vendored
37
.github/workflows/CICD.yml
vendored
|
@ -1034,3 +1034,40 @@ jobs:
|
||||||
echo "Running tests with --features=$f and --no-default-features"
|
echo "Running tests with --features=$f and --no-default-features"
|
||||||
cargo test --features=$f --no-default-features
|
cargo test --features=$f --no-default-features
|
||||||
done
|
done
|
||||||
|
|
||||||
|
test_selinux:
|
||||||
|
name: Build/SELinux
|
||||||
|
needs: [ min_version, deps ]
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
persist-credentials: false
|
||||||
|
- uses: dtolnay/rust-toolchain@stable
|
||||||
|
- name: Setup Lima
|
||||||
|
uses: lima-vm/lima-actions/setup@v1
|
||||||
|
id: lima-actions-setup
|
||||||
|
- name: Cache ~/.cache/lima
|
||||||
|
uses: actions/cache@v4
|
||||||
|
with:
|
||||||
|
path: ~/.cache/lima
|
||||||
|
key: lima-${{ steps.lima-actions-setup.outputs.version }}
|
||||||
|
- name: Start Fedora VM with SELinux
|
||||||
|
run: limactl start --plain --name=default --cpus=1 --disk=30 --memory=4 --network=lima:user-v2 template://fedora
|
||||||
|
- name: Setup SSH
|
||||||
|
uses: lima-vm/lima-actions/ssh@v1
|
||||||
|
- name: Setup Rust and other build deps in VM
|
||||||
|
run: |
|
||||||
|
lima sudo dnf install gcc g++ git rustup libselinux-devel clang-devel -y
|
||||||
|
lima rustup-init -y --default-toolchain stable
|
||||||
|
- name: Verify SELinux Status
|
||||||
|
run: |
|
||||||
|
lima getenforce
|
||||||
|
lima ls -laZ /etc/selinux
|
||||||
|
- name: Clone Repository
|
||||||
|
run: |
|
||||||
|
lima git clone $GITHUB_SERVER_URL/$GITHUB_REPOSITORY
|
||||||
|
- name: Build and Test with SELinux
|
||||||
|
run: |
|
||||||
|
lima df -h
|
||||||
|
lima bash -c "cd coreutils && cargo test --features 'feat_selinux'"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue