Skip to content

Build

Build #1314

Workflow file for this run

name: Build
on:
push:
branches: [main]
schedule:
- cron: "0 0 * * *"
jobs:
sources:
name: Get source data
runs-on: ubuntu-latest
outputs:
outcome: ${{steps.commit.outcome}}
steps:
- name: Checkout
uses: actions/checkout@v6
with:
persist-credentials: false
- name: Setup Python
uses: actions/setup-python@v6
with:
python-version: pypy3.9
cache: pip
- name: Install Python Dependencies
run: pip install -r requirements.txt
- name: Get Unreal Engine Ref
uses: octokit/request-action@v2.x
id: get-unreal-ref
with:
route: GET /repos/EpicGames/UnrealEngine/branches/ue5-main
env:
GITHUB_TOKEN: ${{secrets.PAT_TOKEN}}
- name: Cache Unreal Engine
id: cache-unreal
uses: actions/cache@v5
with:
path: unreal
key: unreal-${{fromJson(steps.get-unreal-ref.outputs.data).commit.sha}}
- name: Checkout Unreal Engine
if: steps.cache-unreal.outputs.cache-hit != 'true'
uses: actions/checkout@v6
with:
ref: ${{fromJson(steps.get-unreal-ref.outputs.data).commit.sha}}
repository: EpicGames/UnrealEngine
token: ${{secrets.PAT_TOKEN}}
path: unreal
- name: Download Oodle Dependencies
run: python download_oodle.py
- name: Commit Changes
id: commit
continue-on-error: true
run: |
git config user.name github-actions[bot]
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
git add .
git commit -m "Automatic Update" --author="${{github.actor}} <${{github.actor}}@users.noreply.github.com>"
- name: Push Changes
if: ${{steps.commit.conclusion == 'success'}}
uses: ad-m/github-push-action@master
with:
github_token: ${{secrets.GITHUB_TOKEN}}
branch: ${{github.ref}}
build:
name: Build
needs: sources
strategy:
fail-fast: false
matrix:
arch: [x64, arm64]
configure-preset: [msvc, clang-cl, clang, gcc]
build-preset: [debug, release]
include:
- configure-preset: msvc
arch: x64
os: windows-latest
- configure-preset: msvc
arch: arm64
os: windows-11-arm
- configure-preset: clang-cl
arch: x64
os: windows-latest
# - configure-preset: clang-cl
# arch: arm64
# os: windows-11-arm
- configure-preset: clang
arch: x64
os: ubuntu-latest
- configure-preset: clang
arch: arm64
os: ubuntu-24.04-arm
- configure-preset: gcc
arch: x64
os: ubuntu-latest
- configure-preset: gcc
arch: arm64
os: ubuntu-24.04-arm
exclude:
- configure-preset: clang-cl
arch: arm64
runs-on: ${{matrix.os}}
steps:
- name: Checkout
uses: actions/checkout@v6
with:
ref: ${{github.ref}}
- name: Setup MSVC
if: matrix.configure-preset == 'msvc'
uses: ilammy/msvc-dev-cmd@v1
- name: Get CMake
uses: lukka/get-cmake@latest
- name: Run CMake
uses: lukka/run-cmake@v10
env:
VCPKG_ROOT: ""
with:
cmakeListsTxtPath: "build/CMakeLists.txt"
configurePreset: "${{matrix.configure-preset}}"
buildPreset: "${{matrix.configure-preset}}-${{matrix.build-preset}}"
- name: Zip Artifacts
run: python zip_artifacts.py '${{github.workspace}}/build/builds/${{matrix.configure-preset}}' '${{matrix.configure-preset}}-${{matrix.arch}}-${{matrix.build-preset}}.zip'
- name: Upload Artifacts
uses: actions/upload-artifact@v6
with:
name: ${{matrix.configure-preset}}-${{matrix.arch}}-${{matrix.build-preset}}
path: ${{matrix.configure-preset}}-${{matrix.arch}}-${{matrix.build-preset}}.zip
release:
name: Create Release
needs: [build, sources]
if: needs.sources.outputs.outcome == 'success' || github.event_name != 'schedule'
runs-on: ubuntu-latest
steps:
- name: Grab Python File
uses: actions/checkout@v6
with:
sparse-checkout: create_release.py
- name: Download Built Artifacts
uses: actions/download-artifact@v7
with:
path: artifacts
- name: Create Release Zips
run: python ../create_release.py
working-directory: artifacts
- name: Get Current Date
id: date
run: echo "::set-output name=date::$(date +'%Y-%m-%d')"
- name: Create Release
uses: ncipollo/release-action@v1
with:
artifacts: artifacts/*.zip
tag: ${{steps.date.outputs.date}}-${{github.run_number}}