-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
132 additions
and
363 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,18 +4,37 @@ env: | |
BUILD_TYPE: Release | ||
QT_Version: '6.8.1' | ||
workspace: 'D:/a/Commander_Wars/Commander_Wars' | ||
GCC_PATH: 'D:/a/Commander_Wars/Commander_Wars/qt/Qt/Tools/mingw1310_64/bin/' | ||
JAVA_PATH: 'C:/hostedtoolcache/windows/Java_Temurin-Hotspot_jdk/17.0.13-11/x64/' | ||
|
||
ANDROID_OPEN_SSL_TAG: '57056d6dd94c235a67b1bc0e4befdba8f9e11c8d' | ||
|
||
jobs: | ||
create_release: | ||
if: startsWith(github.ref, 'refs/tags/Beta') | ||
name: Create release | ||
runs-on: ubuntu-latest | ||
outputs: | ||
upload_url: ${{steps.create_release.outputs.upload_url}} | ||
steps: | ||
- name: Create release | ||
id: create_release | ||
uses: actions/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} | ||
with: | ||
tag_name: ${{github.ref}} | ||
release_name: Release ${{github.ref}} | ||
draft: false | ||
prerelease: true | ||
body: | | ||
Latest Commander Wars Release | ||
See the github wiki for the related change log: | ||
https://github.com/Robosturm/Commander_Wars/wiki | ||
install: | ||
name: All | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
buildTarget: [windows-desktop, windows-server, ubuntu-desktop, macos-desktop, android-armv7, android-arm64_v8a] | ||
buildTarget: [windows-desktop, windows-server, ubuntu-desktop, ubuntu-server, macos-desktop, android-armv7, android-arm64_v8a] | ||
include: | ||
- buildTarget: windows-desktop | ||
os: windows-latest | ||
|
@@ -25,16 +44,20 @@ jobs: | |
qtTools: 'tools_mingw1310' | ||
installerCommands1: choco install openssl --version=3.3.2 --force -y --install-arguments="'/DIR=C:/openSsl/'" | ||
installerCommands2: '' | ||
source_asset: 'Commander_Wars.zip' | ||
asset_name: 'Commander_Wars_Win10_x64.zip' | ||
cmakeOptions: '"-DCMAKE_GENERATOR:STRING=MinGW Makefiles" -DOPENSSL_LIB_PATH="C:/openSsl/bin" -DOPENSSL_INCLUDE_DIR="C:/openSsl/include" -DOPENSSL_USE_STATIC_LIBS="ON" -DPRECOMPILEDOPENSSL="ON" "-DCMAKE_C_COMPILER:FILEPATH=D:/a/Commander_Wars/Commander_Wars/qt/Qt/Tools/mingw1310_64/bin/gcc.exe" "-DCMAKE_CXX_COMPILER:FILEPATH=D:/a/Commander_Wars/Commander_Wars/qt/Qt/Tools/mingw1310_64/bin/g++.exe"' | ||
- buildTarget: windows-server # test build to check if the server configuration compiles as well | ||
- buildTarget: windows-server | ||
os: windows-latest | ||
COMPILER_VERSION: 'win64_mingw' | ||
target: 'desktop' | ||
qtPath: 'mingw_64' | ||
qtTools: 'tools_mingw1310' | ||
installerCommands1: choco install openssl --version=3.3.2 --force -y --install-arguments="'/DIR=C:/openSsl/'" | ||
installerCommands2: '' | ||
cmakeOptions: '"-DCMAKE_GENERATOR:STRING=MinGW Makefiles" -DOPENSSL_LIB_PATH="C:/openSsl/bin" -DOPENSSL_INCLUDE_DIR="C:/openSsl/include" -DOPENSSL_USE_STATIC_LIBS="ON" -DPRECOMPILEDOPENSSL="ON" -DOPENSSL_USE_STATIC_LIBS=FALSE -DGRAPHICSUPPORT=OFF -DAUDIOSUPPORT=OFF -DUPDATESUPPORT=OFF "-DCMAKE_C_COMPILER:FILEPATH=D:/a/Commander_Wars/Commander_Wars/qt/Qt/Tools/mingw1310_64/bin/gcc.exe" "-DCMAKE_CXX_COMPILER:FILEPATH=D:/a/Commander_Wars/Commander_Wars/qt/Qt/Tools/mingw1310_64/bin/g++.exe"' | ||
source_asset: 'Commander_Wars.zip' | ||
asset_name: 'Commander_Wars_Win10_x64_Server.zip' | ||
cmakeOptions: '"-DCMAKE_GENERATOR:STRING=MinGW Makefiles" -DOPENSSL_LIB_PATH="C:/openSsl/bin" -DOPENSSL_INCLUDE_DIR="C:/openSsl/include" -DOPENSSL_USE_STATIC_LIBS="ON" -DPRECOMPILEDOPENSSL="ON" -DGRAPHICSUPPORT=OFF -DAUDIOSUPPORT=OFF -DUPDATESUPPORT=OFF "-DCMAKE_C_COMPILER:FILEPATH=D:/a/Commander_Wars/Commander_Wars/qt/Qt/Tools/mingw1310_64/bin/gcc.exe" "-DCMAKE_CXX_COMPILER:FILEPATH=D:/a/Commander_Wars/Commander_Wars/qt/Qt/Tools/mingw1310_64/bin/g++.exe"' | ||
- buildTarget: ubuntu-desktop | ||
os: ubuntu-latest | ||
COMPILER_VERSION: '' | ||
|
@@ -43,9 +66,24 @@ jobs: | |
qtTools: '' | ||
installerCommands1: 'sudo apt-get update' | ||
installerCommands2: 'sudo apt-get install libxcb-cursor0 libfuse2 gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-libav gstreamer1.0-tools gstreamer1.0-x gstreamer1.0-alsa gstreamer1.0-gl gstreamer1.0-gtk3 gstreamer1.0-qt5 gstreamer1.0-pulseaudio' | ||
cmakeOptions: '-DUSEAPPCONFIGPATH:BOOL=ON -DOPENSSL_USE_STATIC_LIBS:BOOL=OFF -DUPDATESUPPORT=OFF' | ||
source_asset: 'Commander_Wars-x86_64.AppImage' | ||
asset_name: 'Commander_Wars-Linux.AppImage' | ||
cmakeOptions: ' -DOPENSSL_USE_STATIC_LIBS=FALSE' | ||
serverFlag: '' | ||
linuxFlag: 'linux' | ||
- buildTarget: ubuntu-server | ||
os: ubuntu-latest | ||
COMPILER_VERSION: '' | ||
target: 'desktop' | ||
qtPath: '' | ||
qtTools: '' | ||
installerCommands1: 'sudo apt-get update' | ||
installerCommands2: 'sudo apt-get install libxcb-cursor0 libfuse2 gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-libav gstreamer1.0-tools gstreamer1.0-x gstreamer1.0-alsa gstreamer1.0-gl gstreamer1.0-gtk3 gstreamer1.0-qt5 gstreamer1.0-pulseaudio' | ||
source_asset: 'Commander_Wars_Dedicated_Server-x86_64.AppImage' | ||
asset_name: 'Commander_Wars-Linux-Server.AppImage' | ||
cmakeOptions: '-DGRAPHICSUPPORT=OFF -DAUDIOSUPPORT=OFF -DUPDATESUPPORT=OFF -DOPENSSL_USE_STATIC_LIBS=FALSE' | ||
serverFlag: '-server' | ||
linuxFlag: 'linux' | ||
- buildTarget: macos-desktop | ||
os: macos-latest | ||
COMPILER_VERSION: 'clang_64' | ||
|
@@ -54,6 +92,8 @@ jobs: | |
target: 'desktop' | ||
installerCommands1: '' | ||
installerCommands2: '' | ||
source_asset: 'Commander_Wars.zip' | ||
asset_name: 'Commander_Wars_macOS.zip' | ||
cmakeOptions: '-DOPENSSL_ROOT_DIR=/usr/local/opt/openssl' | ||
- buildTarget: android-armv7 | ||
os: windows-latest | ||
|
@@ -67,8 +107,10 @@ jobs: | |
qtCoreToolsPath: 'mingw_64' | ||
installerCommands1: 'choco install ninja' | ||
installerCommands2: '' | ||
source_asset: 'android-build/build/outputs/apk/release/android-build-release-signed.apk' | ||
asset_name: 'Commander_Wars_armeabi-v7a.apk' | ||
cmakeOptions: '' | ||
openSslabiPath: 'android_openssl/ssl_3/armeabi-v7a' | ||
openSslabiPath: 'android_openssl/ssl_3/armeabi-v7a' | ||
- buildTarget: android-arm64_v8a | ||
os: windows-latest | ||
COMPILER_VERSION: 'android_arm64_v8a' | ||
|
@@ -81,14 +123,16 @@ jobs: | |
qtCoreToolsPath: 'mingw_64' | ||
installerCommands1: 'choco install ninja' | ||
installerCommands2: '' | ||
source_asset: 'android-build/build/outputs/apk/release/android-build-release-signed.apk' | ||
asset_name: 'Commander_Wars_arm64-v8a.apk' | ||
cmakeOptions: '' | ||
openSslabiPath: 'android_openssl/ssl_3/arm64-v8a' | ||
|
||
|
||
needs: create_release | ||
runs-on: ${{matrix.os}} | ||
defaults: | ||
run: | ||
shell: bash | ||
|
||
steps: | ||
- name: Checkout openssl | ||
if: matrix.target == 'android' | ||
|
@@ -127,7 +171,7 @@ jobs: | |
install-deps: "true" | ||
tools: '${{matrix.qtTools}}' | ||
set-env: 'true' | ||
|
||
- name: Install OS Dependencies 1 | ||
run: ${{matrix.installerCommands1}} | ||
|
||
|
@@ -141,15 +185,15 @@ jobs: | |
-S "${{github.workspace}}/source" \ | ||
-B '${{github.workspace}}/build' \ | ||
-DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} \ | ||
-DCMAKE_INSTALL_PREFIX='${{github.workspace}}/install' \ | ||
-DCMAKE_INSTALL_PREFIX='${{github.workspace}}/install/Commander_Wars_Release' \ | ||
-DCMAKE_PREFIX_PATH="${{github.workspace}}/qt/Qt/${{env.QT_Version}}/${{matrix.qtPath}}/" \ | ||
-DQt6_DIR="${{github.workspace}}/qt/Qt/${{env.QT_Version}}/${{matrix.qtPath}}/lib/cmake/Qt6/" \ | ||
-DQt6_DIR=${{github.workspace}}/qt/Qt/${{env.QT_Version}}/${{matrix.qtPath}}/lib/cmake/Qt6/ \ | ||
-DUPDATESUPPORT=ON \ | ||
-DCOW_BUILD_TAG="Dummy" \ | ||
-DCOW_UPDATETARGET="Dummy" \ | ||
-DCOW_INSTALLDIR="Commander_Wars_Release" \ | ||
-DCOW_BUILD_TAG="${{github.ref}}" \ | ||
-DCOW_UPDATETARGET="${{matrix.asset_name}}" \ | ||
-DCOW_INSTALL_DIR="Commander_Wars_Release" \ | ||
${{matrix.cmakeOptions}} | ||
- name: Configure android cmake | ||
if: matrix.target == 'android' | ||
run: | | ||
|
@@ -182,32 +226,16 @@ jobs: | |
-DCOW_INSTALL_DIR="Commander_Wars_Release" \ | ||
-DCMAKE_INSTALL_PREFIX="${{github.workspace}}/install" | ||
- name: Build other && matrix.linuxFlag != 'linux' | ||
if: matrix.target != 'android' | ||
- name: Build other | ||
if: matrix.target != 'android' && matrix.linuxFlag != 'linux' | ||
working-directory: '${{github.workspace}}/build' | ||
run: cmake --build '${{github.workspace}}/build' --target install -j4 | ||
|
||
- name: Build android | ||
if: matrix.target == 'android' | ||
working-directory: '${{github.workspace}}/build' | ||
run: cmake --build '${{github.workspace}}/build' --target all -j4 | ||
|
||
- name: Build linux | ||
if: matrix.linuxFlag == 'linux' | ||
run: | | ||
"${{github.workspace}}"/source/distribution/build_linux_appimage.sh \ | ||
${{matrix.serverFlag}} \ | ||
-DQt6_DIR=${{github.workspace}}/qt/Qt/${{env.QT_Version}}/${{matrix.qtPath}}/lib/cmake/Qt6/ \ | ||
-DUPDATESUPPORT=OFF \ | ||
-DCOW_BUILD_TAG="${{github.ref}}" \ | ||
-DCOW_UPDATETARGET="${{matrix.asset_name}}" \ | ||
-DCOW_INSTALL_DIR="Commander_Wars_Release" \ | ||
${{matrix.cmakeOptions}} | ||
|
||
- name: create pdb | ||
if: matrix.COMPILER_VERSION == 'win64_mingw' | ||
run: cmake --build '${{github.workspace}}/build' --config $BUILD_TYPE --target createPdb | ||
|
||
- name: Bundle APK | ||
if: matrix.target == 'android' | ||
env: | ||
|
@@ -224,4 +252,71 @@ jobs: | |
--gradle \ | ||
--release \ | ||
--sign | ||
- name: Build linux | ||
if: matrix.linuxFlag == 'linux' | ||
run: | | ||
"${{github.workspace}}"/source/distribution/build_linux_appimage.sh \ | ||
${{matrix.serverFlag}} \ | ||
-DQt6_DIR=${{github.workspace}}/qt/Qt/${{env.QT_Version}}/${{matrix.qtPath}}/lib/cmake/Qt6/ \ | ||
-DUPDATESUPPORT=OFF \ | ||
-DCOW_BUILD_TAG="${{github.ref}}" \ | ||
-DCOW_UPDATETARGET="${{matrix.asset_name}}" \ | ||
-DCOW_INSTALL_DIR="Commander_Wars_Release" \ | ||
${{matrix.cmakeOptions}} | ||
#---------------------------------------------------------------------------------------------------------------------------------------------- | ||
# release creation and upload part | ||
#---------------------------------------------------------------------------------------------------------------------------------------------- | ||
|
||
- name: create pdb | ||
if: matrix.COMPILER_VERSION == 'win64_mingw' | ||
run: cmake --build '${{github.workspace}}/build' --config $BUILD_TYPE --target createPdb | ||
|
||
- name: build artifacts | ||
if: matrix.target != 'android' && matrix.linuxFlag != 'linux' | ||
run: cmake --build '${{github.workspace}}/build' --config $BUILD_TYPE --target createReleaseZip | ||
|
||
- name: upload artifact android | ||
if: matrix.target == 'android' && startsWith(github.ref, 'refs/tags/Beta') | ||
uses: actions/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{github.token}} | ||
with: | ||
upload_url: '${{needs.create_release.outputs.upload_url}}' | ||
asset_path: '${{github.workspace}}/build/${{matrix.source_asset}}' | ||
asset_name: '${{matrix.asset_name}}' | ||
asset_content_type: application/vnd.android.package-archive | ||
|
||
- name: upload artifact linux | ||
if: matrix.linuxFlag == 'linux' && startsWith(github.ref, 'refs/tags/Beta') | ||
uses: actions/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{github.token}} | ||
with: | ||
upload_url: '${{needs.create_release.outputs.upload_url}}' | ||
asset_path: '${{github.workspace}}/source/${{matrix.source_asset}}' | ||
asset_name: '${{matrix.asset_name}}' | ||
asset_content_type: application/x-executable | ||
|
||
- name: upload other artifacts | ||
if: matrix.target != 'android' && matrix.linuxFlag != 'linux' && startsWith(github.ref, 'refs/tags/Beta') | ||
uses: actions/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{github.token}} | ||
with: | ||
upload_url: '${{needs.create_release.outputs.upload_url}}' | ||
asset_path: '${{github.workspace}}/install/${{matrix.source_asset}}' | ||
asset_name: '${{matrix.asset_name}}' | ||
asset_content_type: application/zip | ||
|
||
- name: upload unofficial compatible pack | ||
uses: actions/[email protected] | ||
if: matrix.buildTarget == 'windows-server' && startsWith(github.ref, 'refs/tags/Beta') | ||
env: | ||
GITHUB_TOKEN: ${{github.token}} | ||
with: | ||
upload_url: '${{needs.create_release.outputs.upload_url}}' | ||
asset_name: 'UnofficialCommanderWars_Win7CompatiblePack.zip' | ||
asset_path: '${{github.workspace}}/source/3rd_party/unofficialWin7Support/UnofficialCommanderWars_Win7CompatiblePack.zip' | ||
asset_content_type: application/zip |
Oops, something went wrong.