mirror of
https://github.com/EQEmu/Server.git
synced 2026-04-27 08:12:27 +00:00
Consolidate
This commit is contained in:
parent
437c8eb9f5
commit
107c2e9887
39
.drone.yml
39
.drone.yml
@ -49,51 +49,18 @@ volumes:
|
|||||||
path: /var/lib/cache-release
|
path: /var/lib/cache-release
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Init
|
- name: Build Linux X64
|
||||||
image: akkadius/eqemu-server:v11
|
image: akkadius/eqemu-server:v11
|
||||||
environment:
|
environment:
|
||||||
GITHUB_TOKEN:
|
GITHUB_TOKEN:
|
||||||
from_secret: GH_RELEASE_GITHUB_API_TOKEN
|
from_secret: GH_RELEASE_GITHUB_API_TOKEN
|
||||||
commands:
|
|
||||||
- ./utils/scripts/build/should-release/should-release
|
|
||||||
- sudo chown eqemu:eqemu /drone/src/ * -R
|
|
||||||
- sudo chown eqemu:eqemu /home/eqemu/.ccache/ * -R
|
|
||||||
- git submodule init && git submodule update
|
|
||||||
volumes:
|
|
||||||
- name: cache
|
|
||||||
path: /home/eqemu/.ccache/
|
|
||||||
- name: Linux x64
|
|
||||||
image: akkadius/eqemu-server:v11
|
|
||||||
commands:
|
|
||||||
- mkdir -p build && cd build && cmake -DEQEMU_BUILD_TESTS=ON -DEQEMU_BUILD_LOGIN=ON -DEQEMU_BUILD_LUA=ON -DCMAKE_CXX_FLAGS_RELWITHDEBINFO:STRING="-Os" -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -G 'Unix Makefiles' .. && make -j$((`nproc`-4))
|
|
||||||
- curl https://raw.githubusercontent.com/Akkadius/eqemu-install-v2/master/eqemu_config.json --output eqemu_config.json
|
|
||||||
- ./bin/tests
|
|
||||||
volumes:
|
|
||||||
- name: cache
|
|
||||||
path: /home/eqemu/.ccache/
|
|
||||||
- name: Package Artifact
|
|
||||||
image: akkadius/eqemu-server:v11
|
|
||||||
commands:
|
|
||||||
- rm ./build/bin/*.a
|
|
||||||
- zip -j eqemu-server-linux-x64.zip ./build/bin/*
|
|
||||||
- ls -lsh | grep zip
|
|
||||||
volumes:
|
|
||||||
- name: cache
|
|
||||||
path: /home/eqemu/.ccache/
|
|
||||||
- name: Upload Artifact
|
|
||||||
image: akkadius/eqemu-build-releaser:v2
|
|
||||||
environment:
|
|
||||||
RCLONE_CONFIG_REMOTE_TYPE: ftp
|
RCLONE_CONFIG_REMOTE_TYPE: ftp
|
||||||
RCLONE_FTP_HOST: drone.akkadius.com
|
RCLONE_FTP_HOST: drone.akkadius.com
|
||||||
RCLONE_FTP_USER: artifacts
|
RCLONE_FTP_USER: artifacts
|
||||||
RCLONE_FTP_PASS:
|
RCLONE_FTP_PASS:
|
||||||
from_secret: RCLONE_FTP_PASS
|
from_secret: RCLONE_FTP_PASS
|
||||||
commands:
|
commands:
|
||||||
- rclone config create remote ftp env_auth true > /dev/null
|
- ./utils/scripts/build/linux-build.sh
|
||||||
- |
|
|
||||||
rclone copy eqemu-server-linux-x64.zip remote:
|
|
||||||
- |
|
|
||||||
rclone ls remote:
|
|
||||||
|
|
||||||
trigger:
|
trigger:
|
||||||
branch:
|
branch:
|
||||||
@ -115,7 +82,7 @@ platform:
|
|||||||
arch: amd64
|
arch: amd64
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Build Windows X64 Release
|
- name: Build Windows X64
|
||||||
environment:
|
environment:
|
||||||
RCLONE_CONFIG_REMOTE_TYPE: ftp
|
RCLONE_CONFIG_REMOTE_TYPE: ftp
|
||||||
RCLONE_FTP_HOST: drone.akkadius.com
|
RCLONE_FTP_HOST: drone.akkadius.com
|
||||||
|
|||||||
@ -1,12 +0,0 @@
|
|||||||
git submodule init
|
|
||||||
git submodule update
|
|
||||||
.\utils\scripts\build\windows-build.ps1
|
|
||||||
|
|
||||||
.\utils\scripts\build\should-release\should-release.exe || echo Not releasing, exit gracefully && exit /b 0
|
|
||||||
|
|
||||||
Powershell.exe -executionpolicy remotesigned -File .\utils\scripts\build\package-artifacts.ps1
|
|
||||||
|
|
||||||
dir *.zip
|
|
||||||
rclone config create remote ftp env_auth true
|
|
||||||
rclone copy eqemu-server-windows-x64.zip remote:
|
|
||||||
rclone ls remote:
|
|
||||||
24
utils/scripts/build/linux-build.sh
Executable file
24
utils/scripts/build/linux-build.sh
Executable file
@ -0,0 +1,24 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -x
|
||||||
|
|
||||||
|
sudo chown eqemu:eqemu /drone/src/ * -R
|
||||||
|
sudo chown eqemu:eqemu /home/eqemu/.ccache/ * -R
|
||||||
|
|
||||||
|
git submodule init && git submodule update
|
||||||
|
|
||||||
|
mkdir -p build && cd build && cmake -DEQEMU_BUILD_TESTS=ON -DEQEMU_BUILD_LOGIN=ON -DEQEMU_BUILD_LUA=ON CMAKE_CXX_FLAGS_RELWITHDEBINFO:STRING="-Os" -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -G 'Unix Makefiles' .. && make -j$((`nproc`-4))
|
||||||
|
|
||||||
|
curl https://raw.githubusercontent.com/Akkadius/eqemu-install-v2/master/eqemu_config.json --output eqemu_config.json
|
||||||
|
./bin/tests
|
||||||
|
|
||||||
|
./utils/scripts/build/should-release/should-release || exit
|
||||||
|
|
||||||
|
rm ./build/bin/*.a
|
||||||
|
zip -j eqemu-server-linux-x64.zip ./build/bin/*
|
||||||
|
|
||||||
|
# shellcheck disable=SC2010
|
||||||
|
ls -lsh | grep zip
|
||||||
|
rclone config create remote ftp env_auth true > /dev/null
|
||||||
|
rclone copy eqemu-server-linux-x64.zip remote:
|
||||||
|
rclone ls remote:
|
||||||
@ -1,32 +1,32 @@
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
# $cwd = Get-Location
|
$cwd = Get-Location
|
||||||
#
|
|
||||||
# Set-Location -Path "$cwd"
|
Set-Location -Path "$cwd"
|
||||||
#
|
|
||||||
# git submodule init
|
git submodule init
|
||||||
# git submodule update
|
git submodule update
|
||||||
#
|
|
||||||
# if (![System.IO.Directory]::Exists("$cwd\win-build-x64"))
|
if (![System.IO.Directory]::Exists("$cwd\win-build-x64"))
|
||||||
# {
|
{
|
||||||
# Write-Information -MessageData "Creating build x64 folder" -InformationAction Continue
|
Write-Information -MessageData "Creating build x64 folder" -InformationAction Continue
|
||||||
# New-Item -Path "$cwd\win-build-x64" -ItemType Directory
|
New-Item -Path "$cwd\win-build-x64" -ItemType Directory
|
||||||
# }
|
}
|
||||||
#
|
|
||||||
# Write-Information -MessageData "Creating build x64" -InformationAction Continue
|
Write-Information -MessageData "Creating build x64" -InformationAction Continue
|
||||||
# Set-Location -Path "$cwd\win-build-x64"
|
Set-Location -Path "$cwd\win-build-x64"
|
||||||
# cmake -Wno-dev -G "Visual Studio 17 2022" -A x64 -DEQEMU_BUILD_TESTS=ON -DEQEMU_BUILD_LOGIN=ON -DEQEMU_BUILD_ZLIB=ON "$cwd"
|
cmake -Wno-dev -G "Visual Studio 17 2022" -A x64 -DEQEMU_BUILD_TESTS=ON -DEQEMU_BUILD_LOGIN=ON -DEQEMU_BUILD_ZLIB=ON "$cwd"
|
||||||
# cmake --build . --config RelWithDebInfo --clean-first
|
cmake --build . --config RelWithDebInfo --clean-first
|
||||||
# Set-Location -Path "$cwd"
|
Set-Location -Path "$cwd"
|
||||||
#
|
|
||||||
# 7z a eqemu-server-windows-x64.zip $cwd\win-build-x64\bin\RelWithDebInfo\*.exe $cwd\win-build-x64\bin\RelWithDebInfo\*.dll $cwd\win-build-x64\bin\RelWithDebInfo\*.pdb $cwd\win-build-x64\libs\zlibng\RelWithDebInfo\*.dll $cwd\win-build-x64\libs\zlibng\RelWithDebInfo\*.pdb
|
7z a eqemu-server-windows-x64.zip $cwd\win-build-x64\bin\RelWithDebInfo\*.exe $cwd\win-build-x64\bin\RelWithDebInfo\*.dll $cwd\win-build-x64\bin\RelWithDebInfo\*.pdb $cwd\win-build-x64\libs\zlibng\RelWithDebInfo\*.dll $cwd\win-build-x64\libs\zlibng\RelWithDebInfo\*.pdb
|
||||||
|
|
||||||
.\utils\scripts\build\should-release\should-release.exe; if ($LASTEXITCODE -ne 0) { exit }
|
.\utils\scripts\build\should-release\should-release.exe; if ($LASTEXITCODE -ne 0) { exit }
|
||||||
|
|
||||||
# dir *.zip
|
dir *.zip
|
||||||
# rclone config create remote ftp env_auth true
|
rclone config create remote ftp env_auth true
|
||||||
# rclone copy eqemu-server-windows-x64.zip remote:
|
rclone copy eqemu-server-windows-x64.zip remote:
|
||||||
# rclone ls remote:
|
rclone ls remote:
|
||||||
}
|
}
|
||||||
catch
|
catch
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user