Skip to content

Update build.yml

Update build.yml #677

Workflow file for this run

name: Build Cemu
on:
push:
workflow_call:
inputs:
deploymode:
required: false
type: string
env:
VCPKG_ROOT: "${{github.workspace}}/dependencies/vcpkg"
VCPKG_BINARY_SOURCES: 'clear;nuget,GitHub,readwrite'
jobs:
build-ubuntu:
strategy:
fail-fast: false
matrix:
compiler: [clang++-12] # [g++-11, clang++-12] # [g++-11] #
build: [Release] # [Release,Debug]
include:
#- compiler: g++-11
# cc: gcc-11
# deb: gcc-11 g++-11
- compiler: clang++-12
cc: clang-12
deb: clang-12
name: Build Ubuntu ${{ matrix.build }}
runs-on: ubuntu-20.04
env:
CACHEDIR: ~/.ccache
steps:
- name: Checkout Upstream Repo
uses: actions/checkout@v3
with:
repository: SSimco/Cemu
ref: android
submodules: recursive
- name: Checkout AppImage Repo
uses: actions/checkout@v3
with:
clean: false
path: ci
- name: cache
uses: actions/cache@v3
with:
path: |
~/.ccache
key: build-${{github.run_id}}
restore-keys: |
build
- name: Setup release mode parameters (for deploy)
#if: ${{ inputs.deploymode == 'release' }}
run: |
echo "BUILD_MODE=${{ matrix.build }}" >> $GITHUB_ENV
echo "BUILD_FLAGS=" >> $GITHUB_ENV
echo "Build mode is release"
- name: "Install system dependencies"
run: |
sudo apt update -qq
sudo apt install -y ccache ninja-build cmake apksigner libgtk-3-dev libsecret-1-dev libgcrypt20-dev libsystemd-dev freeglut3-dev nasm ${{ matrix.deb }} libpng-dev libpulse-dev libwxgtk-webview3.0-gtk3-0v5 libudev-dev
- uses: actions/setup-java@v3
with:
distribution: 'oracle'
java-version: '17'
- name: "Create cache dir"
run: |
if [[ ! -e ${{ env.CACHEDIR }} ]]; then mkdir ${{ env.CACHEDIR }}; fi
ls -al ${{ env.CACHEDIR }}
- name: Fixes (Android)
run: |
echo "Android Fixes"
#sed -i 's|Exec=cemu|Exec=Cemu|g' dist/linux/info.cemu.Cemu.desktop ## wayland build
#git apply ci/scripts/xdg.patch
#sed -i 40,43d src/CMakeLists.txt
- name: "Bootstrap vcpkg"
run: |
bash ./dependencies/vcpkg/bootstrap-vcpkg.sh
- name: 'Setup NuGet Credentials for vcpkg'
shell: 'bash'
run: |
mono `./dependencies/vcpkg/vcpkg fetch nuget | tail -n 1` \
sources add \
-source "https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json" \
-storepasswordincleartext \
-name "GitHub" \
-username "${{ github.repository_owner }}" \
-password "${{ secrets.GITHUB_TOKEN }}"
mono `./dependencies/vcpkg/vcpkg fetch nuget | tail -n 1` \
setapikey "${{ secrets.GITHUB_TOKEN }}" \
-source "https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json"
- name: "Build Cemu"
run: |
cd src/android
chmod +x ./gradlew
./gradlew assembleRelease
./gradlew bundleRelease
#- name: Upload artifact
# uses: actions/upload-artifact@v3
# with:
# name: cemu-android
# path: |
# artifacts