Skip to content

Commit

Permalink
ci: Where possible, dryrun tests on uninstalled avrdude
Browse files Browse the repository at this point in the history
This adds dryrun tests for uninstalled avrdude.

Tests on installed avrdude are kept where they exist,
but not added for all possible platforms.

Quick table showing testing of built avrdude, installation of avrdude,
and testing of installed avrdude and whether that
happens/succeeds/fails:

                              test              test
                              built   install   installed
    linux-x64_64-autotools  | succ   | yes    | succ
    linux-x86_64            | succ   | yes    | succ
    linux (cross-compile)   | n/a    | no     | <--
    macos-x86_64            | succ   | no     | <--
    macos-x86_64-autotools  | succ   | no     | <--
    msvc                    | succ   | broken | <--
    mingw                   | fail   | no     | <--
  • Loading branch information
ndim committed Aug 24, 2024
1 parent f8c5eda commit 17c8d75
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,12 @@ jobs:
--enable-linuxspi
- name: Build
run: make -C _ambuild -j$(nproc)
- 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 -v -e _ambuild/avrdude -c '-C _ambuild/avrdude.conf' -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"
# Re-enable distcheck after the doc fixes
# - name: distcheck
# run: make -C _ambuild -j$(nproc) distcheck "DISTCHECK_CONFIGURE_FLAGS=--disable-doc"
Expand Down Expand Up @@ -112,9 +114,11 @@ jobs:
-B build
- name: Build
run: cmake --build build
- 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
- 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()
Expand Down Expand Up @@ -229,6 +233,8 @@ jobs:
-B build
- name: Build
run: cmake --build build
- 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 Down Expand Up @@ -278,7 +284,9 @@ jobs:
- name: Build
run: make -C _ambuild -j$(nproc)

- 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 @@ -310,6 +318,8 @@ jobs:
-B build
- name: Build
run: cmake --build build --config ${{env.BUILD_TYPE}}
- name: "Dryrun test (not installed)"
run: Write-Host "`n`n" -NoNewline | Invoke-Expression -Command './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 Expand Up @@ -373,6 +383,8 @@ jobs:
-B build
- name: Build
run: cmake --build build
- 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 17c8d75

Please sign in to comment.