mirror of
https://github.com/sudo-project/sudo.git
synced 2025-08-29 13:28:10 +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
|
version: 2.1
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
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:
|
docker:
|
||||||
- image: docker.io/sudoproject/ubuntu:latest
|
- image: docker.io/sudoproject/ubuntu:latest
|
||||||
user: build
|
user: build
|
||||||
@ -10,13 +23,14 @@ jobs:
|
|||||||
- checkout
|
- checkout
|
||||||
- run:
|
- run:
|
||||||
name: "Building and packaging sudo"
|
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)
|
# Save workspace for subsequent jobs (i.e. test)
|
||||||
- persist_to_workspace:
|
- persist_to_workspace:
|
||||||
root: .
|
root: .
|
||||||
paths:
|
paths:
|
||||||
- .
|
- .
|
||||||
test:
|
test:
|
||||||
|
description: run sudo tests in a pre-built workspace
|
||||||
docker:
|
docker:
|
||||||
- image: docker.io/sudoproject/ubuntu:latest
|
- image: docker.io/sudoproject/ubuntu:latest
|
||||||
user: build
|
user: build
|
||||||
@ -37,14 +51,32 @@ workflows:
|
|||||||
build_and_test:
|
build_and_test:
|
||||||
jobs:
|
jobs:
|
||||||
- build:
|
- 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:
|
filters:
|
||||||
branches:
|
branches:
|
||||||
only: main
|
only: main
|
||||||
- test:
|
- test:
|
||||||
filters:
|
name: test-ldap
|
||||||
# Only test the "main" branch
|
|
||||||
branches:
|
|
||||||
only: main
|
|
||||||
requires:
|
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