mirror of
https://github.com/UltimMC/Launcher.git
synced 2025-12-24 12:32:42 +00:00
192 lines
6.8 KiB
YAML
192 lines
6.8 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [ develop ]
|
|
pull_request:
|
|
branches: [ develop ]
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build:
|
|
name: build-linux
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Install Dependencies
|
|
run: |
|
|
sudo apt update
|
|
sudo apt install openjdk-8-jdk libgl1-mesa-dev qt5-default
|
|
- name: Clone
|
|
run: |
|
|
mkdir ~/MultiMC
|
|
cd ~/MultiMC
|
|
mkdir build
|
|
mkdir MultiMC
|
|
git clone --recursive https://github.com/Sebastian-byte/MultiMC5-Cracked.git src
|
|
- name: Compile
|
|
run: |
|
|
cd ~/MultiMC/build
|
|
cmake -DCMAKE_INSTALL_PREFIX=../MultiMC -DCMAKE_BUILD_TYPE=Release -DMultiMC_NOTIFICATION_URL:STRING=https://files.multimc.org/notifications.json -DMultiMC_CHANLIST_URL=https://files.multimc.org/update/lin64/channels.json -DMultiMC_PASTE_EE_API_KEY:STRING=utLvciUouSURFzfjPxLBf5W4ISsUX4pwBDF7N1AfZ -DMultiMC_ANALYTICS_ID:STRING=UA-87731965-2 -DMultiMC_LAYOUT=lin-nodeps -DMultiMC_VERSION_BUILD=2064 -DMultiMC_BUILD_PLATFORM=lin64 ../src
|
|
make tcversion
|
|
make -j$(nproc)
|
|
- name: Test
|
|
run: |
|
|
cd ~/MultiMC/build
|
|
make test
|
|
cmake -E remove_directory "/home/runner/MultiMC/MultiMC"
|
|
- name: Install
|
|
run: |
|
|
cd ~/MultiMC/build
|
|
make install
|
|
- name: Archive production artifacts
|
|
uses: actions/upload-artifact@v2
|
|
with:
|
|
name: MultiMC
|
|
path: /home/runner/MultiMC/MultiMC
|
|
|
|
build-windows:
|
|
name: build-windows
|
|
runs-on: windows-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 1
|
|
|
|
- name: Checkout submodules
|
|
run: git submodule update --init
|
|
|
|
- name: Creates QtAccount File
|
|
uses: DamianReeves/write-file-action@v1.0
|
|
if: steps.qt-cached.outputs.cache-hit != 'true'
|
|
with:
|
|
path: "C:\\Users\\runneradmin\\AppData\\Roaming\\Qt\\qtaccount.ini"
|
|
contents: ${{ secrets.QTACCOUNT }}
|
|
|
|
- name: Cache Qt Installed
|
|
uses: actions/cache@v2.1.5
|
|
id: qt-cached
|
|
with:
|
|
path: "D:/Qt"
|
|
key: ${{ runner.os }}-qt56-installed-d
|
|
|
|
- name: Cache Qt Installer
|
|
uses: actions/cache@v2.1.5
|
|
if: steps.qt-cached.outputs.cache-hit != 'true'
|
|
id: installer-cached
|
|
with:
|
|
path: "installer.exe"
|
|
key: ${{ runner.os }}-qt56-installer
|
|
|
|
- name: Download Qt Installer
|
|
if: steps.installer-cached.outputs.cache-hit != 'true' && steps.qt-cached.outputs.cache-hit != 'true'
|
|
run: |
|
|
curl https://download.qt.io/new_archive/qt/5.6/5.6.3/qt-opensource-windows-x86-mingw492-5.6.3.exe --output installer.exe
|
|
|
|
- name: Download Qt non-Interactive Script
|
|
if: steps.qt-cached.outputs.cache-hit != 'true'
|
|
run: |
|
|
curl https://gist.githubusercontent.com/PibePlayer/cf6bd0a9f7e4d51e3e618ceedfba4b94/raw/09cb1415952b914f1567ce935d4618c396aec340/qt-installer-noninteractive.qs --output nonInteractive.qs
|
|
|
|
- name: Install Qt 5.6.3
|
|
if: steps.qt-cached.outputs.cache-hit != 'true'
|
|
shell: cmd
|
|
run: |
|
|
installer.exe -v --script nonInteractive.qs --silent
|
|
|
|
- name: Setup CMake
|
|
uses: jwlawson/actions-setup-cmake@v1.9
|
|
with:
|
|
use-32bit: 'true'
|
|
|
|
- name: Setup JDK
|
|
uses: actions/setup-java@v2
|
|
with:
|
|
distribution: 'zulu'
|
|
java-version: '8'
|
|
architecture: x86
|
|
|
|
- name: Setup zlib
|
|
run: |
|
|
mkdir zlib
|
|
cd zlib
|
|
curl -L https://razaoinfo.dl.sourceforge.net/project/gnuwin32/zlib/1.2.3/zlib-1.2.3-bin.zip -o zlib.zip
|
|
curl -L https://ufpr.dl.sourceforge.net/project/gnuwin32/zlib/1.2.3/zlib-1.2.3-lib.zip -o zliblibs.zip
|
|
unzip zlib.zip
|
|
unzip zliblibs.zip
|
|
cd ..
|
|
|
|
- name: Setup OpenSSL
|
|
run: |
|
|
mkdir OpenSSL
|
|
cd OpenSSL
|
|
curl -L https://github.com/IndySockets/OpenSSL-Binaries/raw/master/Archive/openssl-1.0.2g-i386-win32.zip -o OpenSSL.zip
|
|
unzip OpenSSL.zip
|
|
cd ..
|
|
|
|
- name: Setup PATH
|
|
shell: cmd
|
|
run: |
|
|
set PATH=D:\Qt\5.6.3\mingw49_32\bin;D:/Qt/Tools/mingw492_32\bin;%PATH%
|
|
set PATH=%CD%\zlib;%CD%\zlib\bin;%PATH%
|
|
set PATH=%CD%\OpenSSL;%PATH%
|
|
set PATH=C:\hostedtoolcache\windows\Java_Zulu_jdk\8.0.292-10\x86\bin;%PATH%
|
|
|
|
- name: Build
|
|
shell: cmd
|
|
if: steps.build-cached.outputs.cache-hit != 'true'
|
|
run: |
|
|
set PATH=D:\Qt\5.6.3\mingw49_32\bin;D:/Qt/Tools/mingw492_32\bin;%PATH%
|
|
set PATH=%CD%\zlib;%CD%\zlib\bin;%CD%\zlib\lib;%CD%\zlib\include;%PATH%
|
|
set PATH=%CD%\OpenSSL;%PATH%
|
|
set PATH=C:\hostedtoolcache\windows\Java_Zulu_jdk\8.0.292-10\x86\bin;%PATH%
|
|
set PATH=%CD%\cmake-3.20.2-windows-i386\bin;%PATH%
|
|
echo %PATH%
|
|
set CC=D:\Qt\Tools\mingw492_32\bin\gcc.exe
|
|
set CXX=D:\Qt\Tools\mingw492_32\bin\g++.exe
|
|
mkdir build
|
|
cd build
|
|
copy D:/Qt/Tools/mingw492_32\bin\mingw32-make.exe D:/Qt/Tools/mingw492_32\bin\make.exe
|
|
cmake -DCMAKE_BUILD_TYPE=Release -DMultiMC_NOTIFICATION_URL:STRING=https://files.multimc.org/notifications.json -DCMAKE_INSTALL_PREFIX:PATH="D:/MultiMC-Cracked" -DMultiMC_CHANLIST_URL=https://files.multimc.org/update/win32/channels.json -DMultiMC_PASTE_EE_API_KEY:STRING=utLvciUouSURFzfjPxLBf5W4ISsUX4pwBDF7N1AfZ -DMultiMC_ANALYTICS_ID:STRING=UA-87731965-2 -DMultiMC_LAYOUT=win-bundle -DMultiMC_VERSION_BUILD=2065 -DMultiMC_VERSION_CHANNEL=refs/heads/develop -DMultiMC_BUILD_PLATFORM=win32 -G "MinGW Makefiles" ..
|
|
|
|
- name: Compile
|
|
shell: cmd
|
|
run: |
|
|
set PATH=D:\Qt\5.6.3\mingw49_32\bin;D:/Qt/Tools/mingw492_32\bin;%PATH%
|
|
set PATH=%CD%\zlib;%CD%\zlib\bin;%PATH%
|
|
set PATH=%CD%\OpenSSL;%PATH%
|
|
set PATH=C:\hostedtoolcache\windows\Java_Zulu_jdk\8.0.292-10\x86\bin;%PATH%
|
|
set PATH=%CD%\cmake-3.20.2-windows-i386\bin;%PATH%
|
|
set PATH=C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;%PATH%
|
|
cd build
|
|
mingw32-make tcversion
|
|
mingw32-make -j4
|
|
|
|
- name: Test
|
|
shell: cmd
|
|
run: |
|
|
cd build
|
|
mingw32-make test
|
|
cmake -E remove_directory "D:/MultiMC-Cracked"
|
|
|
|
- name: Install
|
|
shell: cmd
|
|
run: |
|
|
cd build
|
|
mingw32-make install -j4
|
|
|
|
- name: Generate build number
|
|
id: buildnumber
|
|
uses: einaregilsson/build-number@v3
|
|
with:
|
|
token: ${{secrets.github_token}}
|
|
|
|
- name: Upload Artifacts
|
|
uses: actions/upload-artifact@v2.2.3
|
|
with:
|
|
name: MultiMC5-Cracked-Portable-win32-${{ steps.buildnumber.outputs.build_number }}
|
|
path: "D:/MultiMC-Cracked"
|