diff --git a/.github/workflows/windows-macOS-Linux.yml b/.github/workflows/windows-macOS-Linux.yml new file mode 100644 index 0000000000..b42ff3148c --- /dev/null +++ b/.github/workflows/windows-macOS-Linux.yml @@ -0,0 +1,105 @@ +name: Win-macOS-Linux CI + +# Controls when the action will run. Triggers the workflow on push or pull request +# events but only for the master branch +on: + push: + pull_request: + +# A workflow run is made up of one or more jobs that can run sequentially or in parallel +jobs: + # This workflow contains a single job called "build" + build: + # The type of runner that the job will run on + runs-on: ${{ matrix.os }} + + strategy: + matrix: + os: [macos-latest, windows-latest, ubuntu-latest] + + # Steps represent a sequence of tasks that will be executed as part of the job + steps: + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - uses: actions/checkout@v2 + # Submoudle + - name: Checkout Submodles + run: git submodule update --init --recursive + # Install 7zip + - name: Install 7zip + if: matrix.os == 'windows-latest' + run: choco install 7zip + # Setup Packages + - name: Setup Packages + if: matrix.os == 'macos-latest' + run: brew install qt6 p7zip pkgconfig + # Setup MSBuild For Later Usage + - name: Setup MSBuild + if: matrix.os == 'windows-latest' + uses: microsoft/setup-msbuild@v1.0.2 + with: + vs-version: '16.6.2' + # Setup CMake + - name: Setup CMake + if: matrix.os == 'macos-latest' + uses: Symbitic/install-cmake@v0.1.1 + with: + platform: mac + # Setup CMake + - name: Setup CMake + if: matrix.os == 'linux-latest' + uses: Symbitic/install-cmake@v0.1.1 + with: + platform: linux + # Use Static ZSTD + - name: Remove ZSTD + if: matrix.os == 'macos-latest' + run: brew uninstall zstd curl php --force --ignore-dependencies + # Run CMake + - name: Run CMake + if: matrix.os == 'macos-latest' + run: mkdir -p build && cd build && cmake .. -G Ninja -DCMAKE_CXX_FLAGS="-Xclang -fcolor-diagnostics" -DCMAKE_PREFIX_PATH=$(brew --prefix qt6) -DDISTRIBUTOR="Mario Party Netplay" + # Build Project + - name: Run Ninja + if: matrix.os == 'macos-latest' + run: cd build && ninja -j4 + # Run MSBuild + - name: Build Solution + if: matrix.os == 'windows-latest' + run: msbuild "D:\a\Dolphin-MPN\Dolphin-MPN\Source\dolphin-emu.sln" /verbosity:minimal /property:Configuration=Release /property:Platform=x64 + # Setup Packages + - name: Setup Packages + if: matrix.os == 'linux-latest' + run: sudo apt update && sudo apt upgrade && sudo apt install p7zip-full build-essential git cmake ffmpeg libavcodec-dev libavformat-dev libavutil-dev libswscale-dev libevdev-dev libusb-1.0-0-dev libxrandr-dev libxi-dev libpangocairo-1.0-0 qt6-base-private-dev libbluetooth-dev libasound2-dev libpulse-dev libgl1-mesa-dev libudev-dev libsystemd-dev dpkg-dev + # Run CMake + - name: Run CMake + if: matrix.os == 'linux-latest' + run: mkdir build && cd build && cmake .. -G Ninja -DLINUX_LOCAL_DEV=true -DCPACK_PACKAGE_CONTACT="Mario Party Netplay" -DDISTRIBUTOR="Mario Party Netplay" + # Build Project + - name: Run Make + if: matrix.os == 'linux-latest' + run: cd build && ninja -j$(nproc) + # Configure Dolphin + - name: Configure Dolphin + if: matrix.os == 'linux-latest' + run: cd build && cp -r ../Data/Sys/ Binaries/ && cp -r ../Data/User/ Binaries/ && cp -r ../Data/dolphin-emu.png Binaries/ && touch Binaries/portable.txt + # Upload Artifact + - name: Upload Build Artifact + if: matrix.os == 'windows-latest' + uses: actions/upload-artifact@v2 + with: + name: DolphinMPN-win32 + path: D:\a\Dolphin-MPN\Dolphin-MPN\Binary\x64 + # Upload Artifact + - name: Upload Build Artifact + if: matrix.os == 'macos-latest' + uses: actions/upload-artifact@v2 + with: + name: DolphinMPN-macOS + path: /Users/runner/work/Dolphin-MPN/Dolphin-MPN/build/Binaries/ + # Upload Artifact + - name: Upload Build Artifact + if: matrix.os == 'linux-latest' + uses: actions/upload-artifact@v2 + with: + name: DolphinMPN-Linux + path: /home/runner/work/Dolphin-MPN/Dolphin-MPN/build/Binaries/