Skip to content

Commit 5c0d478

Browse files
authored
Merge pull request #1934 from ndim/enable-option-checking=fatal
CI: Ensure only supported configure options are used (--enable-option-checking=fatal)
2 parents 0b92721 + 172474a commit 5c0d478

File tree

1 file changed

+30
-10
lines changed

1 file changed

+30
-10
lines changed

.github/workflows/build.yml

Lines changed: 30 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ jobs:
6363
mkdir _ambuild && cd _ambuild
6464
6565
../src/configure
66+
--enable-option-checking=fatal
6667
--enable-doc
6768
--enable-parport
6869
--enable-linuxgpio
@@ -218,10 +219,12 @@ jobs:
218219
runs-on: macos-latest
219220
steps:
220221
- uses: actions/checkout@v3
222+
- name: Original PATH and build tools
223+
run: |
224+
echo "PATH=$PATH"
225+
for b in bison flex pkg-config; do type "$b"; done
221226
- name: Install prerequisites
222227
run: >-
223-
# brew update
224-
225228
brew install
226229
cmake
227230
flex
@@ -233,12 +236,18 @@ jobs:
233236
libftdi
234237
readline
235238
libserialport
236-
pkg-config
239+
- name: Configure environment to use brew kegs for flex and bison
240+
run: |
241+
echo "PATH=/opt/homebrew/opt/flex/bin:/opt/homebrew/opt/bison/bin:$PATH" >> $GITHUB_ENV
242+
- name: post-brew PATH and build tools
243+
run: |
244+
echo "PATH=$PATH"
245+
for b in bison flex pkg-config; do type "$b"; done
237246
- name: Configure
238247
run: >-
239248
cmake
240-
-D CMAKE_C_FLAGS=-I/opt/homebrew/include
241-
-D CMAKE_EXE_LINKER_FLAGS=-L/opt/homebrew/Cellar
249+
-D CMAKE_C_FLAGS="-I/opt/homebrew/include -I/opt/homebrew/opt/flex/include"
250+
-D CMAKE_EXE_LINKER_FLAGS="-L/opt/homebrew/Cellar -L/opt/homebew/opt/flex/lib"
242251
-D DEBUG_CMAKE=1
243252
-D CMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
244253
-B build
@@ -269,10 +278,12 @@ jobs:
269278
runs-on: macos-latest
270279
steps:
271280
- uses: actions/checkout@v3
281+
- name: Original PATH and build tools
282+
run: |
283+
echo "PATH=$PATH"
284+
for b in bison flex pkg-config; do type "$b"; done
272285
- name: Install prerequisites
273286
run: >-
274-
# brew update
275-
276287
brew install
277288
automake
278289
autoconf
@@ -286,15 +297,24 @@ jobs:
286297
libftdi
287298
readline
288299
libserialport
289-
pkg-config
300+
- name: Configure environment to use brew kegs for flex and bison
301+
run: |
302+
echo "PATH=/opt/homebrew/opt/flex/bin:/opt/homebrew/opt/bison/bin:$PATH" >> $GITHUB_ENV
303+
- name: post-brew PATH and build tools
304+
run: |
305+
echo "PATH=$PATH"
306+
for b in bison flex pkg-config; do type "$b"; done
290307
- name: Configure
291308
run: >-
292309
./src/bootstrap
293310
294311
mkdir _ambuild && cd _ambuild
295312
296-
CFLAGS="-I/opt/homebrew/include" LDFLAGS="-L/opt/homebrew/lib" ../src/configure
297-
313+
CFLAGS="-I/opt/homebrew/include -I/opt/homebrew/opt/flex/include"
314+
LDFLAGS="-L/opt/homebrew/lib -L/opt/homebrew/opt/bison/lib"
315+
../src/configure
316+
--enable-option-checking=fatal
317+
298318
- name: Build
299319
run: make -C _ambuild -j$(nproc)
300320
- name: "avrdude -? (not installed)"

0 commit comments

Comments
 (0)