Add build diagnostics and pre-build validation scripts #2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build DEB Package | |
| on: | |
| push: | |
| tags: | |
| - 'v*' | |
| branches: | |
| - 'ubuntu' | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| ubuntu: [focal, jammy, noble] | |
| container: ubuntu:${{ matrix.ubuntu }} | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| - name: Install build dependencies | |
| run: | | |
| apt-get update | |
| apt-get install -y \ | |
| debhelper-compat \ | |
| devscripts \ | |
| equivs \ | |
| python3-setuptools \ | |
| python3-all \ | |
| build-essential \ | |
| git | |
| - name: Install package dependencies | |
| run: | | |
| apt-get install -y \ | |
| python3-requests \ | |
| python3-websockets \ | |
| python3-colorama \ | |
| python3-tqdm | |
| - name: Build DEB package | |
| run: | | |
| debuild -us -uc -b | |
| - name: Upload DEB artifacts | |
| uses: actions/upload-artifact@v3 | |
| with: | |
| name: deb-${{ matrix.ubuntu }} | |
| path: ../adv-speedtest-cli_*.deb | |
| retention-days: 30 | |
| release: | |
| needs: build | |
| runs-on: ubuntu-latest | |
| if: startsWith(github.ref, 'refs/tags/') | |
| steps: | |
| - name: Download all artifacts | |
| uses: actions/download-artifact@v3 | |
| - name: Create Release | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| files: | | |
| deb-focal/adv-speedtest-cli_*.deb | |
| deb-jammy/adv-speedtest-cli_*.deb | |
| deb-noble/adv-speedtest-cli_*.deb | |
| draft: false | |
| prerelease: false | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |