mirror of
https://github.com/sudo-project/sudo.git
synced 2025-08-22 01:49:11 +00:00
circleci: test multiple build options
We now do separate builds with LDAP/SSSD enabled, logsrv client/server disabled, and static-sudoers enabled.
This commit is contained in:
parent
eaee7a0ebe
commit
25129cb775
@ -1,8 +1,21 @@
|
||||
# TODO: use matrix to test different build options and linux distros
|
||||
version: 2.1
|
||||
|
||||
jobs:
|
||||
build:
|
||||
description: Configure, build and package sudo
|
||||
parameters:
|
||||
ldap:
|
||||
description: if true, build sudo's LDAP support
|
||||
default: false
|
||||
type: boolean
|
||||
static_sudoers:
|
||||
description: if true, build sudoers statically
|
||||
default: false
|
||||
type: boolean
|
||||
logsrvd:
|
||||
description: if true, build sudo_logsrvd and sudoers client
|
||||
default: true
|
||||
type: boolean
|
||||
docker:
|
||||
- image: docker.io/sudoproject/ubuntu:latest
|
||||
user: build
|
||||
@ -10,13 +23,14 @@ jobs:
|
||||
- checkout
|
||||
- run:
|
||||
name: "Building and packaging sudo"
|
||||
command: ./scripts/mkpkg --flavor=ldap --enable-warnings --enable-werror --enable-sanitizer
|
||||
command: ./scripts/mkpkg <<# parameters.ldap >>--flavor=ldap --with-sssd --with-sssd-lib=/usr/lib/x86_64-linux-gnu <</ parameters.ldap >><<^ parameters.logsrvd >>--disable-log-server --disable-log-client <</ parameters.logsrvd >><<# parameters.static_sudoers >>--enable-static-sudoers <</ parameters.static_sudoers >>--enable-warnings --enable-werror --enable-sanitizer
|
||||
# Save workspace for subsequent jobs (i.e. test)
|
||||
- persist_to_workspace:
|
||||
root: .
|
||||
paths:
|
||||
- .
|
||||
test:
|
||||
description: run sudo tests in a pre-built workspace
|
||||
docker:
|
||||
- image: docker.io/sudoproject/ubuntu:latest
|
||||
user: build
|
||||
@ -37,14 +51,32 @@ workflows:
|
||||
build_and_test:
|
||||
jobs:
|
||||
- build:
|
||||
# Only build the "main" branch
|
||||
name: build-ldap
|
||||
ldap: true
|
||||
filters:
|
||||
branches:
|
||||
only: main
|
||||
- build:
|
||||
name: build-static-sudoers
|
||||
static_sudoers: true
|
||||
filters:
|
||||
branches:
|
||||
only: main
|
||||
- build:
|
||||
name: build-nologsrvd
|
||||
logsrvd: false
|
||||
filters:
|
||||
branches:
|
||||
only: main
|
||||
- test:
|
||||
filters:
|
||||
# Only test the "main" branch
|
||||
branches:
|
||||
only: main
|
||||
name: test-ldap
|
||||
requires:
|
||||
- build
|
||||
- build-ldap
|
||||
- test:
|
||||
name: test-static-sudoers
|
||||
requires:
|
||||
- build-static-sudoers
|
||||
- test:
|
||||
name: test-nologsrvd
|
||||
requires:
|
||||
- build-nologsrvd
|
||||
|
Loading…
x
Reference in New Issue
Block a user