From 79e091b5452341eda2916a795e050fc5a709f294 Mon Sep 17 00:00:00 2001 From: Hans Ulrich Niedermann Date: Wed, 20 Nov 2024 23:32:36 +0100 Subject: [PATCH 1/4] ci: Use multi-line format to invoke configure Use the multi-line format to invoke configure with a long command line. This prepares for even longer command lines. --- .github/workflows/build.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a09042f5..0c84d5e1 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -293,8 +293,10 @@ jobs: mkdir _ambuild && cd _ambuild - CFLAGS="-I/opt/homebrew/include" LDFLAGS="-L/opt/homebrew/lib" ../src/configure - + CFLAGS="-I/opt/homebrew/include" + LDFLAGS="-L/opt/homebrew/lib" + ../src/configure + - name: Build run: make -C _ambuild -j$(nproc) - name: "avrdude -? (not installed)" From b8594d1df1daae562af1f9d981f011db0a526972 Mon Sep 17 00:00:00 2001 From: Hans Ulrich Niedermann Date: Wed, 20 Nov 2024 16:51:57 +0100 Subject: [PATCH 2/4] ci: Fix macos brew install issue with pkg-config The macos build's "brew install" command has developed a build failure without us being involved at all: Error: The `brew link` step did not complete successfully The formula built, but is not symlinked into /opt/homebrew Could not symlink bin/pkg-config Target /opt/homebrew/bin/pkg-config is a symlink belonging to pkg-config@0.29.2. You can unlink it: brew unlink pkg-config@0.29.2 This makes the macos build work again and implements the suggestions brew prints when installing bison and flex, regarding PATH, LDFLAGS, and CPPFLAGS. --- .github/workflows/build.yml | 36 ++++++++++++++++++++++++++---------- 1 file changed, 26 insertions(+), 10 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0c84d5e1..ee771db5 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -218,10 +218,12 @@ jobs: runs-on: macos-latest steps: - uses: actions/checkout@v3 + - name: Original PATH and build tools + run: | + echo "PATH=$PATH" + for b in bison flex pkg-config; do type "$b"; done - name: Install prerequisites run: >- - # brew update - brew install cmake flex @@ -233,12 +235,18 @@ jobs: libftdi readline libserialport - pkg-config + - name: Configure environment to use brew kegs for flex and bison + run: | + echo "PATH=/opt/homebrew/opt/flex/bin:/opt/homebrew/opt/bison/bin:$PATH" >> $GITHUB_ENV + - name: post-brew PATH and build tools + run: | + echo "PATH=$PATH" + for b in bison flex pkg-config; do type "$b"; done - name: Configure run: >- cmake - -D CMAKE_C_FLAGS=-I/opt/homebrew/include - -D CMAKE_EXE_LINKER_FLAGS=-L/opt/homebrew/Cellar + -D CMAKE_C_FLAGS="-I/opt/homebrew/include -I/opt/homebrew/opt/flex/include" + -D CMAKE_EXE_LINKER_FLAGS="-L/opt/homebrew/Cellar -L/opt/homebew/opt/flex/lib" -D DEBUG_CMAKE=1 -D CMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -B build @@ -269,10 +277,12 @@ jobs: runs-on: macos-latest steps: - uses: actions/checkout@v3 + - name: Original PATH and build tools + run: | + echo "PATH=$PATH" + for b in bison flex pkg-config; do type "$b"; done - name: Install prerequisites run: >- - # brew update - brew install automake autoconf @@ -286,15 +296,21 @@ jobs: libftdi readline libserialport - pkg-config + - name: Configure environment to use brew kegs for flex and bison + run: | + echo "PATH=/opt/homebrew/opt/flex/bin:/opt/homebrew/opt/bison/bin:$PATH" >> $GITHUB_ENV + - name: post-brew PATH and build tools + run: | + echo "PATH=$PATH" + for b in bison flex pkg-config; do type "$b"; done - name: Configure run: >- ./src/bootstrap mkdir _ambuild && cd _ambuild - CFLAGS="-I/opt/homebrew/include" - LDFLAGS="-L/opt/homebrew/lib" + CFLAGS="-I/opt/homebrew/include -I/opt/homebrew/opt/flex/include" + LDFLAGS="-L/opt/homebrew/lib -L/opt/homebrew/opt/bison/lib" ../src/configure - name: Build From 172474a9e9272e4f36c12bb2732adc31b979850e Mon Sep 17 00:00:00 2001 From: Hans Ulrich Niedermann Date: Wed, 20 Nov 2024 16:15:52 +0100 Subject: [PATCH 3/4] ci: Abort autotools builds in case of unsupported options Abort autotools CI builds in case we give them an unsupported option. The default is to only warn, but the CI should catch mistakes. --- .github/workflows/build.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ee771db5..bc85a8bb 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -63,6 +63,7 @@ jobs: mkdir _ambuild && cd _ambuild ../src/configure + --enable-option-checking=fatal --enable-doc --enable-parport --enable-linuxgpio @@ -312,6 +313,7 @@ jobs: CFLAGS="-I/opt/homebrew/include -I/opt/homebrew/opt/flex/include" LDFLAGS="-L/opt/homebrew/lib -L/opt/homebrew/opt/bison/lib" ../src/configure + --enable-option-checking=fatal - name: Build run: make -C _ambuild -j$(nproc) From eec1a9b2e4b476cc70a61038882bef5ce62dd83e Mon Sep 17 00:00:00 2001 From: mcuee Date: Sat, 23 Nov 2024 21:08:05 +0800 Subject: [PATCH 4/4] Update NEWS --- NEWS | 2 ++ 1 file changed, 2 insertions(+) diff --git a/NEWS b/NEWS index 88cdf02a..b65a24c5 100644 --- a/NEWS +++ b/NEWS @@ -23,6 +23,8 @@ Changes since version 8.0: - Add AVR128DAxxS parts #1918 - Update usbpids in avrdude.conf #1919 + - Add extra version information to avrdude output #1927 + - CI: Ensure only supported configure options are used (--enable-option-checking=fatal) #1934 * Internals: