Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: test running the built avrdude executable #1888

Merged
merged 6 commits into from
Aug 24, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -111,10 +118,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 @@ -181,6 +192,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 @@ -228,6 +242,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 @@ -245,7 +263,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 @@ -277,7 +295,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 @@ -309,6 +331,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 @@ -320,8 +355,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 @@ -372,6 +407,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
Loading