mirror of
https://github.com/cemu-project/Cemu.git
synced 2025-07-04 05:51:19 +12:00
Added workflow to deploy experimental release
This commit is contained in:
parent
ae6e6f9f79
commit
6fc9c0f816
2 changed files with 83 additions and 5 deletions
20
.github/workflows/build.yml
vendored
20
.github/workflows/build.yml
vendored
|
@ -18,6 +18,9 @@ on:
|
||||||
deploymode:
|
deploymode:
|
||||||
required: false
|
required: false
|
||||||
type: string
|
type: string
|
||||||
|
experimentalversion:
|
||||||
|
required: false
|
||||||
|
type: string
|
||||||
|
|
||||||
env:
|
env:
|
||||||
VCPKG_ROOT: "${{github.workspace}}/dependencies/vcpkg"
|
VCPKG_ROOT: "${{github.workspace}}/dependencies/vcpkg"
|
||||||
|
@ -38,7 +41,6 @@ jobs:
|
||||||
echo "BUILD_MODE=release" >> $GITHUB_ENV
|
echo "BUILD_MODE=release" >> $GITHUB_ENV
|
||||||
echo "BUILD_FLAGS=-DPUBLIC_RELEASE=ON" >> $GITHUB_ENV
|
echo "BUILD_FLAGS=-DPUBLIC_RELEASE=ON" >> $GITHUB_ENV
|
||||||
echo "Build mode is release"
|
echo "Build mode is release"
|
||||||
|
|
||||||
- name: Setup debug mode parameters (for continous build)
|
- name: Setup debug mode parameters (for continous build)
|
||||||
if: ${{ inputs.deploymode != 'release' }}
|
if: ${{ inputs.deploymode != 'release' }}
|
||||||
run: |
|
run: |
|
||||||
|
@ -46,11 +48,16 @@ jobs:
|
||||||
echo "BUILD_FLAGS=" >> $GITHUB_ENV
|
echo "BUILD_FLAGS=" >> $GITHUB_ENV
|
||||||
echo "Build mode is debug"
|
echo "Build mode is debug"
|
||||||
|
|
||||||
|
- name: Setup version for experimental
|
||||||
|
if: ${{ inputs.experimentalversion != '' }}
|
||||||
|
run: |
|
||||||
|
echo "[INFO] Experimental version ${{ inputs.experimentalversion }}"
|
||||||
|
echo "BUILD_FLAGS=${{ env.BUILD_FLAGS }} -DEXPERIMENTAL_VERSION=${{ inputs.experimentalversion }}" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: "Install system dependencies"
|
- name: "Install system dependencies"
|
||||||
run: |
|
run: |
|
||||||
sudo apt update -qq
|
sudo apt update -qq
|
||||||
sudo apt install -y ninja-build cmake libgtk-3-dev libsecret-1-dev libgcrypt20-dev libsystemd-dev freeglut3-dev clang-12 nasm
|
sudo apt install -y ninja-build cmake libgtk-3-dev libsecret-1-dev libgcrypt20-dev libsystemd-dev freeglut3-dev clang-12 nasm
|
||||||
|
|
||||||
- name: "Bootstrap vcpkg"
|
- name: "Bootstrap vcpkg"
|
||||||
run: |
|
run: |
|
||||||
bash ./dependencies/vcpkg/bootstrap-vcpkg.sh
|
bash ./dependencies/vcpkg/bootstrap-vcpkg.sh
|
||||||
|
@ -109,7 +116,11 @@ jobs:
|
||||||
echo "BUILD_MODE=debug" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append
|
echo "BUILD_MODE=debug" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append
|
||||||
echo "BUILD_FLAGS=" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append
|
echo "BUILD_FLAGS=" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append
|
||||||
echo "Build mode is debug"
|
echo "Build mode is debug"
|
||||||
|
- name: Setup version for experimental
|
||||||
|
if: ${{ inputs.experimentalversion != '' }}
|
||||||
|
run: |
|
||||||
|
echo "[INFO] Experimental version ${{ inputs.experimentalversion }}"
|
||||||
|
echo "BUILD_FLAGS=${{ env.BUILD_FLAGS }} -DEXPERIMENTAL_VERSION=${{ inputs.experimentalversion }}" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append
|
||||||
|
|
||||||
- name: Workaround
|
- name: Workaround
|
||||||
run: |
|
run: |
|
||||||
|
@ -140,7 +151,6 @@ jobs:
|
||||||
# should be run twice
|
# should be run twice
|
||||||
$process = Start-Process -FilePath cmd.exe -ArgumentList $Arguments -Wait -PassThru -WindowStyle Hidden
|
$process = Start-Process -FilePath cmd.exe -ArgumentList $Arguments -Wait -PassThru -WindowStyle Hidden
|
||||||
$process = Start-Process -FilePath cmd.exe -ArgumentList $Arguments -Wait -PassThru -WindowStyle Hidden
|
$process = Start-Process -FilePath cmd.exe -ArgumentList $Arguments -Wait -PassThru -WindowStyle Hidden
|
||||||
|
|
||||||
- name: Configure MSVC
|
- name: Configure MSVC
|
||||||
uses: ilammy/msvc-dev-cmd@v1
|
uses: ilammy/msvc-dev-cmd@v1
|
||||||
with:
|
with:
|
||||||
|
@ -170,6 +180,8 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
mkdir -p build
|
mkdir -p build
|
||||||
cd build
|
cd build
|
||||||
|
echo "[INFO] BUILD_FLAGS: ${{ env.BUILD_FLAGS }}"
|
||||||
|
echo "[INFO] BUILD_MODE: ${{ env.BUILD_MODE }}"
|
||||||
cmake .. ${{ env.BUILD_FLAGS }} -DCMAKE_BUILD_TYPE=${{ env.BUILD_MODE }}
|
cmake .. ${{ env.BUILD_FLAGS }} -DCMAKE_BUILD_TYPE=${{ env.BUILD_MODE }}
|
||||||
|
|
||||||
- name: "Build Cemu"
|
- name: "Build Cemu"
|
||||||
|
|
66
.github/workflows/deploy_experimental.yml
vendored
Normal file
66
.github/workflows/deploy_experimental.yml
vendored
Normal file
|
@ -0,0 +1,66 @@
|
||||||
|
name: Deploy experimental release
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
call-release-build:
|
||||||
|
uses: ./.github/workflows/build.yml
|
||||||
|
with:
|
||||||
|
deploymode: release
|
||||||
|
experimentalversion: ${{ github.run_number }}
|
||||||
|
deploy:
|
||||||
|
name: Deploy experimental release
|
||||||
|
runs-on: ubuntu-20.04
|
||||||
|
needs: call-release-build
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- uses: actions/download-artifact@v3
|
||||||
|
with:
|
||||||
|
name: cemu-bin-linux-x64
|
||||||
|
path: cemu-bin-linux-x64
|
||||||
|
|
||||||
|
- uses: actions/download-artifact@v3
|
||||||
|
with:
|
||||||
|
name: cemu-bin-windows-x64
|
||||||
|
path: cemu-bin-windows-x64
|
||||||
|
|
||||||
|
- name: Initialize
|
||||||
|
run: |
|
||||||
|
mkdir upload
|
||||||
|
sudo apt install zip
|
||||||
|
|
||||||
|
- name: Get version
|
||||||
|
run: |
|
||||||
|
echo "Experimental version: ${{ github.run_number }}"
|
||||||
|
ls
|
||||||
|
gcc -o getversion .github/getversion.cpp
|
||||||
|
./getversion
|
||||||
|
echo "Cemu CI version: $(./getversion)"
|
||||||
|
echo "CEMU_FOLDER_NAME=Cemu_$(./getversion)-${{ github.run_number }}" >> $GITHUB_ENV
|
||||||
|
echo "CEMU_VERSION=$(./getversion)-${{ github.run_number }}" >> $GITHUB_ENV
|
||||||
|
|
||||||
|
- name: Create release from windows-bin
|
||||||
|
run: |
|
||||||
|
ls ./
|
||||||
|
ls ./bin/
|
||||||
|
cp -R ./bin ./${{ env.CEMU_FOLDER_NAME }}
|
||||||
|
mv cemu-bin-windows-x64/Cemu.exe ./${{ env.CEMU_FOLDER_NAME }}/Cemu.exe
|
||||||
|
zip -9 -r upload/cemu-${{ env.CEMU_VERSION }}-windows-x64.zip ${{ env.CEMU_FOLDER_NAME }}
|
||||||
|
rm -r ./${{ env.CEMU_FOLDER_NAME }}
|
||||||
|
|
||||||
|
- name: Create release from linux-bin
|
||||||
|
run: |
|
||||||
|
ls ./
|
||||||
|
ls ./bin/
|
||||||
|
cp -R ./bin ./${{ env.CEMU_FOLDER_NAME }}
|
||||||
|
mv cemu-bin-linux-x64/Cemu ./${{ env.CEMU_FOLDER_NAME }}/Cemu
|
||||||
|
zip -9 -r upload/cemu-${{ env.CEMU_VERSION }}-ubuntu-20.04-x64.zip ${{ env.CEMU_FOLDER_NAME }}
|
||||||
|
rm -r ./${{ env.CEMU_FOLDER_NAME }}
|
||||||
|
|
||||||
|
- name: Create release
|
||||||
|
run: |
|
||||||
|
wget -O ghr.tar.gz https://github.com/tcnksm/ghr/releases/download/v0.15.0/ghr_v0.15.0_linux_amd64.tar.gz
|
||||||
|
tar xvzf ghr.tar.gz; rm ghr.tar.gz
|
||||||
|
echo "[INFO] Release tag: v${{ env.CEMU_VERSION }}"
|
||||||
|
ghr_v0.15.0_linux_amd64/ghr -prerelease -t ${{ secrets.GITHUB_TOKEN }} -n "Cemu ${{ env.CEMU_VERSION }} (Experimental)" -b "Changelog is currently not available for experimental releases" "v${{ env.CEMU_VERSION }}" ./upload
|
Loading…
Add table
Add a link
Reference in a new issue