Skip to content

Merge pull request #54 from jlambert360/Dev #108

Merge pull request #54 from jlambert360/Dev

Merge pull request #54 from jlambert360/Dev #108

Workflow file for this run

name: PR Builds x64
on:
push:
branches:
- "**"
paths-ignore:
- "**.md"
pull_request:
branches: [ Dev ]
paths-ignore:
- "**.md"
jobs:
windows:
strategy:
fail-fast: false
env:
DXSDK_DIR: "C:\\Program Files (x86)\\Microsoft DirectX SDK (June 2010)\\"
name: "Windows Dolphin"
runs-on: windows-2019
steps:
- name: "Checkout"
uses: actions/[email protected]
- name: "Remove Redistributable"
shell: cmd
run: |
MsiExec.exe /passive /X{F0C3E5D1-1ADE-321E-8167-68EF0DE699A5}
MsiExec.exe /passive /X{1D8E6291-B0D5-35EC-8441-6616F567A0F7}
mkdir .\Tools\DX
- name: "Setup MSBuild"
uses: microsoft/setup-msbuild@v1
- name: "Install DirectX SDK"
shell: powershell
run: |
choco install directx-sdk
- 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
- name: "Build Dolphin"
shell: cmd
run: |
msbuild /p:Configuration=Release /p:Platform=x64 ${{ github.workspace }}\Source\Dolphin.sln
- name: "Setup Nuget.exe"
uses: nuget/setup-nuget@v1
with:
nuget-version: '5.x'
- name: "Build Updater"
working-directory: ${{ github.workspace }}
shell: cmd
run: |
git clone https://github.com/jlambert360/FPM-Win-Updater
cd FPM-Win-Updater
nuget restore ${{ github.workspace }}\FPM-Win-Updater\DolphinUpdater.sln
msbuild /p:Configuration=Release /p:Platform="Any CPU" ${{ github.workspace }}\FPM-Win-Updater\DolphinUpdater.sln
cd DolphinUpdater\bin\Release
copy /b /v /y Updater.exe ${{ github.workspace }}\Binary\x64\
- name: "Build Replay Manager"
working-directory: ${{ github.workspace }}
shell: cmd
run: |
git clone https://github.com/jlambert360/Dolphin-Replay-Manager
cd Dolphin-Replay-Manager
msbuild /p:Configuration=Release /p:Platform="Any CPU" "${{ github.workspace }}\Dolphin-Replay-Manager\Bird's Replay Manager.sln"
cd "Bird's Replay Manager\bin\Release"
copy /b /v /y "Bird's Replay Manager.exe" ${{ github.workspace }}\Binary\x64\
- name: "Prepare Artifact"
working-directory: ${{ github.workspace }}
run: |
xcopy /E /V /Y /I .\Data\User .\Binary\x64\User
xcopy /E /V /Y /I .\Data\Sys .\Binary\x64\Sys
xcopy /E /V /Y /I .\Data\Launcher .\Binary\x64\Launcher
copy Changelog.txt .\Binary\x64\
cd .\Binary\x64\
rm -r Languages
fsutil file createnew FIX-VCRUNTIME140-ERROR.txt 0
echo "Download and install this: https://aka.ms/vs/17/release/vc_redist.x64.exe" > .\FIX-VCRUNTIME140-ERROR.txt
Invoke-WebRequest -Uri https://github.com/jlambert360/PPlusLauncher/releases/download/2.2/vcruntime140_1.dll -UseBasicParsing -OutFile "vcruntime140_1.dll"
mkdir Games
cd Games
fsutil file createnew "Place Brawl ISO here.txt" 0
- name: "Package Artifact"
working-directory: ${{ github.workspace }}
run: |
$FILE_NAME="windows.zip"
mkdir artifact
cd .\Binary\x64\
7z a $FILE_NAME .\*
move $FILE_NAME ..\..\artifact\
- name: "Publish"
if: success()
uses: actions/upload-artifact@v2-preview
with:
name: windows
path: "./artifact/"
linux:
strategy:
fail-fast: false
name: "Ubuntu Dolphin"
runs-on: ubuntu-20.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 \
cmake \
pkg-config \
git \
wget \
libao-dev \
libasound2-dev \
libavcodec-dev \
libavformat-dev \
libbluetooth-dev \
libenet-dev \
libgtk2.0-dev \
liblzo2-dev \
libminiupnpc-dev \
libopenal-dev \
libpulse-dev \
libreadline-dev \
libsfml-dev \
libsoil-dev \
libsoundtouch-dev \
libswscale-dev \
libusb-1.0-0-dev \
libwebkit2gtk-4.0-dev \
libxext-dev \
libxrandr-dev \
portaudio19-dev \
zlib1g-dev \
libudev-dev \
libevdev-dev \
libmbedtls-dev \
libcurl4-openssl-dev \
libegl1-mesa-dev \
libpng-dev \
qtbase5-private-dev \
libxxf86vm-dev \
x11proto-xinerama-dev
- name: "Build Dolphin"
if: success()
working-directory: ${{ github.workspace }}
run: |
chmod +x ./build-linux.sh
./build-linux.sh
- name: "Build AppImage"
if: success()
working-directory: ${{ github.workspace }}
run: |
chmod +x ./build-appimage.sh
./build-appimage.sh
- name: "Package"
if: success()
working-directory: ${{ github.workspace }}
run: |
mkdir artifact
FILE_NAME=${{ env.CURR_DATE }}-${{ env.GIT_HASH }}-${{ env.GIT_TAG }}-linux.zip
chmod +x ./*.AppImage
zip -r "${FILE_NAME}" ./*.AppImage*
mv "${FILE_NAME}" ./artifact/
- name: "Publish"
if: success()
uses: actions/upload-artifact@v2-preview
with:
name: linux
path: "./artifact/"
macOS:
strategy:
fail-fast: false
name: "macOS Dolphin"
runs-on: macos-11
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 10.14 SDK"
if: success()
shell: bash
working-directory: ${{ github.workspace }}
run: |
wget https://github.com/phracker/MacOSX-SDKs/releases/download/10.15/MacOSX10.14.sdk.tar.xz
tar -xf MacOSX10.14.sdk.tar.xz
rm MacOSX10.14.sdk.tar.xz
sudo mv MacOSX10.14.sdk /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 \
[email protected] \
libpng \
pkgconfig \
libao \
sound-touch \
hidapi \
[email protected]
- name: "Build Dolphin"
if: success()
shell: bash
working-directory: ${{ github.workspace }}
run: |
export LIBRARY_PATH=$LIBRARY_PATH:/usr/local/lib
chmod +x ./build-mac.sh && ./build-mac.sh
mkdir artifact
FILE_NAME=${{ env.CURR_DATE }}-${{ env.GIT_HASH }}-${{ env.GIT_TAG }}-macOS
echo "FILE_NAME=$FILE_NAME" >> $GITHUB_ENV
- name: "Install Rust"
uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: x86_64-apple-darwin
default: true
override: true
- name: "Build Updater"
working-directory: ${{ github.workspace }}
shell: bash
run: |
git clone https://github.com/jlambert360/FPM-Mac-Updater
cd FPM-Mac-Updater
cargo build --all --release && strip target/release/Updater
cd "target/release/"
mv "Updater" ${{ github.workspace }}/build/Binaries/Dolphin.app/Contents/Resources/
- name: "Package"
if: success()
shell: bash
working-directory: ${{ github.workspace }}
run: |
cd ./build/Binaries
zip -r "${{ env.FILE_NAME }}.zip" Dolphin.app
mv "${{ env.FILE_NAME }}.zip" ../../artifact/
- name: "Publish"
if: success()
uses: actions/upload-artifact@v2-preview
with:
name: macOS
path: "./artifact/"