Skip to content

Disable man-db update triggers in workflows#483

Merged
zcsahok merged 1 commit intoTlf:masterfrom
zcsahok:disable_mandb_trigger
Sep 27, 2025
Merged

Disable man-db update triggers in workflows#483
zcsahok merged 1 commit intoTlf:masterfrom
zcsahok:disable_mandb_trigger

Conversation

@zcsahok
Copy link
Copy Markdown
Member

@zcsahok zcsahok commented Sep 26, 2025

apt update in workflows triggers a potentially lengthy and completely useless man.db update.

A good run -- update was quick:
image

A bad run -- took twice as much time
image

The fix disables man-db update upon installing packages.
(see also actions/runner-images#10977)

@N0NB
Copy link
Copy Markdown
Member

N0NB commented Sep 27, 2025

Good idea! I think I'll borrow that for the Hamlib CI workflow.

@zcsahok zcsahok merged commit 4e32b3a into Tlf:master Sep 27, 2025
2 checks passed
@zcsahok zcsahok deleted the disable_mandb_trigger branch September 27, 2025 06:13
@N0NB
Copy link
Copy Markdown
Member

N0NB commented Sep 27, 2025

Zoli, have you worked out how to only tar and upload artifacts if the build fails? Right now in the Hamlib workflow is tars up everything and uploads on success which is kind of useless. When something breaks being able to view the build artifacts is more useful me, I would think.

@zcsahok
Copy link
Copy Markdown
Member Author

zcsahok commented Sep 28, 2025

@N0NB I had a similar requirement in TLF: show test failures but only if tests were actually failed.
Here's what I did ('id+'continue-on-error' and the 'if' line)

    - name: Run tests
      id: run_tests
      continue-on-error: true
      run: make check
    - name: Show failed test results
      if: ${{ steps.run_tests.outcome == 'failure' }}
      run: |
        for f in test/run_*.log; do
            grep -q FAILED $f && echo -e "\n>>> $f:\n" && cat $f
        done
        exit 1

For Hamlib it would be something like

    - name: make distcheck
      id: make_distcheck
      continue-on-error: true
      run: make distcheck ...
    - name: 'tar files'
      if: ${{ steps.make_distcheck.outcome == 'failure' }}
      run: tar -cvf ubuntu_latest_features.tar $(pwd)
    - name: 'Upload failed Build Artifact'
      if: ${{ steps.make_distcheck.outcome == 'failure' }}
      uses: actions/upload-artifact@v4.6.2
      with:
        name: 'Ubuntu_latest_features'
        path: ubuntu_latest_features.tar

@N0NB
Copy link
Copy Markdown
Member

N0NB commented Sep 28, 2025

Thanks very much for that.

I try to make sense of their documentation but it seems to go off into the weeds for me rather quickly and gets to topics that have no relevance to our project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants