Skip to content

Commit

Permalink
metaverse as another github action
Browse files Browse the repository at this point in the history
  • Loading branch information
leejw51crypto committed Apr 29, 2024
1 parent b768e9c commit 7262d1e
Show file tree
Hide file tree
Showing 2 changed files with 74 additions and 60 deletions.
60 changes: 0 additions & 60 deletions .github/workflows/dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,63 +72,3 @@ jobs:
${{ env.demo_checksum_file }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Metaverse:
runs-on: ubuntu-22.04
steps:
- name: Checkout play-uneral-demo
uses: actions/checkout@v3

- name: Setup environment
run: |
sudo rm -rf /usr/share/dotnet
sudo rm -rf /opt/ghc
sudo rm -rf "/usr/local/share/boost"
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
sudo rm -rf /usr/local/lib/android
- name: Checkout play-unreal-plugin repo
uses: actions/checkout@v3
with:
repository: cronos-labs/play-unreal-plugin
path: Metaverse/Plugins/play-unreal-plugin
ref: main

- name: Build play-unreal-plugin repo
run: |
cd Metaverse/Plugins/play-unreal-plugin
mv ./Source/ThirdParty/PlayCppSdkLibrary/PlayCppSdkLibrary.Build.cs.legacy ./Source/ThirdParty/PlayCppSdkLibrary/PlayCppSdkLibrary.Build.cs
TARGET=5.2 make
python change_version.py 5.2.0
sudo chmod 777 -R $GITHUB_WORKSPACE
- uses: addnab/docker-run-action@v3
with:
registry: ghcr.io
username: ${{ secrets.USER }}
password: ${{ secrets.PAT }}
image: ghcr.io/epicgames/unreal-engine:dev-slim-5.2
options: -v ${{ github.workspace }}:/home/ue4/play-unreal-demo -e HOME=/home/ue4
run: |
cd ~/play-unreal-demo/Metaverse
make
- name: Package
run: |
FILENAME="CronosPlayMetaverseDemoLinux.zip"
cd Metaverse/archive/Linux/ && zip -r ../../../${FILENAME} .
cd ../../..
sha256sum ${FILENAME} > "checksums-${FILENAME}.txt"
echo "demo_binary_file=${FILENAME}" >> $GITHUB_ENV
echo "demo_checksum_file=checksums-${FILENAME}.txt" >> $GITHUB_ENV
- name: Upload binary file and checksum file to Release
uses: softprops/action-gh-release@v1
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
with:
draft: true
files: |
${{ env.demo_binary_file }}
${{ env.demo_checksum_file }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
74 changes: 74 additions & 0 deletions .github/workflows/devmetaverse.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
name: Unreal Development Build

on:
push:
branches:
- main
paths-ignore:
- README.md
tags:
- "v*.*.*"
pull_request:
paths-ignore:
- README.md

jobs:
Metaverse:
runs-on: ubuntu-22.04
steps:
- name: Checkout play-uneral-demo
uses: actions/checkout@v3

- name: Setup environment
run: |
sudo rm -rf /usr/share/dotnet
sudo rm -rf /opt/ghc
sudo rm -rf "/usr/local/share/boost"
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
sudo rm -rf /usr/local/lib/android
- name: Checkout play-unreal-plugin repo
uses: actions/checkout@v3
with:
repository: cronos-labs/play-unreal-plugin
path: Metaverse/Plugins/play-unreal-plugin
ref: main

- name: Build play-unreal-plugin repo
run: |
cd Metaverse/Plugins/play-unreal-plugin
mv ./Source/ThirdParty/PlayCppSdkLibrary/PlayCppSdkLibrary.Build.cs.legacy ./Source/ThirdParty/PlayCppSdkLibrary/PlayCppSdkLibrary.Build.cs
TARGET=5.2 make
python change_version.py 5.2.0
sudo chmod 777 -R $GITHUB_WORKSPACE
- uses: addnab/docker-run-action@v3
with:
registry: ghcr.io
username: ${{ secrets.USER }}
password: ${{ secrets.PAT }}
image: ghcr.io/epicgames/unreal-engine:dev-slim-5.2
options: -v ${{ github.workspace }}:/home/ue4/play-unreal-demo -e HOME=/home/ue4
run: |
cd ~/play-unreal-demo/Metaverse
make
- name: Package
run: |
FILENAME="CronosPlayMetaverseDemoLinux.zip"
cd Metaverse/archive/Linux/ && zip -r ../../../${FILENAME} .
cd ../../..
sha256sum ${FILENAME} > "checksums-${FILENAME}.txt"
echo "demo_binary_file=${FILENAME}" >> $GITHUB_ENV
echo "demo_checksum_file=checksums-${FILENAME}.txt" >> $GITHUB_ENV
- name: Upload binary file and checksum file to Release
uses: softprops/action-gh-release@v1
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
with:
draft: true
files: |
${{ env.demo_binary_file }}
${{ env.demo_checksum_file }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 7262d1e

Please sign in to comment.