mirror of
https://github.com/OpenFusionProject/OpenFusion.git
synced 2024-11-22 05:20:05 +00:00
parent
57c9f139a2
commit
041908ddda
95
.github/workflows/check-builds.yaml
vendored
Normal file
95
.github/workflows/check-builds.yaml
vendored
Normal file
@ -0,0 +1,95 @@
|
|||||||
|
name: Check Builds
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
paths:
|
||||||
|
- src/**
|
||||||
|
- vendor/**
|
||||||
|
- .github/workflows/check-builds.yaml
|
||||||
|
- CMakeLists.txt
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
ubuntu-build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
submodules: recursive
|
||||||
|
- name: Install dependencies
|
||||||
|
run: sudo apt install clang cmake snap -y && sudo snap install powershell --classic
|
||||||
|
- name: Check compilation
|
||||||
|
run: |
|
||||||
|
$versions = "104", "728", "1013"
|
||||||
|
|
||||||
|
foreach ($version in $versions) {
|
||||||
|
Write-Output "Cleaning old output"
|
||||||
|
Invoke-Expression "make clean"
|
||||||
|
if ($LASTEXITCODE -ne "0") {
|
||||||
|
Write-Error "make clean failed for version $version" -ErrorAction Stop
|
||||||
|
}
|
||||||
|
Write-Output "Building version $version"
|
||||||
|
Invoke-Expression "make -j8 PROTOCOL_VERSION=$version"
|
||||||
|
if ($LASTEXITCODE -ne "0") {
|
||||||
|
Write-Error "make failed for version $version" -ErrorAction Stop
|
||||||
|
}
|
||||||
|
Rename-Item -Path "bin/fusion" -newName "$version-fusion"
|
||||||
|
Write-Output "Built version $version"
|
||||||
|
}
|
||||||
|
Copy-Item -Path "sql" -Destination "bin/sql" -Recurse
|
||||||
|
Copy-Item -Path "config.ini" -Destination "bin"
|
||||||
|
shell: pwsh
|
||||||
|
- name: Upload build artifact
|
||||||
|
uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: ubuntu20_04-bin-x64
|
||||||
|
path: bin
|
||||||
|
|
||||||
|
windows-build:
|
||||||
|
runs-on: windows-2019
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
submodules: recursive
|
||||||
|
- name: Check compilation
|
||||||
|
run: |
|
||||||
|
$versions = "104", "728", "1013"
|
||||||
|
$configurations = "Release"
|
||||||
|
# "Debug" builds are disabled, since we don't really need them
|
||||||
|
|
||||||
|
$vsPath = "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise"
|
||||||
|
|
||||||
|
Import-Module "$vsPath\Common7\Tools\Microsoft.VisualStudio.DevShell.dll"
|
||||||
|
Enter-VsDevShell -VsInstallPath $vsPath -SkipAutomaticLocation
|
||||||
|
|
||||||
|
Invoke-Expression "vcpkg install sqlite3:x64-windows"
|
||||||
|
Invoke-Expression "vcpkg integrate install"
|
||||||
|
|
||||||
|
foreach ($version in $versions) {
|
||||||
|
if (Test-Path -LiteralPath "build") {
|
||||||
|
Remove-Item "build" -Recurse
|
||||||
|
Write-Output "Deleted existing build folder"
|
||||||
|
}
|
||||||
|
Invoke-Expression "cmake -B build -DPROTOCOL_VERSION=$version -DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake"
|
||||||
|
if ($LASTEXITCODE -ne "0") {
|
||||||
|
Write-Error "cmake generation failed for version $version" -ErrorAction Stop
|
||||||
|
}
|
||||||
|
Write-Output "Generated build files for version $version"
|
||||||
|
|
||||||
|
foreach ($configuration in $configurations) {
|
||||||
|
Write-Output "Building version $version $configuration"
|
||||||
|
Invoke-Expression "msbuild build\OpenFusion.sln /maxcpucount:8 /p:BuildInParallel=true /p:CL_MPCount=8 /p:UseMultiToolTask=true /p:Configuration=$configuration"
|
||||||
|
if ($LASTEXITCODE -ne "0") {
|
||||||
|
Write-Error "msbuild build failed for version $version" -ErrorAction Stop
|
||||||
|
}
|
||||||
|
Rename-Item -Path "bin/$configuration" -newName "$version-$configuration"
|
||||||
|
Write-Output "Built version $version $configuration"
|
||||||
|
Copy-Item -Path "sql" -Destination "bin/$version-$configuration/sql" -Recurse
|
||||||
|
Copy-Item -Path "config.ini" -Destination "bin/$version-$configuration"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
shell: pwsh
|
||||||
|
- name: Upload build artifact
|
||||||
|
uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: windows-vs2019-bin-x64
|
||||||
|
path: bin
|
@ -43,7 +43,10 @@ add_executable(openfusion ${SOURCES})
|
|||||||
|
|
||||||
set_target_properties(openfusion PROPERTIES OUTPUT_NAME ${BIN_NAME})
|
set_target_properties(openfusion PROPERTIES OUTPUT_NAME ${BIN_NAME})
|
||||||
|
|
||||||
target_link_libraries(openfusion sqlite3)
|
# find sqlite3 and use it
|
||||||
|
find_package(sqlite3 REQUIRED)
|
||||||
|
target_include_directories(openfusion PRIVATE ${SQLite3_INCLUDE_DIRS})
|
||||||
|
target_link_libraries(openfusion PRIVATE ${SQLite3_LIBRARIES})
|
||||||
|
|
||||||
# Makes it so config, tdata, etc. get picked up when starting via the debugger in VS
|
# Makes it so config, tdata, etc. get picked up when starting via the debugger in VS
|
||||||
set_property(TARGET openfusion PROPERTY VS_DEBUGGER_WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}")
|
set_property(TARGET openfusion PROPERTY VS_DEBUGGER_WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}")
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
<p align="center">
|
<p align="center">
|
||||||
<a href="https://github.com/OpenFusionProject/OpenFusion/releases/latest"><img src="https://img.shields.io/github/v/release/OpenFusionProject/OpenFusion" alt="Current Release"></a>
|
<a href="https://github.com/OpenFusionProject/OpenFusion/releases/latest"><img src="https://img.shields.io/github/v/release/OpenFusionProject/OpenFusion" alt="Current Release"></a>
|
||||||
<a href="https://ci.appveyor.com/project/OpenFusionProject/openfusion"><img src="https://ci.appveyor.com/api/projects/status/github/OpenFusionProject/OpenFusion?svg=true" alt="AppVeyor"></a>
|
<a href="https://github.com/OpenFusionProject/OpenFusion/actions/workflows/check-builds.yaml"><img src="https://github.com/OpenFusionProject/OpenFusion/actions/workflows/check-build.syaml/badge.svg" alt="Workflow"></a>
|
||||||
<a href="https://discord.gg/DYavckB"><img src="https://img.shields.io/badge/chat-on%20discord-7289da.svg?logo=discord" alt="Discord"></a>
|
<a href="https://discord.gg/DYavckB"><img src="https://img.shields.io/badge/chat-on%20discord-7289da.svg?logo=discord" alt="Discord"></a>
|
||||||
<a href="https://github.com/OpenFusionProject/OpenFusion/blob/master/LICENSE.md"><img src="https://img.shields.io/github/license/OpenFusionProject/OpenFusion" alt="License"></a>
|
<a href="https://github.com/OpenFusionProject/OpenFusion/blob/master/LICENSE.md"><img src="https://img.shields.io/github/license/OpenFusionProject/OpenFusion" alt="License"></a>
|
||||||
</p>
|
</p>
|
||||||
|
90
appveyor.yml
90
appveyor.yml
@ -1,90 +0,0 @@
|
|||||||
version: 'openfusion-{branch}-{build}'
|
|
||||||
|
|
||||||
build_cloud: GCE us-east1-b n2-standard-8
|
|
||||||
skip_branch_with_pr: true
|
|
||||||
|
|
||||||
image:
|
|
||||||
- GCP-Windows-VS2019
|
|
||||||
- GCP-Linux-Ubuntu2004
|
|
||||||
|
|
||||||
platform:
|
|
||||||
- x64
|
|
||||||
|
|
||||||
configuration:
|
|
||||||
- Release
|
|
||||||
|
|
||||||
for:
|
|
||||||
-
|
|
||||||
matrix:
|
|
||||||
only:
|
|
||||||
- image: GCP-Linux-Ubuntu2004
|
|
||||||
build_script:
|
|
||||||
- ps: |
|
|
||||||
$versions = "104", "728", "1013"
|
|
||||||
|
|
||||||
foreach ($version in $versions) {
|
|
||||||
Write-Output "Cleaning old output"
|
|
||||||
Invoke-Expression "make clean"
|
|
||||||
if ($LASTEXITCODE -ne "0") {
|
|
||||||
Write-Error "make clean failed for version $version" -ErrorAction Stop
|
|
||||||
}
|
|
||||||
Write-Output "Building version $version"
|
|
||||||
Invoke-Expression "make -j8 PROTOCOL_VERSION=$version"
|
|
||||||
if ($LASTEXITCODE -ne "0") {
|
|
||||||
Write-Error "make failed for version $version" -ErrorAction Stop
|
|
||||||
}
|
|
||||||
Rename-Item -Path "bin/fusion" -newName "$version-fusion"
|
|
||||||
Write-Output "Built version $version"
|
|
||||||
}
|
|
||||||
Copy-Item -Path "sql" -Destination "bin/sql" -Recurse
|
|
||||||
Copy-Item -Path "config.ini" -Destination "bin"
|
|
||||||
artifacts:
|
|
||||||
- path: bin
|
|
||||||
name: ubuntu20_04-bin-x64
|
|
||||||
type: zip
|
|
||||||
-
|
|
||||||
matrix:
|
|
||||||
only:
|
|
||||||
- image: GCP-Windows-VS2019
|
|
||||||
install:
|
|
||||||
- cmd: vcpkg install sqlite3:x64-windows
|
|
||||||
- cmd: vcpkg integrate install
|
|
||||||
build_script:
|
|
||||||
- ps: |
|
|
||||||
$versions = "104", "728", "1013"
|
|
||||||
$configurations = "Release"
|
|
||||||
# "Debug" builds are disabled, since we don't really need them
|
|
||||||
|
|
||||||
# AppVeyor uses VS2019 Community
|
|
||||||
$vsPath = "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community"
|
|
||||||
|
|
||||||
Import-Module "$vsPath\Common7\Tools\Microsoft.VisualStudio.DevShell.dll"
|
|
||||||
Enter-VsDevShell -VsInstallPath $vsPath -SkipAutomaticLocation
|
|
||||||
|
|
||||||
foreach ($version in $versions) {
|
|
||||||
if (Test-Path -LiteralPath "build") {
|
|
||||||
Remove-Item "build" -Recurse
|
|
||||||
Write-Output "Deleted existing build folder"
|
|
||||||
}
|
|
||||||
Invoke-Expression "cmake -B build -DPROTOCOL_VERSION=$version"
|
|
||||||
if ($LASTEXITCODE -ne "0") {
|
|
||||||
Write-Error "cmake generation failed for version $version" -ErrorAction Stop
|
|
||||||
}
|
|
||||||
Write-Output "Generated build files for version $version"
|
|
||||||
|
|
||||||
foreach ($configuration in $configurations) {
|
|
||||||
Write-Output "Building version $version $configuration"
|
|
||||||
Invoke-Expression "msbuild build\OpenFusion.sln /maxcpucount:8 /p:BuildInParallel=true /p:CL_MPCount=8 /p:UseMultiToolTask=true /p:Configuration=$configuration"
|
|
||||||
if ($LASTEXITCODE -ne "0") {
|
|
||||||
Write-Error "msbuild build failed for version $version" -ErrorAction Stop
|
|
||||||
}
|
|
||||||
Rename-Item -Path "bin/$configuration" -newName "$version-$configuration"
|
|
||||||
Write-Output "Built version $version $configuration"
|
|
||||||
Copy-Item -Path "sql" -Destination "bin/$version-$configuration/sql" -Recurse
|
|
||||||
Copy-Item -Path "config.ini" -Destination "bin/$version-$configuration"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
artifacts:
|
|
||||||
- path: bin
|
|
||||||
name: windows-vs2019-bin-x64
|
|
||||||
type: zip
|
|
Loading…
Reference in New Issue
Block a user