-
Notifications
You must be signed in to change notification settings - Fork 14
feat(build-debian): Use docker to manually run build and prepare steps and add tests #28
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
Merged
Merged
Changes from all commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
2852f91
ci(go): generate: Use go mod edit to install properly versioned tools
3v1n0 72d2374
Revert "ci(go): generate: Use go mod edit to install properly version…
didrocks b6025d3
Make debian version compliant
EduardGomezEscandell 8cf7a2d
workflows: Add workflow to test build-deb action
3v1n0 be6482d
build-debian: Clarify what artifacts are for
3v1n0 615b454
build-debian: Use stricter selection on dsc file based on env
3v1n0 79874f4
build-debian: Use manual docker build for source package
3v1n0 dc4a92e
build-debian: Expose the extra source build-deps as parameter
3v1n0 c00a6bd
build-debian: Upload source package as artifact
3v1n0 8783687
build-debian: Use manual docker run to build the debian packages
3v1n0 7cf3c3c
build-debian: Build the package as user
3v1n0 e55e0e5
build-debian: Fully disable internet access during packages build
3v1n0 63e270e
build-debian: Add DEB_BUILD_OPTIONS input
3v1n0 a28fcbf
build-debian: Use docker container also to prepare the source package
3v1n0 bd363d7
build-debian: Use more featured version number if in a git repo
3v1n0 f19243d
build-debian: Remove trailing whitespace
3v1n0 39b462f
build-debian: Show binaries contents and info after building
3v1n0 2c964f1
build-debian: Add IDs to upload steps so that can be referenced as ou…
3v1n0 f3c75c6
build-debian: Ensure we show group message as first thing
3v1n0 f17b5d9
Revert "build-debian: Add DEB_BUILD_OPTIONS input"
3v1n0 3336955
build-debian: Include distribution in changelog release
3v1n0 005736a
debian-build: Use version number so that it can override last release
3v1n0 542f160
build-debian: Install fakeroot by default
3v1n0 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,89 @@ | ||
| name: Test build debian package | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - main | ||
| paths: | ||
| - gh-actions/common/build-debian/** | ||
| - .github/workflows/test-build-deb* | ||
| pull_request: | ||
|
|
||
| env: | ||
| DEBIAN_FRONTEND: noninteractive | ||
| DEBCONF_NONINTERACTIVE_SEEN: true | ||
|
|
||
| jobs: | ||
| build_native_deb: | ||
| name: Test build native debian package | ||
| runs-on: ubuntu-latest | ||
| outputs: | ||
| pkg-name: ${{ env.PKG_NAME }} | ||
| pkg-version: ${{ env.PKG_VERSION }} | ||
|
|
||
| steps: | ||
| - name: Install dependencies | ||
| run: | | ||
| sudo apt update | ||
| sudo apt install ubuntu-dev-tools | ||
|
|
||
| - name: Get and prepare package source | ||
| run: | | ||
| set -eu | ||
|
|
||
| echo "::group::Get source" | ||
| pull-lp-source --download-only hello | ||
| dpkg-source -x hello*.dsc hello-src | ||
| rm -rf hello_* | ||
| mv -v hello-src/* . | ||
| echo "::endgroup::" | ||
|
|
||
| echo "::group::Mark package as a native package" | ||
| echo "3.0 (native)" > debian/source/format | ||
| dch -v$(dpkg-parsechangelog -S Version | cut -f1 -d-).1 \ | ||
| "Mark as native package" | ||
| echo "::endgroup::" | ||
|
|
||
| - name: Checkout code | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| path: .source | ||
|
|
||
| - name: Build package | ||
| uses: ./.source/gh-actions/common/build-debian | ||
| with: | ||
| docker-image: ubuntu:devel | ||
|
|
||
| build_source_deb: | ||
| name: Test build quilt debian package | ||
| runs-on: ubuntu-latest | ||
| outputs: | ||
| pkg-name: ${{ env.PKG_NAME }} | ||
| pkg-version: ${{ env.PKG_VERSION }} | ||
| source-pkg: ${{ steps.build-debian-source-package-upload-step.outputs.artifact-url }} | ||
| binaries: ${{ steps.build-debian-binary-packages-upload-step.outputs.artifact-url }} | ||
|
|
||
| steps: | ||
| - name: Install dependencies | ||
| run: | | ||
| sudo apt update | ||
| sudo apt install ubuntu-dev-tools | ||
|
|
||
| - name: Get package source | ||
| run: | | ||
| set -eu | ||
|
|
||
| pull-lp-source --download-only hello | ||
| dpkg-source -x hello*.dsc hello-src | ||
|
|
||
| - name: Checkout code | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| path: .source | ||
|
|
||
| - name: Build package | ||
| uses: ./.source/gh-actions/common/build-debian | ||
| with: | ||
| source-dir: ./hello-src | ||
| docker-image: ubuntu:devel | ||
| extra-source-build-deps: '' |
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.