-
-
Notifications
You must be signed in to change notification settings - Fork 52
chore: Build custom UE Linux Docker images to update CI #864
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
26 commits
Select commit
Hold shift + click to select a range
73721b8
Add workflow for building UE Linux Docker images
tustanivsky bd66101
Test
tustanivsky 62561d1
Switch to using Linux containers
tustanivsky 69b7e8d
Test
tustanivsky 52ee5cb
Test
tustanivsky 276b74d
Switch to Linux runner
tustanivsky 25e118c
Test
tustanivsky c654850
Update ue-docker-linux.yml
tustanivsky 06782c5
Test CI run with custom Linux container
tustanivsky 05d1ede
Fix ghrc auth
tustanivsky 679b6d1
Add env
tustanivsky 2467878
Remove extra arm64 setup
tustanivsky 6a2d26a
Fix caching
tustanivsky b5c531c
Merge branch 'main' into ci/linux-images
tustanivsky 4ddee15
Add more engine versions for linux test
tustanivsky b3e8d4f
Try tag for ue 5.0
tustanivsky 3c96514
Revert
tustanivsky e46fa76
Try ubuntu 20.04 for UE 5.0
tustanivsky 7cb32d9
Fix
tustanivsky b1b39db
Update ue-docker-linux.yml
tustanivsky b1c2056
Update ue-docker-linux.yml
tustanivsky d9541b4
Update ue-docker-linux.yml
tustanivsky 01a65dd
Update workflows
tustanivsky 644047f
Update ue-docker-linux.yml
tustanivsky a6451a1
Update .github/workflows/test-linux.yml
tustanivsky 7a51b8c
Update .github/workflows/ue-docker-linux.yml
tustanivsky 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
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
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
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,106 @@ | ||
| name: Build UE Linux Docker image | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
| inputs: | ||
| ue_version: | ||
| description: Select Unreal Engine version | ||
| required: true | ||
| type: choice | ||
| options: | ||
| - 4.27 | ||
| - 5.1 | ||
| - 5.2 | ||
| - 5.3 | ||
| - 5.4 | ||
| - 5.5 | ||
| ue_repo: | ||
| description: Set Unreal Engine repository | ||
| required: true | ||
| type: string | ||
| default: 'https://github.com/getsentry/UnrealEngine.git' | ||
| clean_disk: | ||
| description: Clean up disk space before Docker build | ||
| required: true | ||
| type: boolean | ||
| default: false | ||
|
|
||
| env: | ||
| REGISTRY: ghcr.io | ||
|
|
||
| jobs: | ||
| build: | ||
| name: 'Build for UE ${{ inputs.ue_version }}' | ||
| runs-on: ubuntu-latest-32-cores | ||
|
|
||
| permissions: | ||
| contents: read | ||
| packages: write | ||
|
|
||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
|
|
||
| # Building docker images for newer UE versions may require extra disk space | ||
| - name: Clean up disk space before Docker build | ||
| if: ${{ inputs.clean_disk == true }} | ||
| run: | | ||
| # time df -h | ||
| sudo time swapoff -a | ||
| sudo time rm -f /swapfile | ||
| sudo time rm -rf /usr/local/lib/android | ||
| sudo time rm -rf /usr/share/dotnet | ||
| sudo time rm -rf /usr/share/swift | ||
| sudo time rm -rf /usr/local/share/powershell | ||
| sudo time rm -rf /usr/local/.ghcup | ||
| sudo time rm -rf /usr/local/lib/node_modules | ||
| sudo time rm -rf /usr/local/share/boost | ||
| sudo time rm -rf /usr/lib/google-cloud-sdk | ||
| sudo time rm -rf /usr/lib/jvm | ||
| sudo time rm -rf /opt/pipx | ||
| sudo time rm -rf /opt/ghc | ||
| sudo time rm -rf "$AGENT_TOOLSDIRECTORY" | ||
| sudo time apt-get clean | ||
| sudo time rm -rf /var/lib/apt/lists/* | ||
| # time docker rmi $(docker image ls -aq) | ||
| # time du --max-depth=3 --threshold=100M -h /usr /opt /var 2>/dev/null | sort -hr | ||
| df -h | ||
|
|
||
| - name: Set up Python | ||
| uses: actions/setup-python@v4 | ||
| with: | ||
| python-version: '3.12.8' | ||
| architecture: 'x64' | ||
|
|
||
| - name: Install unreal-docker | ||
| run: | | ||
| pip install ue4-docker | ||
|
|
||
| - name: Configure unreal-docker | ||
| run: | | ||
| ue4-docker setup | ||
|
|
||
| - name: Build Unreal Engine Docker image | ||
| run: | | ||
| ue4-docker build custom -repo="${{ inputs.ue_repo }}" -branch="${{ inputs.ue_version }}" \ | ||
| -basetag ubuntu22.04 \ | ||
| -suffix "${{ inputs.ue_version }}" \ | ||
| -username=${{ secrets.DOCKER_USERNAME }} \ | ||
| -password=${{ secrets.DOCKER_TOKEN }} \ | ||
| --linux \ | ||
| --target minimal \ | ||
| --exclude debug \ | ||
| --exclude templates \ | ||
| --exclude ddc | ||
|
|
||
| - name: Log in to GitHub package registry | ||
| uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a | ||
| with: | ||
| registry: ${{ env.REGISTRY }} | ||
| username: ${{ github.actor }} | ||
| password: ${{ secrets.GITHUB_TOKEN }} | ||
|
|
||
| - name: Tag and push Docker image with pre-built Unreal Engine | ||
| run: | | ||
| docker tag adamrehn/ue4-minimal:custom-${{ inputs.ue_version }} ${{ env.REGISTRY }}/getsentry/unreal-docker:${{ inputs.ue_version }}-linux | ||
| docker push ${{ env.REGISTRY }}/getsentry/unreal-docker:${{ inputs.ue_version }}-linux |
File renamed without changes.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's old enough we could prob remove support btw. Looking at numbers seems to be safe.
Or just call it 'best effort'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While supporting older engine versions (UE4 and "early" UE5) doesn't require significant effort on our side it makes sense to continue running CI checks for these when possible.
There are still quite a few orgs using 4.27 and since Epic made a lot of API changes between 5.0 and 5.2 we'll need to handle some version-specific code anyway.