-
Notifications
You must be signed in to change notification settings - Fork 13
dlstreamer build workflows #405
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
3 commits
Select commit
Hold shift + click to select a range
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,107 @@ | ||
| name: Build AZL3 DLStreamer Image | ||
| on: | ||
| workflow_dispatch: # Manual runs | ||
| inputs: | ||
| ref: | ||
| description: "Branch or SHA to test (e.g. feature/x or a1b2c3)" | ||
| required: false | ||
| run_qemu_test: | ||
| description: "Run QEMU boot test after build" | ||
| required: false | ||
| default: "false" | ||
| type: choice | ||
| options: | ||
| - "true" | ||
| - "false" | ||
| push: | ||
| branches: | ||
| - main | ||
| pull_request: | ||
| branches: | ||
| - main | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| build-azl3-dlstreamer: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| ref: ${{ github.event.inputs.ref || github.ref }} | ||
| persist-credentials: false | ||
|
|
||
| - name: Set up Docker Buildx | ||
| uses: docker/setup-buildx-action@v3 | ||
|
|
||
| - name: Install Earthly | ||
| uses: earthly/actions-setup@v1 | ||
| with: | ||
| github-token: ${{ secrets.GITHUB_TOKEN }} | ||
| version: "latest" | ||
|
|
||
| - name: Install system deps | ||
| run: | | ||
| sudo apt-get update | ||
| sudo apt-get install -y qemu-system-x86 ovmf tree jq systemd-ukify mmdebstrap systemd-boot | ||
|
|
||
| - name: Set up Go | ||
| uses: actions/setup-go@v5 | ||
| with: | ||
| go-version: stable | ||
|
|
||
| - name: Prepare build script | ||
| run: | | ||
| if [ ! -f scripts/build_azl3_dlstreamer.sh ]; then | ||
| echo "scripts/build_azl3_dlstreamer.sh not found!" | ||
| exit 1 | ||
| fi | ||
| chmod +x scripts/build_azl3_dlstreamer.sh | ||
|
|
||
| - name: Run AZL3 DLStreamer Image Build | ||
| env: | ||
| RUN_QEMU_TEST: ${{ github.event.inputs.run_qemu_test }} | ||
| run: | | ||
| echo "Starting AZL3 DLStreamer image build..." | ||
| # Ensure script has access to docker group for Earthly | ||
| sudo usermod -aG docker $USER | ||
|
|
||
| # Prepare arguments with input validation | ||
| ARGS="" | ||
| case "${RUN_QEMU_TEST}" in | ||
| "true") | ||
| ARGS="--qemu-test" | ||
| echo "QEMU boot test will be run after build" | ||
| ;; | ||
| "false"|"") | ||
| echo "QEMU boot test will be skipped" | ||
| ;; | ||
| *) | ||
| echo "Invalid input for run_qemu_test: ${RUN_QEMU_TEST}" | ||
| exit 1 | ||
| ;; | ||
| esac | ||
|
|
||
| # Run the AZL3 DLStreamer image build script | ||
| ./scripts/build_azl3_dlstreamer.sh $ARGS | ||
| echo "AZL3 DLStreamer image build completed." | ||
|
|
||
| - name: Notify on failure | ||
| if: ${{ failure() && github.event_name == 'pull_request' }} | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| REVIEWER_ID: srmungar | ||
| run: | | ||
| PR_AUTHOR=$(jq --raw-output 'try .pull_request.user.login // empty' "$GITHUB_EVENT_PATH") | ||
| if [ -z "$PR_AUTHOR" ]; then | ||
| echo "PR_AUTHOR not found in event payload. Skipping notification." | ||
| exit 0 | ||
| fi | ||
| COMMENT_BODY="Hey @$PR_AUTHOR and @$REVIEWER_ID — the AZL3 DLStreamer image build has failed. Please check the logs." | ||
| curl -s -X POST \ | ||
| -H "Authorization: Bearer $GITHUB_TOKEN" \ | ||
| -H "Accept: application/vnd.github.v3+json" \ | ||
| --data "{\"body\": \"$COMMENT_BODY\"}" \ | ||
| "https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/comments" | ||
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,107 @@ | ||
| name: Build ELXR12 DLStreamer Image | ||
| on: | ||
| workflow_dispatch: # Manual runs | ||
| inputs: | ||
| ref: | ||
| description: "Branch or SHA to test (e.g. feature/x or a1b2c3)" | ||
| required: false | ||
|
arodage marked this conversation as resolved.
|
||
| run_qemu_test: | ||
| description: "Run QEMU boot test after build" | ||
| required: false | ||
| default: "false" | ||
| type: choice | ||
| options: | ||
| - "true" | ||
| - "false" | ||
| push: | ||
| branches: | ||
| - main | ||
| pull_request: | ||
| branches: | ||
| - main | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| build-elxr12-dlstreamer: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| ref: ${{ github.event.inputs.ref || github.ref }} | ||
| persist-credentials: false | ||
|
|
||
| - name: Set up Docker Buildx | ||
| uses: docker/setup-buildx-action@v3 | ||
|
|
||
| - name: Install Earthly | ||
| uses: earthly/actions-setup@v1 | ||
| with: | ||
| github-token: ${{ secrets.GITHUB_TOKEN }} | ||
| version: "latest" | ||
|
|
||
| - name: Install system deps | ||
| run: | | ||
| sudo apt-get update | ||
| sudo apt-get install -y qemu-system-x86 ovmf tree jq systemd-ukify mmdebstrap systemd-boot | ||
|
|
||
| - name: Set up Go | ||
| uses: actions/setup-go@v5 | ||
| with: | ||
| go-version: stable | ||
|
|
||
| - name: Prepare build script | ||
| run: | | ||
| if [ ! -f scripts/build_elxr12_dlstreamer.sh ]; then | ||
| echo "scripts/build_elxr12_dlstreamer.sh not found!" | ||
| exit 1 | ||
| fi | ||
| chmod +x scripts/build_elxr12_dlstreamer.sh | ||
|
|
||
| - name: Run ELXR12 DLStreamer Image Build | ||
| env: | ||
| RUN_QEMU_TEST: ${{ github.event.inputs.run_qemu_test }} | ||
| run: | | ||
| echo "Starting ELXR12 DLStreamer image build..." | ||
| # Ensure script has access to docker group for Earthly | ||
| sudo usermod -aG docker $USER | ||
|
|
||
| # Prepare arguments with input validation | ||
| ARGS="" | ||
| case "${RUN_QEMU_TEST}" in | ||
| "true") | ||
| ARGS="--qemu-test" | ||
| echo "QEMU boot test will be run after build" | ||
| ;; | ||
| "false"|"") | ||
| echo "QEMU boot test will be skipped" | ||
| ;; | ||
| *) | ||
| echo "Invalid input for run_qemu_test: ${RUN_QEMU_TEST}" | ||
| exit 1 | ||
| ;; | ||
| esac | ||
|
|
||
| # Run the ELXR12 DLStreamer image build script | ||
| ./scripts/build_elxr12_dlstreamer.sh $ARGS | ||
| echo "ELXR12 DLStreamer image build completed." | ||
|
|
||
| - name: Notify on failure | ||
| if: ${{ failure() && github.event_name == 'pull_request' }} | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| REVIEWER_ID: srmungar | ||
| run: | | ||
| PR_AUTHOR=$(jq --raw-output 'try .pull_request.user.login // empty' "$GITHUB_EVENT_PATH") | ||
| if [ -z "$PR_AUTHOR" ]; then | ||
| echo "PR_AUTHOR not found in event payload. Skipping notification." | ||
| exit 0 | ||
| fi | ||
| COMMENT_BODY="Hey @$PR_AUTHOR and @$REVIEWER_ID — the ELXR12 DLStreamer image build has failed. Please check the logs." | ||
| curl -s -X POST \ | ||
| -H "Authorization: Bearer $GITHUB_TOKEN" \ | ||
| -H "Accept: application/vnd.github.v3+json" \ | ||
| --data "{\"body\": \"$COMMENT_BODY\"}" \ | ||
| "https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/comments" | ||
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,107 @@ | ||
| name: Build EMT3 DLStreamer Image | ||
| on: | ||
| workflow_dispatch: # Manual runs | ||
| inputs: | ||
| ref: | ||
| description: "Branch or SHA to test (e.g. feature/x or a1b2c3)" | ||
| required: false | ||
|
arodage marked this conversation as resolved.
|
||
| run_qemu_test: | ||
| description: "Run QEMU boot test after build" | ||
| required: false | ||
| default: "false" | ||
| type: choice | ||
| options: | ||
| - "true" | ||
| - "false" | ||
| push: | ||
| branches: | ||
| - main | ||
| pull_request: | ||
| branches: | ||
| - main | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| build-emt3-dlstreamer: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| ref: ${{ github.event.inputs.ref || github.ref }} | ||
| persist-credentials: false | ||
|
|
||
| - name: Set up Docker Buildx | ||
| uses: docker/setup-buildx-action@v3 | ||
|
|
||
| - name: Install Earthly | ||
| uses: earthly/actions-setup@v1 | ||
| with: | ||
| github-token: ${{ secrets.GITHUB_TOKEN }} | ||
| version: "latest" | ||
|
|
||
| - name: Install system deps | ||
| run: | | ||
| sudo apt-get update | ||
| sudo apt-get install -y qemu-system-x86 ovmf tree jq systemd-ukify mmdebstrap systemd-boot | ||
|
|
||
| - name: Set up Go | ||
| uses: actions/setup-go@v5 | ||
| with: | ||
| go-version: stable | ||
|
|
||
| - name: Prepare build script | ||
| run: | | ||
| if [ ! -f scripts/build_emt3_dlstreamer.sh ]; then | ||
| echo "scripts/build_emt3_dlstreamer.sh not found!" | ||
| exit 1 | ||
| fi | ||
| chmod +x scripts/build_emt3_dlstreamer.sh | ||
|
|
||
| - name: Run EMT3 DLStreamer Image Build | ||
| env: | ||
| RUN_QEMU_TEST: ${{ github.event.inputs.run_qemu_test }} | ||
| run: | | ||
| echo "Starting EMT3 DLStreamer image build..." | ||
| # Ensure script has access to docker group for Earthly | ||
| sudo usermod -aG docker $USER | ||
|
|
||
| # Prepare arguments with input validation | ||
| ARGS="" | ||
| case "${RUN_QEMU_TEST}" in | ||
| "true") | ||
| ARGS="--qemu-test" | ||
| echo "QEMU boot test will be run after build" | ||
| ;; | ||
| "false"|"") | ||
| echo "QEMU boot test will be skipped" | ||
| ;; | ||
| *) | ||
| echo "Invalid input for run_qemu_test: ${RUN_QEMU_TEST}" | ||
| exit 1 | ||
| ;; | ||
| esac | ||
|
|
||
| # Run the EMT3 DLStreamer image build script | ||
| ./scripts/build_emt3_dlstreamer.sh $ARGS | ||
| echo "EMT3 DLStreamer image build completed." | ||
|
|
||
| - name: Notify on failure | ||
| if: ${{ failure() && github.event_name == 'pull_request' }} | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| REVIEWER_ID: srmungar | ||
| run: | | ||
| PR_AUTHOR=$(jq --raw-output 'try .pull_request.user.login // empty' "$GITHUB_EVENT_PATH") | ||
| if [ -z "$PR_AUTHOR" ]; then | ||
| echo "PR_AUTHOR not found in event payload. Skipping notification." | ||
| exit 0 | ||
| fi | ||
| COMMENT_BODY="Hey @$PR_AUTHOR and @$REVIEWER_ID — the EMT3 DLStreamer image build has failed. Please check the logs." | ||
| curl -s -X POST \ | ||
| -H "Authorization: Bearer $GITHUB_TOKEN" \ | ||
| -H "Accept: application/vnd.github.v3+json" \ | ||
| --data "{\"body\": \"$COMMENT_BODY\"}" \ | ||
| "https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/comments" | ||
Oops, something went wrong.
Oops, something went wrong.
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.