mirror of
https://github.com/shadow-maint/shadow.git
synced 2026-01-26 14:03:17 +00:00
Before this commit, if configured with --enable-logind, but libsystemd is not found, configure silently succeed, however logind is efficiently disabled. With this commit, the configure fails if logind is not explicitly disabled and libsystemd is not found. --disable-logind is mandatory if logind integration should not be used. Automatic detection is disabled by Alejandro Colomar's request. Extra help in the error message is added by lslebodn's request. Signed-off-by: Evgeny Grin (Karlson2k) <k2k@drgrin.dev>
108 lines
2.5 KiB
YAML
108 lines
2.5 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [ master ]
|
|
pull_request:
|
|
branches: [ master ]
|
|
# Allows you to run this workflow manually from the Actions tab
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- name: debug
|
|
run: |
|
|
id
|
|
which bash
|
|
whoami
|
|
env
|
|
ps -ef
|
|
pwd
|
|
cat /proc/self/uid_map
|
|
cat /proc/self/status
|
|
systemd-detect-virt
|
|
- name: Install dependencies
|
|
id: dependencies
|
|
uses: ./.github/actions/install-dependencies
|
|
- name: configure
|
|
run: |
|
|
autoreconf -v -f --install
|
|
./autogen.sh --without-selinux --disable-man --with-yescrypt
|
|
- run: make
|
|
- run: make install DESTDIR=${HOME}/rootfs
|
|
- run: sudo make install
|
|
- name: run tests in shell with tty
|
|
shell: 'script -q -e -c "bash {0}"'
|
|
run: |
|
|
set -e
|
|
cd tests
|
|
trap 'cat testsuite.log' ERR
|
|
sudo ./run_some
|
|
trap - ERR
|
|
|
|
# Make sure that 'make dist' makes a usable tarball with no missing files
|
|
dist-build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Install dependencies
|
|
id: dependencies
|
|
uses: ./.github/actions/install-dependencies
|
|
|
|
- name: Test make dist
|
|
run: |
|
|
./autogen.sh
|
|
make dist
|
|
f=shadow-*.tar.gz
|
|
tar -zxf $f
|
|
d=$(basename $f .tar.gz)
|
|
cd $d
|
|
./configure --disable-logind
|
|
make -j5
|
|
make check
|
|
|
|
container-build:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
os: [alpine, debian, fedora, opensuse]
|
|
|
|
steps:
|
|
- uses: actions/setup-python@v5
|
|
with:
|
|
python-version: 3.11
|
|
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Install Ansible
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get -y install ansible
|
|
|
|
- name: Build container
|
|
run: |
|
|
pushd share/ansible/
|
|
ansible-playbook playbook.yml -i inventory.ini -e 'distribution=${{ matrix.os }}'
|
|
popd
|
|
|
|
- name: Store artifacts
|
|
if: always()
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: ${{ matrix.os }}-build
|
|
path: |
|
|
./share/ansible/build-out/config.log
|
|
./share/ansible/build-out/config.h
|
|
./share/ansible/build-out/build.log
|
|
./share/ansible/build-out/test-suite.log
|
|
./tests/system/pytest.log
|
|
./tests/system/artifacts
|
|
if-no-files-found: ignore
|