Gitlab CI: generic packages
parent
ebada328e8
commit
82cf0daa75
|
@ -1,29 +1,54 @@
|
|||
image: gcc
|
||||
stages:
|
||||
- build
|
||||
- deploy
|
||||
|
||||
before_script:
|
||||
- apt-get update
|
||||
- apt-get install -y --no-install-recommends cmake libssl-dev libvulkan-dev xorg-dev doxygen graphviz
|
||||
|
||||
build:
|
||||
build:linux:
|
||||
stage: build
|
||||
image: gcc
|
||||
before_script:
|
||||
- apt-get update
|
||||
- apt-get install -y --no-install-recommends cmake libssl-dev libvulkan-dev xorg-dev doxygen graphviz
|
||||
script:
|
||||
- mkdir build # compile
|
||||
- mkdir build
|
||||
- cd build
|
||||
- cmake ..
|
||||
- make -j2 univerxel univerxel-client univerxel-server docs
|
||||
- mkdir -p ../out/full ../out/client ../out/server/content # package artifacts
|
||||
- cp -r univerxel content ../out/full
|
||||
- cp -r univerxel-client content ../out/client
|
||||
- rm ../out/client/content/cert.pem ../out/client/content/key.pem ../out/client/content/zstd.dict
|
||||
- cp univerxel-server ../out/server
|
||||
- cp content/cert.pem content/key.pem content/zstd.dict ../out/server/content
|
||||
dependencies: []
|
||||
artifacts:
|
||||
paths:
|
||||
- out/full
|
||||
- out/client
|
||||
- out/server
|
||||
- build/content
|
||||
- build/univerxel
|
||||
- build/univerxel-client
|
||||
- build/univerxel-server
|
||||
- build/docs
|
||||
expire_in: 1 week
|
||||
# cache:
|
||||
# paths:
|
||||
# - "*.o"
|
||||
|
||||
deploy:package:
|
||||
stage: deploy
|
||||
image: curlimages/curl
|
||||
script:
|
||||
- mkdir out # package
|
||||
- cd build
|
||||
- cp ../resource/config/full.toml config.toml
|
||||
- tar cfz ../out/full-nux64.tar.gz univerxel config.toml content
|
||||
- cp ../resource/config/client.toml config.toml
|
||||
- tar cfz ../out/client-nux64.tar.gz univerxel-client config.toml content/shaders content/textures
|
||||
- cp ../resource/config/server.toml config.toml
|
||||
- tar cfz ../out/server-nux64.tar.gz univerxel-server config.toml content/cert.pem content/key.pem content/zstd.dict
|
||||
- cd ../out # deploy
|
||||
- 'curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file full-nux64.tar.gz ${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/Univerxel/$CI_COMMIT_TAG/Univerxel-$CI_COMMIT_TAG-nux64.tar.gz'
|
||||
- 'curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file client-nux64.tar.gz ${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/Univerxel-client/$CI_COMMIT_TAG/Univerxel-client-$CI_COMMIT_TAG-nux64.tar.gz'
|
||||
- 'curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file server-nux64.tar.gz ${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/Univerxel-server/$CI_COMMIT_TAG/Univerxel-server-$CI_COMMIT_TAG-nux64.tar.gz'
|
||||
dependencies:
|
||||
- build:linux
|
||||
artifacts:
|
||||
paths:
|
||||
- out
|
||||
expire_in: 1 week
|
||||
except:
|
||||
- branches
|
||||
only:
|
||||
- /\A\d+\.\d+\.\d+\z/
|
|
@ -24,7 +24,7 @@ if(NOT CMAKE_BUILD_TYPE)
|
|||
set(CMAKE_BUILD_TYPE Release)
|
||||
endif()
|
||||
|
||||
if(WIN32)
|
||||
if(MSVC)
|
||||
add_definitions(/std:c++latest)
|
||||
add_compile_definitions(WIN32_LEAN_AND_MEAN=)
|
||||
else()
|
||||
|
@ -44,13 +44,13 @@ if(SIMD_LEVEL EQUAL "avx2")
|
|||
elseif(SIMD_LEVEL EQUAL "avx512f")
|
||||
add_compile_definitions(FN_COMPILE_AVX512=1)
|
||||
endif()
|
||||
if(WIN32)
|
||||
if(MSVC)
|
||||
add_definitions(/arch:AVX2)
|
||||
else()
|
||||
add_definitions(-m${SIMD_LEVEL})
|
||||
endif()
|
||||
if(USE_FMA)
|
||||
if(WIN32)
|
||||
if(MSVC)
|
||||
add_definitions(/GL /fp:fast)
|
||||
else()
|
||||
add_definitions(-mfma)
|
||||
|
@ -62,7 +62,7 @@ set(CORE_HEADERS "deps/toml++" "deps/robin_hood" "deps/libguarded" "deps/tracy")
|
|||
set(CORE_LIBS glm::glm_static zstd::zstd_static) # picoquic
|
||||
|
||||
file(GLOB_RECURSE CLIENT_SOURCES "src/client/*.cpp" "deps/imgui/*.cpp" "deps/meshoptimizer/*.cpp" "deps/gl3w/gl3w.c" "deps/volk/volk.c")
|
||||
set(CLIENT_HEADERS "deps/imgui" "deps/meshoptimizer" "deps/gl3w" "deps/volk") # vulkan
|
||||
set(CLIENT_HEADERS "deps/imgui" "deps/meshoptimizer" "deps/gl3w" "deps/volk")
|
||||
set(CLIENT_LIBS glfw)
|
||||
|
||||
file(GLOB_RECURSE SERVER_SOURCES "src/server/*.cpp" "deps/FastNoiseSIMD/*.cpp")
|
||||
|
|
8
TODO.md
8
TODO.md
|
@ -43,12 +43,14 @@
|
|||
|
||||
## Hello universe
|
||||
|
||||
- [~] CI build
|
||||
- [ ] CMake package
|
||||
- [x] CI build
|
||||
- [x] CMake package
|
||||
- [x] GitLab CI
|
||||
- Platfoms
|
||||
- [x] Linux
|
||||
- [~] Windows
|
||||
- [x] Windows
|
||||
- Mingw: requires picotls, picoquic and FastNoise compatibility
|
||||
- [ ] MacOS
|
||||
- [ ] Universe
|
||||
- [ ] Galaxy
|
||||
- [ ] Rotation
|
||||
|
|
|
@ -0,0 +1,85 @@
|
|||
contouring = '''iso = 0.1000000014901161
|
||||
keep_distance = 10
|
||||
load_distance = 9
|
||||
lod_levels = [ false, true, false, true, false ]
|
||||
lod_quality = 0.0
|
||||
lod_strength = 0.1500000059604645
|
||||
manifold = true
|
||||
reordering = true
|
||||
transparency = false
|
||||
'''
|
||||
enabled = true
|
||||
|
||||
[camera]
|
||||
far = 272.0
|
||||
fov = 1.221730589866638
|
||||
near = 0.1000000014901161
|
||||
|
||||
[connection]
|
||||
host = '127.0.0.1'
|
||||
port = 4242
|
||||
|
||||
[console]
|
||||
opacity = 0.800000011920929
|
||||
scroll = true
|
||||
visible = true
|
||||
|
||||
[control]
|
||||
collide = true
|
||||
sensibility = 50
|
||||
speed = 25.0
|
||||
|
||||
[debug_menu]
|
||||
bar = true
|
||||
contouring = false
|
||||
controls = false
|
||||
render = true
|
||||
world = false
|
||||
|
||||
[editor]
|
||||
visible = false
|
||||
|
||||
[editor.tool]
|
||||
empty_air = true
|
||||
material = 5
|
||||
radius = 2
|
||||
shape = 0
|
||||
|
||||
[overlay]
|
||||
corner = 3
|
||||
visible = true
|
||||
|
||||
[render]
|
||||
blend = true
|
||||
culling = 0
|
||||
curvature = true
|
||||
curvature_depth = true
|
||||
fog = true
|
||||
fog_color = '#0000'
|
||||
geometry = true
|
||||
pbr = true
|
||||
prefer_vulkan = false
|
||||
skybox = true
|
||||
stochastic = false
|
||||
texture_angular_quality = 0
|
||||
texture_quality = 100
|
||||
textures = '1024-realistic'
|
||||
transparency = false
|
||||
triplanar = false
|
||||
|
||||
[window]
|
||||
fullscreen = false
|
||||
parallel_frames = 2
|
||||
sampling = -1
|
||||
target_fps = 23
|
||||
|
||||
[world]
|
||||
edit_handling = true
|
||||
edit_prediction = true
|
||||
keep_distance = 12
|
||||
load_distance = 11
|
||||
trust_majorant = true
|
||||
use_averages = false
|
||||
voxel_density = 1
|
||||
|
||||
|
|
@ -0,0 +1,102 @@
|
|||
[client]
|
||||
contouring = '''iso = 0.1000000014901161
|
||||
keep_distance = 10
|
||||
load_distance = 9
|
||||
lod_levels = [ false, true, false, true, false ]
|
||||
lod_quality = 0.0
|
||||
lod_strength = 0.1500000059604645
|
||||
manifold = true
|
||||
reordering = true
|
||||
transparency = false
|
||||
'''
|
||||
enabled = true
|
||||
|
||||
[client.camera]
|
||||
far = 272.0
|
||||
fov = 1.221730589866638
|
||||
near = 0.1000000014901161
|
||||
|
||||
[client.connection]
|
||||
use_local = true
|
||||
|
||||
[client.console]
|
||||
opacity = 0.800000011920929
|
||||
scroll = true
|
||||
visible = true
|
||||
|
||||
[client.control]
|
||||
collide = true
|
||||
sensibility = 50
|
||||
speed = 25.0
|
||||
|
||||
[client.debug_menu]
|
||||
bar = true
|
||||
contouring = false
|
||||
controls = false
|
||||
render = true
|
||||
world = false
|
||||
|
||||
[client.editor]
|
||||
visible = false
|
||||
|
||||
[client.editor.tool]
|
||||
empty_air = true
|
||||
material = 5
|
||||
radius = 2
|
||||
shape = 0
|
||||
|
||||
[client.overlay]
|
||||
corner = 3
|
||||
visible = true
|
||||
|
||||
[client.render]
|
||||
blend = true
|
||||
culling = 0
|
||||
curvature = true
|
||||
curvature_depth = true
|
||||
fog = true
|
||||
fog_color = '#0000'
|
||||
geometry = true
|
||||
pbr = true
|
||||
prefer_vulkan = false
|
||||
skybox = true
|
||||
stochastic = false
|
||||
texture_angular_quality = 0
|
||||
texture_quality = 100
|
||||
textures = '1024-realistic'
|
||||
transparency = false
|
||||
triplanar = false
|
||||
|
||||
[client.window]
|
||||
fullscreen = false
|
||||
parallel_frames = 2
|
||||
sampling = -1
|
||||
target_fps = 23
|
||||
|
||||
[client.world]
|
||||
edit_handling = true
|
||||
edit_prediction = true
|
||||
keep_distance = 12
|
||||
load_distance = 11
|
||||
trust_majorant = true
|
||||
use_averages = false
|
||||
voxel_density = 1
|
||||
|
||||
[server]
|
||||
allow_local = true
|
||||
enabled = true
|
||||
max_players = 1
|
||||
|
||||
[server.connection]
|
||||
cert = 'content/cert.pem'
|
||||
hosts = ''
|
||||
key = 'content/key.pem'
|
||||
port = 4242
|
||||
|
||||
[server.world]
|
||||
keep_distance = 6
|
||||
load_distance = 5
|
||||
max_part_size = 32768
|
||||
path = 'world'
|
||||
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
enabled = true
|
||||
max_players = 10
|
||||
|
||||
[connection]
|
||||
cert = 'content/cert.pem'
|
||||
hosts = ''
|
||||
key = 'content/key.pem'
|
||||
port = 4242
|
||||
|
||||
[world]
|
||||
keep_distance = 12
|
||||
load_distance = 10
|
||||
max_part_size = 32768
|
||||
path = 'world'
|
||||
|
||||
|
Loading…
Reference in New Issue