Merge branch 'ProjectRio:master' into master #4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Builds | |
on: | |
push: | |
branches: | |
- "**_release" | |
- "master" | |
pull_request: | |
branches: | |
- "**_release" | |
- "master" | |
paths-ignore: | |
- "**.md" | |
- "**.ini" | |
jobs: | |
windows: | |
strategy: | |
fail-fast: false | |
matrix: | |
build_type: [ Release ] | |
include: | |
- build_type: Release | |
artifact_name: ProjectRio-Windows | |
build_config: -G "Ninja" -DCMAKE_SYSTEM_VERSION="10.0.22621" -DCMAKE_BUILD_TYPE="Release" -DQt5_DIR:STRING="D:\a\dolphin\dolphin\Externals\Qt\Qt5.3.0\x64\lib\cmake\Qt5\" | |
env: | |
DXSDK_DIR: "C:\\Program Files (x86)\\Microsoft DirectX SDK (June 2010)\\" | |
name: "Windows ${{ matrix.build_type }}" | |
runs-on: windows-2022 | |
steps: | |
- name: "Checkout" | |
uses: actions/checkout@v2 | |
with: | |
submodules: recursive | |
- name: 'Fetch Git Tags' | |
shell: bash | |
if: success() | |
run: | | |
git fetch --prune --unshallow | |
echo "GIT_BRANCH=$(git rev-parse --abbrev-ref HEAD)" >> $GITHUB_ENV | |
echo "GIT_HASH=$(git rev-parse --short HEAD)" >> $GITHUB_ENV | |
echo "GIT_TAG=$(git describe --tags --abbrev=0)" >> $GITHUB_ENV | |
echo "CURR_DATE=$(date +%Y-%m-%d)" >> $GITHUB_ENV | |
- uses: seanmiddleditch/gha-setup-ninja@master | |
- uses: egor-tensin/vs-shell@v2 | |
# - name: "Install Windows SDK" | |
# shell: pwsh | |
# working-directory: ${{ github.workspace }} | |
# run: | | |
# powershell -NoLogo -Sta -NoProfile -NonInteractive -ExecutionPolicy Unrestricted -Command ./install-windows-sdk.ps1 22621 | |
- name: "Build ${{ matrix.build_type }} Dolphin" | |
shell: cmd | |
working-directory: ${{ github.workspace }} | |
run: | | |
SET PATH=%PATH%;C:\Program Files (x86)\Windows Kits\10\bin\10.0.22621.0\x64;C:\Program Files (x86)\Windows Kits\10\bin\10.0.22621.0\x86;C:\Program Files\7-Zip;C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin;C:\Python27\;C:\Python27\Scripts;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin;C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\Ninja;C:\Program Files\Microsoft VS Code\bin;C:\Program Files\Git\cmd | |
cd ./Source | |
msbuild.exe /v:m /p:Platform=x64 /p:Configuration=Release dolphin-emu.sln | |
- name: "Package ${{ matrix.build_type }}" | |
working-directory: ${{ github.workspace }} | |
run: | | |
Xcopy /Y /E /I .\Data\Sys .\Binary\x64\Sys | |
cd .\Binary\x64\ | |
fsutil file createnew FIX-VCRUNTIME140-ERROR.txt 0 | |
echo "Download and install this: https://aka.ms/vs/16/release/vc_redist.x64.exe" > .\FIX-VCRUNTIME140-ERROR.txt | |
- name: Package Artifact | |
working-directory: ${{ github.workspace }} | |
run: | | |
$FILE_NAME="${{ env.CURR_DATE }}-${{ env.GIT_HASH }}-${{ env.GIT_TAG }}-${{ matrix.artifact_name }}.zip" | |
mkdir artifact | |
cd .\Binary\x64\ | |
fsutil file createnew portable.txt 0 | |
7z a $FILE_NAME .\* | |
move $FILE_NAME ..\..\artifact\ | |
- name: "Publish" | |
if: success() | |
uses: actions/upload-artifact@v2-preview | |
with: | |
name: ${{ matrix.artifact_name }} | |
path: "./artifact/" | |
linux: | |
strategy: | |
fail-fast: false | |
matrix: | |
build_type: [ Release ] | |
include: | |
- build_type: Release | |
artifact_name: linux | |
build_config: release | |
name: "Linux ${{ matrix.build_type }}" | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: "Checkout" | |
uses: actions/checkout@v2 | |
with: | |
submodules: recursive | |
- name: 'Fetch Git Tags' | |
if: success() | |
run: | | |
git fetch --prune --unshallow | |
echo "GIT_BRANCH=$(git rev-parse --abbrev-ref HEAD)" >> $GITHUB_ENV | |
echo "GIT_HASH=$(git rev-parse --short HEAD)" >> $GITHUB_ENV | |
echo "GIT_TAG=$(git describe --tags --abbrev=0)" >> $GITHUB_ENV | |
echo "CURR_DATE=$(date +%Y-%m-%d)" >> $GITHUB_ENV | |
- name: "Install prerequisites" | |
if: success() | |
shell: bash | |
run: | | |
sudo dpkg --add-architecture amd64 | |
sudo apt update | |
sudo apt install -y software-properties-common | |
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test | |
sudo add-apt-repository ppa:daschuer/qt6-backports | |
sudo apt install -y gcc-11 g++-11 | |
sudo apt-get install fuse libfuse2 | |
sudo apt update | |
sudo apt install \ | |
cmake \ | |
ca-certificates \ | |
qt6-base-dev \ | |
qt6-base-private-dev \ | |
libqt6svg6-dev \ | |
make \ | |
pkg-config \ | |
udev \ | |
libudev1 \ | |
libavcodec-dev \ | |
libavformat-dev \ | |
libavutil-dev \ | |
libswscale-dev \ | |
libxi-dev \ | |
libxrandr-dev \ | |
libevdev-dev \ | |
libsfml-dev \ | |
libminiupnpc-dev \ | |
libmbedtls-dev \ | |
libcurl4-openssl-dev \ | |
libhidapi-dev \ | |
libbluetooth-dev \ | |
libasound2-dev \ | |
libpulse-dev \ | |
libpugixml-dev \ | |
libbz2-dev \ | |
libzstd-dev \ | |
liblzo2-dev \ | |
libpng-dev \ | |
libusb-1.0-0-dev \ | |
gettext libudev-dev \ | |
libsystemd-dev \ | |
-y | |
- name: "Build ${{ matrix.build_type }} Project Rio" | |
if: success() | |
working-directory: ${{ github.workspace }} | |
run: | | |
git config core.fileMode false ; chmod +x ./build-linux.sh && ./build-linux.sh ${{ matrix.build_config }} | |
macOS: | |
strategy: | |
fail-fast: false | |
matrix: | |
build_type: [ Release ] | |
include: | |
- build_type: Release | |
artifact_name: ProjectRio-macOS | |
build_config: release | |
name: "macOS ${{ matrix.build_type }}" | |
runs-on: macos-12 | |
steps: | |
- name: "Checkout" | |
uses: actions/checkout@v2 | |
with: | |
submodules: recursive | |
- name: 'Fetch Git Tags' | |
if: success() | |
run: | | |
git fetch --prune --unshallow | |
echo "GIT_BRANCH=$(git rev-parse --abbrev-ref HEAD)" >> $GITHUB_ENV | |
echo "GIT_HASH=$(git rev-parse --short HEAD)" >> $GITHUB_ENV | |
echo "GIT_TAG=$(git describe --tags --abbrev=0)" >> $GITHUB_ENV | |
echo "CURR_DATE=$(date +%Y-%m-%d)" >> $GITHUB_ENV | |
- name: "Set up Python" | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.11.6" | |
architecture: "x64" | |
- name: "Install 12.3 SDK" | |
if: success() | |
shell: bash | |
working-directory: ${{ github.workspace }} | |
run: | | |
wget https://github.com/phracker/MacOSX-SDKs/releases/download/11.3/MacOSX11.0.sdk.tar.xz | |
tar -xf MacOSX11.0.sdk.tar.xz | |
rm MacOSX11.0.sdk.tar.xz | |
sudo mv MacOSX11.0.sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/ | |
# wget https://github.com/alexey-lysiuk/macos-sdk/releases/download/12.3/MacOSX12.3.tar.xz | |
# tar -xf MacOSX12.3.tar.xz | |
# rm MacOSX12.3.tar.xz | |
# sudo mv MacOSX12.3 /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/ | |
- name: "Download and Install prerequisites" | |
if: success() | |
shell: bash | |
run: | | |
rm '/usr/local/bin/2to3' || true | |
echo "HOMEBREW_NO_AUTO_UPDATE=1" >> $GITHUB_ENV | |
brew upgrade cmake | |
brew install \ | |
ffmpeg \ | |
libpng \ | |
pkgconfig \ | |
libao \ | |
sound-touch \ | |
hidapi \ | |
icu4c \ | |
qt@6 | |
- name: "Build ${{ matrix.build_type }} Project Rio" | |
if: success() | |
shell: bash | |
working-directory: ${{ github.workspace }} | |
run: | | |
git config core.fileMode false ; chmod +x ./build-mac.sh && ./build-mac.sh ${{ matrix.build_config }} | |
- name: Package ${{ matrix.build_type }} | |
if: success() | |
shell: bash | |
working-directory: ${{ github.workspace }} | |
run: | | |
FILE_NAME=${{ env.CURR_DATE }}-${{ env.GIT_HASH }}-${{ env.GIT_TAG }}-${{ matrix.artifact_name }}.tar.gz | |
mkdir artifact | |
cd ./build/Binaries/ | |
zip -r "${FILE_NAME}" "Dolphin.app" | |
mv "${FILE_NAME}" ../../artifact/ | |
- name: "Publish" | |
if: success() | |
uses: actions/upload-artifact@v2-preview | |
with: | |
name: ${{ matrix.artifact_name }} | |
path: "./artifact/" |