Skip to content

Instantly share code, notes, and snippets.

@CanisHelix
Created July 24, 2022 12:55
Show Gist options
  • Save CanisHelix/fb3f4672886265528a5161c242fd4536 to your computer and use it in GitHub Desktop.
Save CanisHelix/fb3f4672886265528a5161c242fd4536 to your computer and use it in GitHub Desktop.
Gitlab CI for UE
variables:
GIT_SUBMODULE_STRATEGY: "recursive"
GIT_STRATEGY: "fetch"
GIT_CHECKOUT: "true"
GIT_SSL_NO_VERIFY: "1"
GET_SOURCES_ATTEMPTS: "10"
stages:
- Build Client
- Build Server
- Package Development Client
- Cleanup Development Client
- Package Shipping Client
- Cleanup Shipping Client
- Package Development Server
- Cleanup Development Server
- Package Shipping Server
- Cleanup Shipping Server
# Linux
compile-client-linux:
image: adamrehn/ue4-full:4.27.2
stage: Build Client
rules:
- if: '$CI_COMMIT_TAG'
when: manual
needs: [clang-format]
script:
- python3 setup.py
- ue4 build -TargetPlatforms=Linux
# Select runner
tags:
- linux
- docker
- ue4
# Windows
compile-client-windows:
image: adamrehn/ue4-full:4.27.2
stage: Build Client
rules:
- if: '$CI_COMMIT_TAG'
when: manual
needs: [clang-format]
script:
- python setup.py
- ue4 build -TargetPlatforms=Win64 -VS2019
# Select runner
tags:
- windows
- docker
- ue4
# Linux
compile-server-linux:
image: adamrehn/ue4-full:4.27.2
stage: Build Server
rules:
- if: '$CI_COMMIT_TAG'
when: manual
needs: [clang-format]
script:
- python3 setup.py
- ue4 build Development Server -TargetPlatforms=Linux
# Select runner
tags:
- linux
- docker
- ue4
# Windows
compile-server-windows:
image: adamrehn/ue4-full:4.27.2
stage: Build Server
rules:
- if: '$CI_COMMIT_TAG'
when: manual
needs: [clang-format]
script:
- python setup.py
- ue4 build Development Server -TargetPlatforms=Win64 -VS2019
# Select runner
tags:
- windows
- docker
- ue4
# Linux
package-development-client-linux:
image: adamrehn/ue4-full:4.27.2
stage: Package Development Client
rules:
- if: '$CI_COMMIT_TAG'
when: on_success
needs: [compile-client-linux]
variables:
GIT_STRATEGY: "clone"
script:
- python3 setup.py
- ue4 package Development -TargetPlatforms=Linux
- mv dist/LinuxNoEditor .
- mkdir -p LinuxNoEditor/$CI_PROJECT_CONTENT_DIR/Content/_Main/Art/Movies
- echo $STEAM_APPID > LinuxNoEditor/$CI_PROJECT_CONTENT_DIR/Binaries/Linux/steam_appid.txt
- cp -R Content/_Main/Art/Movies/* LinuxNoEditor/$CI_PROJECT_CONTENT_DIR/Content/_Main/Art/Movies
artifacts:
name: "$CI_PROJECT_TITLE"
paths:
- LinuxNoEditor/*
# Select runner
tags:
- linux
- docker
- ue4
cleanup-development-client-linux:
image: adamrehn/ue4-full:4.27.2
stage: Cleanup Development Client
rules:
- if: '$CI_COMMIT_TAG'
when: on_success
needs: [package-development-client-linux]
script:
- rm -rf dist
- rm -rf LinuxNoEditor
# Select runner
tags:
- linux
- docker
- ue4
package-shipping-client-linux:
image: adamrehn/ue4-full:4.27.2
stage: Package Shipping Client
rules:
- if: '$CI_COMMIT_TAG'
when: on_success
needs: [cleanup-development-client-linux]
variables:
GIT_STRATEGY: "clone"
script:
- python3 setup.py
- ue4 package Shipping -TargetPlatforms=Linux
- mv dist/LinuxNoEditor .
- mkdir -p LinuxNoEditor/$CI_PROJECT_CONTENT_DIR/Content/_Main/Art/Movies
- echo $STEAM_APPID > LinuxNoEditor/$CI_PROJECT_CONTENT_DIR/Binaries/Linux/steam_appid.txt
- cp -R Content/_Main/Art/Movies/* LinuxNoEditor/$CI_PROJECT_CONTENT_DIR/Content/_Main/Art/Movies
artifacts:
name: "$CI_PROJECT_TITLE"
paths:
- LinuxNoEditor/*
# Select runner
tags:
- linux
- docker
- ue4
cleanup-shipping-client-linux:
image: adamrehn/ue4-full:4.27.2
stage: Cleanup Shipping Client
rules:
- if: '$CI_COMMIT_TAG'
when: on_success
needs: [package-shipping-client-linux]
script:
- rm -rf dist
- rm -rf LinuxNoEditor
# Select runner
tags:
- linux
- docker
- ue4
# Windows
package-development-client-windows:
image: adamrehn/ue4-full:4.27.2
stage: Package Development Client
rules:
- if: '$CI_COMMIT_TAG'
when: on_success
needs: [compile-client-windows]
variables:
GIT_STRATEGY: "clone"
script:
- python setup.py
- ue4 package Development -TargetPlatforms=Win64 -VS2019
- mv dist/WindowsNoEditor .
- mkdir -p WindowsNoEditor/$CI_PROJECT_CONTENT_DIR/Content/_Main/Art/Movies
- $env:STEAM_APPID | Set-Content WindowsNoEditor/$CI_PROJECT_CONTENT_DIR/Binaries/Win64/steam_appid.txt
- cp -R Content/_Main/Art/Movies/* WindowsNoEditor/$CI_PROJECT_CONTENT_DIR/Content/_Main/Art/Movies
artifacts:
name: "$CI_PROJECT_TITLE"
paths:
- WindowsNoEditor/*
# Select runner
tags:
- windows
- docker
- ue4
cleanup-development-client-windows:
image: adamrehn/ue4-full:4.27.2
stage: Cleanup Development Client
rules:
- if: '$CI_COMMIT_TAG'
when: on_success
needs: [package-development-client-windows]
script:
- if (test-path dist) { Remove-Item dist -Recurse; }
- if (test-path WindowsNoEditor) { Remove-Item WindowsNoEditor -Recurse; }
# Select runner
tags:
- windows
- docker
- ue4
package-shipping-client-windows:
image: adamrehn/ue4-full:4.27.2
stage: Package Shipping Client
rules:
- if: '$CI_COMMIT_TAG'
when: on_success
needs: [cleanup-development-client-windows]
variables:
GIT_STRATEGY: "clone"
script:
- python setup.py
- ue4 package Shipping -TargetPlatforms=Win64 -VS2019
- mv dist/WindowsNoEditor .
- mkdir -p WindowsNoEditor/$CI_PROJECT_CONTENT_DIR/Content/_Main/Art/Movies
- $env:STEAM_APPID | Set-Content WindowsNoEditor/$CI_PROJECT_CONTENT_DIR/Binaries/Win64/steam_appid.txt
- cp -R Content/_Main/Art/Movies/* WindowsNoEditor/$CI_PROJECT_CONTENT_DIR/Content/_Main/Art/Movies
artifacts:
name: "$CI_PROJECT_TITLE"
paths:
- WindowsNoEditor/*
# Select runner
tags:
- windows
- docker
- ue4
cleanup-shipping-client-windows:
image: adamrehn/ue4-full:4.27.2
stage: Cleanup Shipping Client
rules:
- if: '$CI_COMMIT_TAG'
when: on_success
needs: [package-shipping-client-windows]
script:
- if (test-path dist) { Remove-Item dist -Recurse; }
- if (test-path WindowsNoEditor) { Remove-Item WindowsNoEditor -Recurse; }
# Select runner
tags:
- windows
- docker
- ue4
# Linux
package-development-server-linux:
image: adamrehn/ue4-full:4.27.2
stage: Package Development Server
rules:
- if: '$CI_COMMIT_TAG'
when: on_success
needs: [compile-server-linux, cleanup-shipping-client-linux]
variables:
GIT_STRATEGY: "clone"
script:
- python3 setup.py
- ue4 package Development -server -TargetPlatforms=Linux
- mv dist/LinuxServer .
- echo $STEAM_APPID > LinuxServer/$CI_PROJECT_CONTENT_DIR/Binaries/Linux/steam_appid.txt
artifacts:
name: "$CI_PROJECT_TITLE"
paths:
- LinuxServer/*
# Select runner
tags:
- linux
- docker
- ue4
cleanup-development-server-linux:
image: adamrehn/ue4-full:4.27.2
stage: Cleanup Development Server
rules:
- if: '$CI_COMMIT_TAG'
when: on_success
needs: [package-development-server-linux]
script:
- rm -rf dist
- rm -rf LinuxServer
# Select runner
tags:
- linux
- docker
- ue4
package-shipping-server-linux:
image: adamrehn/ue4-full:4.27.2
stage: Package Shipping Server
rules:
- if: '$CI_COMMIT_TAG'
when: on_success
needs: [cleanup-development-server-linux]
variables:
GIT_STRATEGY: "clone"
script:
- python3 setup.py
- ue4 package Shipping -server -TargetPlatforms=Linux
- mv dist/LinuxServer .
- echo $STEAM_APPID > LinuxServer/$CI_PROJECT_CONTENT_DIR/Binaries/Linux/steam_appid.txt
artifacts:
name: "$CI_PROJECT_TITLE"
paths:
- LinuxServer/*
# Select runner
tags:
- linux
- docker
- ue4
cleanup-shipping-server-linux:
image: adamrehn/ue4-full:4.27.2
stage: Cleanup Shipping Server
rules:
- if: '$CI_COMMIT_TAG'
when: on_success
needs: [package-shipping-server-linux]
script:
- rm -rf dist
- rm -rf LinuxServer
# Select runner
tags:
- linux
- docker
- ue4
# Windows
package-development-server-windows:
image: adamrehn/ue4-full:4.27.2
stage: Package Development Server
rules:
- if: '$CI_COMMIT_TAG'
when: on_success
needs: [compile-server-windows, cleanup-shipping-client-windows]
variables:
GIT_STRATEGY: "clone"
script:
- python setup.py
- ue4 package Development -server -TargetPlatforms=Win64 -VS2019
- mv dist/WindowsServer .
- $env:STEAM_APPID | Set-Content WindowsServer/$CI_PROJECT_CONTENT_DIR/Binaries/Win64/steam_appid.txt
artifacts:
name: "$CI_PROJECT_TITLE"
paths:
- WindowsServer/*
# Select runner
tags:
- windows
- docker
- ue4
cleanup-development-server-windows:
image: adamrehn/ue4-full:4.27.2
stage: Cleanup Development Server
rules:
- if: '$CI_COMMIT_TAG'
when: on_success
needs: [package-development-server-windows]
script:
- if (test-path dist) { Remove-Item dist -Recurse; }
- if (test-path WindowsServer) { Remove-Item WindowsServer -Recurse; }
# Select runner
tags:
- windows
- docker
- ue4
package-shipping-server-windows:
image: adamrehn/ue4-full:4.27.2
stage: Package Shipping Server
rules:
- if: '$CI_COMMIT_TAG'
when: on_success
needs: [cleanup-development-server-windows]
variables:
GIT_STRATEGY: "clone"
script:
- python setup.py
- ue4 package Shipping -server -TargetPlatforms=Win64 -VS2019
- mv dist/WindowsServer .
- $env:STEAM_APPID | Set-Content WindowsServer/$CI_PROJECT_CONTENT_DIR/Binaries/Win64/steam_appid.txt
artifacts:
name: "$CI_PROJECT_TITLE"
paths:
- WindowsServer/*
# Select runner
tags:
- windows
- docker
- ue4
cleanup-shipping-server-windows:
image: adamrehn/ue4-full:4.27.2
stage: Cleanup Shipping Server
rules:
- if: '$CI_COMMIT_TAG'
when: on_success
needs: [package-shipping-server-windows]
script:
- if (test-path dist) { Remove-Item dist -Recurse; }
- if (test-path WindowsServer) { Remove-Item WindowsServer -Recurse; }
# Select runner
tags:
- windows
- docker
- ue4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment