Skip to content

Commit c1c74e7

Browse files
committed
XXX try the brew instructions for flex and bison kegs
1 parent e78ec88 commit c1c74e7

File tree

1 file changed

+13
-9
lines changed

1 file changed

+13
-9
lines changed

.github/workflows/build.yml

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -222,11 +222,7 @@ jobs:
222222
- name: Print original PATH
223223
run: |
224224
echo "PATH=$PATH"
225-
type flex
226-
type bison
227-
# - name: Configure environment to use brew kegs for flex and bison
228-
# run: |
229-
# echo "PATH=/opt/homebrew/opt/flex/bin:/opt/homebrew/opt/bison/bin:$PATH" >> $GITHUB_ENV
225+
for b in bison flex pkg-config; do type "$b"; done
230226
- name: Install prerequisites
231227
run: >-
232228
brew install
@@ -240,15 +236,18 @@ jobs:
240236
libftdi
241237
readline
242238
libserialport
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
243242
- name: Print PATH after brew install
244243
run: |
245244
echo "PATH=$PATH"
246245
for b in bison flex pkg-config; do type "$b"; done
247246
- name: Configure
248247
run: >-
249248
cmake
250-
-D CMAKE_C_FLAGS=-I/opt/homebrew/include
251-
-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"
252251
-D DEBUG_CMAKE=1
253252
-D CMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
254253
-B build
@@ -298,14 +297,19 @@ jobs:
298297
run: |
299298
echo "PATH=$PATH"
300299
for b in bison flex pkg-config; do type "$b"; done
300+
ls /opt/homebrew/include
301+
ls /opt/homebrew/lib
301302
- name: Configure
302303
run: >-
303304
./src/bootstrap
304305
305306
mkdir _ambuild && cd _ambuild
306307
307-
CFLAGS="-I/opt/homebrew/include" LDFLAGS="-L/opt/homebrew/lib" ../src/configure --enable-option-checking=fatal
308-
308+
CFLAGS="-I/opt/homebrew/include -I/opt/homebrew/opt/flex/include"
309+
LDFLAGS="-L/opt/homebrew/lib -L/opt/homebrew/opt/bison/lib"
310+
../src/configure
311+
--enable-option-checking=fatal
312+
309313
- name: Build
310314
run: make -C _ambuild -j$(nproc)
311315
- name: "avrdude -? (not installed)"

0 commit comments

Comments
 (0)