Skip to content

Commit

Permalink
Merge pull request #1888 from ndim/ci-test-running-built-avrdude
Browse files Browse the repository at this point in the history
CI: test running the built avrdude executable
  • Loading branch information
stefanrueger committed Aug 24, 2024
2 parents ca6e079 + c677974 commit 706336c
Showing 1 changed file with 50 additions and 10 deletions.
60 changes: 50 additions & 10 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,19 @@ jobs:
--enable-linuxspi
- name: Build
run: make -C _ambuild -j$(nproc)
- name: "avrdude -? (not installed)"
run: _ambuild/avrdude -?
- name: "Dryrun test (not installed)"
run: printf "\n\n" | ./tools/test-avrdude -v -e _ambuild/avrdude -c '-C _ambuild/avrdude.conf' -d0 -p"-cdryrun -pm2560" -p"-cdryrun -pavr64du28"
- name: Install
run: sudo make -C _ambuild install
- name: Dryrun_test
run: printf "\n\n" | ./tools/test-avrdude -e _ambuild/avrdude -c '-C _ambuild/avrdude.conf' -d0 -p"-cdryrun -pm2560" -p"-cdryrun -pavr64du28"
- name: distcheck
run: make -C _ambuild -j$(nproc) distcheck
- name: "Dryrun test (installed)"
run: >-
export LD_LIBRARY_PATH="/usr/local/lib";
printf "\n\n" | ./tools/test-avrdude -v -d0 -p"-cdryrun -pm2560" -p"-cdryrun -pavr64du28"
# Re-enable distcheck after the doc fixes
# - name: distcheck
# run: make -C _ambuild -j$(nproc) distcheck "DISTCHECK_CONFIGURE_FLAGS=--disable-doc"

linux-x86_64:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -112,10 +119,14 @@ jobs:
-B build
- name: Build
run: cmake --build build
- name: "avrdude -? (not installed)"
run: build/src/avrdude -?
- name: "Dryrun test (not installed)"
run: printf "\n\n" | ./tools/test-avrdude -v -e build/src/avrdude -c '-C build/src/avrdude.conf' -d0 -p"-cdryrun -pm2560" -p"-cdryrun -pavr64du28"
- name: Install
run: sudo cmake --build build --target install
- name: Dryrun_test
run: echo -e \\n | ./tools/test-avrdude -d0 -p"-cdryrun -pm2560" -p"-cdryrun -pavr64du28"
- name: "Dryrun test (installed)"
run: printf "\n\n" | ./tools/test-avrdude -v -d0 -p"-cdryrun -pm2560" -p"-cdryrun -pavr64du28"
- name: Archive build artifacts
if: always()
uses: actions/upload-artifact@v3
Expand Down Expand Up @@ -183,6 +194,9 @@ jobs:
-B build
- name: Build
run: cmake --build build
- name: "avrdude -? (not installed)"
if: matrix.arch == 'i386'
run: build/src/avrdude -?
- name: Archive build artifacts
if: always()
uses: actions/upload-artifact@v3
Expand Down Expand Up @@ -230,6 +244,10 @@ jobs:
-B build
- name: Build
run: cmake --build build
- name: "avrdude -? (not installed)"
run: build/src/avrdude -?
- name: "Dryrun test (not installed)"
run: printf "\n\n" | ./tools/test-avrdude -v -e build/src/avrdude -c '-C build/src/avrdude.conf' -d0 -p"-cdryrun -pm2560" -p"-cdryrun -pavr64du28"
- name: Archive build artifacts
if: always()
uses: actions/upload-artifact@v3
Expand All @@ -247,7 +265,7 @@ jobs:
build/src/avrdude
build/src/avrdude.conf
macos-x86_64_autotools:
macos-x86_64-autotools:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
Expand Down Expand Up @@ -279,7 +297,11 @@ jobs:
- name: Build
run: make -C _ambuild -j$(nproc)

- name: "avrdude -? (not installed)"
run: _ambuild/avrdude -?
- name: "Dryrun test (not installed)"
run: printf "\n\n" | ./tools/test-avrdude -v -e _ambuild/avrdude -c '-C _ambuild/avrdude.conf' -d0 -p"-cdryrun -pm2560" -p"-cdryrun -pavr64du28"

msvc:
runs-on: windows-latest
strategy:
Expand Down Expand Up @@ -311,6 +333,19 @@ jobs:
-B build
- name: Build
run: cmake --build build --config ${{env.BUILD_TYPE}}
- name: "avrdude -? (not installed)"
# FIXME: Skip running avrdude.
# The exe file on arm64 is not runnable - x86_64 perhaps?
if: matrix.arch != 'arm64'
run: build/src/${{env.BUILD_TYPE}}/avrdude.exe -?
- name: "Dryrun test (not installed)"
# FIXME: Skip running avrdude.
# The exe file on arm64 is not runnable - x86_64 perhaps?
if: matrix.arch != 'arm64'
run: |
$tmp = [System.IO.Path]::GetTempPath()
$tmp_slash = $tmp -replace '\\', '/'
Write-Host "`n`n" -NoNewline | bash tools/test-avrdude -v -t "$tmp_slash" -e build/src/${{env.BUILD_TYPE}}/avrdude.exe -c "-C build/src/avrdude.conf" -d0 -p"-cdryrun -pm2560" -p"-cdryrun -pavr64du28"
- name: Archive build artifacts
if: always()
uses: actions/upload-artifact@v3
Expand All @@ -322,8 +357,8 @@ jobs:
!**/*.obj
- name: Move executables
run: |
mv build/src/RelWithDebInfo/avrdude.exe build/src
mv build/src/RelWithDebInfo/avrdude.pdb build/src
mv build/src/${{env.BUILD_TYPE}}/avrdude.exe build/src
mv build/src/${{env.BUILD_TYPE}}/avrdude.pdb build/src
- name: Archive executables
uses: actions/upload-artifact@v3
with:
Expand Down Expand Up @@ -374,6 +409,11 @@ jobs:
-B build
- name: Build
run: cmake --build build
- name: "avrdude -? (not installed)"
run: build/src/avrdude -?
# Disabled so far due to problems writing to temp files.
# - name: "Dryrun test (not installed)"
# run: printf "\n\n" | ./tools/test-avrdude -v -e build/src/avrdude.exe -c "-C build/src/avrdude.conf" -d0 -p"-cdryrun -pm2560" -p"-cdryrun -pavr64du28"
- name: Archive build artifacts
if: always()
uses: actions/upload-artifact@v3
Expand Down

0 comments on commit 706336c

Please sign in to comment.