11version : 2.1
22
33jobs :
4- build :
5- description : Configure, build and package sudo
4+ build_linux :
5+ description : Configure, build and package sudo (Linux)
66 parameters :
77 ldap :
88 description : if true, build sudo's LDAP support
@@ -30,15 +30,15 @@ jobs:
3030 steps :
3131 - checkout
3232 - run :
33- name : " Building and packaging sudo"
33+ name : " Building and packaging sudo (Linux) "
3434 command : ./scripts/mkpkg <<# parameters.ldap >>--flavor=ldap --with-sssd --with-sssd-lib=/usr/lib/x86_64-linux-gnu <</ parameters.ldap >><<# parameters.wolfssl >>--enable-wolfssl <</ parameters.wolfssl >><<^ parameters.logsrvd >>--disable-log-server --disable-log-client <</ parameters.logsrvd >><<^ parameters.intercept >>--disable-intercept <</ parameters.intercept >><<# parameters.static_sudoers >>--enable-static-sudoers <</ parameters.static_sudoers >>--enable-warnings --enable-werror --enable-sanitizer
3535 # Save workspace for subsequent jobs (i.e. test)
3636 - persist_to_workspace :
3737 root : .
3838 paths :
3939 - .
40- test :
41- description : run sudo tests in a pre-built workspace
40+ test_linux :
41+ description : run sudo tests in a pre-built workspace (Linux)
4242 docker :
4343 - image : docker.io/sudoproject/ubuntu:latest
4444 user : build
@@ -47,64 +47,99 @@ jobs:
4747 - attach_workspace :
4848 at : .
4949 - run :
50- name : " Running tests"
50+ name : " Running tests (Linux) "
5151 command : make check
5252 environment :
5353 # Leak sanitizer requires ptrace, disable it
5454 ASAN_OPTIONS : detect_leaks=0
5555
56+ build_macos :
57+ description : Configure, build and package sudo (macOS)
58+ macos :
59+ xcode : 13.2.1 # indicate our selected version of Xcode
60+ steps :
61+ - checkout
62+ - run :
63+ name : " Building and packaging sudo (macOS)"
64+ command : ./scripts/mkpkg --enable-warnings
65+ # Save workspace for subsequent jobs (i.e. test)
66+ - persist_to_workspace :
67+ root : .
68+ paths :
69+ - .
70+ test_macos :
71+ description : run sudo tests in a pre-built workspace (macOS)
72+ macos :
73+ xcode : 13.2.1 # indicate our selected version of Xcode
74+ steps :
75+ # Reuse the workspace from the build job
76+ - attach_workspace :
77+ at : .
78+ - run :
79+ name : " Running tests (macOS)"
80+ command : make check
81+
5682# Orchestrate our job run sequence
5783workflows :
5884 version : 2
5985 build_and_test :
6086 jobs :
61- - build :
62- name : build-ldap
87+ - build_linux :
88+ name : build-linux- ldap
6389 ldap : true
6490 filters :
6591 branches :
6692 only : main
67- - build :
68- name : build-wolfssl
93+ - build_linux :
94+ name : build-linux- wolfssl
6995 wolfssl : true
7096 filters :
7197 branches :
7298 only : main
73- - build :
74- name : build-static-sudoers
99+ - build_linux :
100+ name : build-linux- static-sudoers
75101 static_sudoers : true
76102 filters :
77103 branches :
78104 only : main
79- - build :
80- name : build-nologsrvd
105+ - build_linux :
106+ name : build-linux- nologsrvd
81107 logsrvd : false
82108 filters :
83109 branches :
84110 only : main
85- - build :
86- name : build-nointercept
111+ - build_linux :
112+ name : build-linux- nointercept
87113 logsrvd : false
88114 filters :
89115 branches :
90116 only : main
91- - test :
92- name : test-ldap
117+ - build_macos :
118+ name : build-macos
119+ filters :
120+ branches :
121+ only : main
122+ - test_linux :
123+ name : test-linux-ldap
124+ requires :
125+ - build-linux-ldap
126+ - test_linux :
127+ name : test-linux-wolfssl
93128 requires :
94- - build-ldap
95- - test :
96- name : test-wolfssl
129+ - build-linux-wolfssl
130+ - test_linux :
131+ name : test-linux-static-sudoers
97132 requires :
98- - build-wolfssl
99- - test :
100- name : test-static-sudoers
133+ - build-linux-static-sudoers
134+ - test_linux :
135+ name : test-linux-nologsrvd
101136 requires :
102- - build-static-sudoers
103- - test :
104- name : test-nologsrvd
137+ - build-linux-nologsrvd
138+ - test_linux :
139+ name : test-linux-nointercept
105140 requires :
106- - build-nologsrvd
107- - test :
108- name : test-nointercept
141+ - build-linux-nointercept
142+ - test_macos :
143+ name : test-macos
109144 requires :
110- - build-nointercept
145+ - build-macos
0 commit comments