Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
SRB2
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Skydusk
SRB2
Commits
acc1b829
Commit
acc1b829
authored
7 months ago
by
Logan Aerl Arias
Browse files
Options
Downloads
Plain Diff
Merge branch 'master' into next
parents
fd1fd9d4
4f64a5fb
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
.gitlab/ci/jobs/windows-x64.yml
+76
-1
76 additions, 1 deletion
.gitlab/ci/jobs/windows-x64.yml
.gitlab/ci/jobs/windows-x86.yml
+5
-9
5 additions, 9 deletions
.gitlab/ci/jobs/windows-x86.yml
src/CMakeLists.txt
+7
-2
7 additions, 2 deletions
src/CMakeLists.txt
with
88 additions
and
12 deletions
.gitlab/ci/jobs/windows-x64.yml
+
76
−
1
View file @
acc1b829
...
@@ -7,6 +7,30 @@ Windows x64:
...
@@ -7,6 +7,30 @@ Windows x64:
allow_failure
:
true
allow_failure
:
true
cache
:
-
key
:
ccache-$CI_JOB_NAME_SLUG-$CI_COMMIT_REF_SLUG
fallback_keys
:
-
ccache-$CI_JOB_NAME_SLUG-$CI_DEFAULT_BRANCH
-
ccache-$CI_JOB_NAME_SLUG-master
paths
:
-
build/ccache
-
build/ccache_statslog
-
key
:
apt-$CI_JOB_IMAGE
paths
:
-
build/apt-cache
unprotect
:
true
-
key
:
vcpkg-root
paths
:
-
build/vcpkg-root
unprotect
:
true
-
key
:
vcpkg-binary-cache-x64-mingw-static
paths
:
-
build/vcpkg-binary-cache
unprotect
:
true
artifacts
:
artifacts
:
paths
:
paths
:
-
"
build.cmake/bin/"
-
"
build.cmake/bin/"
...
@@ -20,6 +44,27 @@ Windows x64:
...
@@ -20,6 +44,27 @@ Windows x64:
CXX
:
/usr/lib/ccache/x86_64-w64-mingw32-g++
CXX
:
/usr/lib/ccache/x86_64-w64-mingw32-g++
script
:
script
:
-
|
# vcpkg
echo -e "\e[0Ksection_start:`date +%s`:vcpkg-root[collapsed=true]\r\e[0KUpdating vcpkg"
if [ -d "build/vcpkg-root" ]; then
pushd build/vcpkg-root
git fetch https://github.com/Microsoft/vcpkg master
git reset --hard FETCH_HEAD
popd
else
mkdir -p build
git clone https://github.com/Microsoft/vcpkg build/vcpkg-root
fi
export VCPKG_ROOT=$(pwd)/build/vcpkg-root
export VCPKG_BINARY_SOURCES="clear;files,/opt/vcpkg.bsources,read;files,$(pwd)/build/vcpkg-binary-cache,readwrite"
mkdir -p "build/vcpkg-binary-cache"
echo -e "\e[0Ksection_end:`date +%s`:vcpkg-root\r\e[0K"
-
-
|
-
-
|
# apt_toolchain
# apt_toolchain
echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages"
echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages"
...
@@ -39,7 +84,7 @@ Windows x64:
...
@@ -39,7 +84,7 @@ Windows x64:
-
-
|
-
-
|
# cmake
# cmake
echo -e "\e[0Ksection_start:`date +%s`:cmake[collapsed=false]\r\e[0KBuilding Makefiles"
echo -e "\e[0Ksection_start:`date +%s`:cmake[collapsed=false]\r\e[0KBuilding Makefiles"
-
cmake -B build.cmake -DSRB2_USE_CCACHE=NO -DSRB2_CONFIG_ERRORMODE=ON -DCMAKE_TOOLCHAIN_FILE=$VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake -DVCPKG_TARGET_TRIPLET=x64-mingw-static -DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=$VCPKG_ROOT/scripts/toolchains/mingw.cmake
-
cmake -B build.cmake -DSRB2_USE_CCACHE=NO -DSRB2_CONFIG_ERRORMODE=ON -DCMAKE_TOOLCHAIN_FILE=$VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake -DVCPKG_TARGET_TRIPLET=x64-mingw-static -DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=$VCPKG_ROOT/scripts/toolchains/mingw.cmake
-G "Unix Makefiles"
-
|
-
|
# cmake
# cmake
echo -e "\e[0Ksection_end:`date +%s`:cmake\r\e[0K"
echo -e "\e[0Ksection_end:`date +%s`:cmake\r\e[0K"
...
@@ -51,3 +96,33 @@ Windows x64:
...
@@ -51,3 +96,33 @@ Windows x64:
-
|
-
|
# make
# make
echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K"
echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K"
after_script
:
-
-
|
# apt_clean
echo -e "\e[0Ksection_start:`date +%s`:apt_clean[collapsed=true]\r\e[0KCleaning of unneeded APT packages"
-
apt-get autoclean
-
|
# apt_clean
echo -e "\e[0Ksection_end:`date +%s`:apt_clean\r\e[0K"
-
-
|
# vcpkg_clean
echo -e "\e[0Ksection_start:`date +%s`:vcpkg_clean[collapsed=true]\r\e[0KCleaning vcpkg-root"
if [ -d "build/vcpkg-root" ]; then
pushd "build/vcpkg-root"
git clean -f
popd
fi
echo -e "\e[0Ksection_end:`date +%s`:vcpkg_clean\r\e[0K"
-
-
|
# ccache_stats
echo -e "\e[0Ksection_start:`date +%s`:ccache_stats[collapsed=true]\r\e[0Kccache statistics:"
-
ccache --show-stats
-
ccache --show-log-stats ||
true
-
|
# ccahe_stats
echo -e "\e[0Ksection_end:`date +%s`:ccache_stats\r\e[0K"
This diff is collapsed.
Click to expand it.
.gitlab/ci/jobs/windows-x86.yml
+
5
−
9
View file @
acc1b829
...
@@ -3,10 +3,6 @@ Windows x86:
...
@@ -3,10 +3,6 @@ Windows x86:
stage
:
build
stage
:
build
when
:
manual
allow_failure
:
true
cache
:
cache
:
-
key
:
ccache-$CI_JOB_NAME_SLUG-$CI_COMMIT_REF_SLUG
-
key
:
ccache-$CI_JOB_NAME_SLUG-$CI_COMMIT_REF_SLUG
fallback_keys
:
fallback_keys
:
...
@@ -33,8 +29,8 @@ Windows x86:
...
@@ -33,8 +29,8 @@ Windows x86:
artifacts
:
artifacts
:
paths
:
paths
:
-
"
build
/ninja-x86_mingw_static_vcpkg-debug
/bin/"
-
"
build
.cmake
/bin/"
-
"
build
/ninja-x86_mingw_static_vcpkg-debug
/src/config.h"
-
"
build
.cmake
/src/config.h"
expose_as
:
"
Win32"
expose_as
:
"
Win32"
name
:
"
$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-Win32"
name
:
"
$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-Win32"
...
@@ -59,7 +55,7 @@ Windows x86:
...
@@ -59,7 +55,7 @@ Windows x86:
fi
fi
export VCPKG_ROOT=$(pwd)/build/vcpkg-root
export VCPKG_ROOT=$(pwd)/build/vcpkg-root
export VCPKG_BINARY_SOURCES="clear;files,$(pwd)/build/vcpkg-binary-cache,readwrite"
export VCPKG_BINARY_SOURCES="clear;files,
/opt/vcpkg.bsources,read;files,
$(pwd)/build/vcpkg-binary-cache,readwrite"
mkdir -p "build/vcpkg-binary-cache"
mkdir -p "build/vcpkg-binary-cache"
...
@@ -84,7 +80,7 @@ Windows x86:
...
@@ -84,7 +80,7 @@ Windows x86:
-
-
|
-
-
|
# cmake
# cmake
echo -e "\e[0Ksection_start:`date +%s`:cmake[collapsed=false]\r\e[0KBuilding Makefiles"
echo -e "\e[0Ksection_start:`date +%s`:cmake[collapsed=false]\r\e[0KBuilding Makefiles"
-
cmake -B build.cmake
--preset ninja-x86_mingw_static_vcpkg-debug
-DSRB2_USE_CCACHE=NO -DSRB2_CONFIG_ERRORMODE=ON
-
cmake -B build.cmake -DSRB2_USE_CCACHE=NO -DSRB2_CONFIG_ERRORMODE=ON
-DCMAKE_TOOLCHAIN_FILE=$VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake -DVCPKG_TARGET_TRIPLET=x86-mingw-static -DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=$VCPKG_ROOT/scripts/toolchains/mingw.cmake -G "Unix Makefiles"
-
|
-
|
# cmake
# cmake
echo -e "\e[0Ksection_end:`date +%s`:cmake\r\e[0K"
echo -e "\e[0Ksection_end:`date +%s`:cmake\r\e[0K"
...
@@ -92,7 +88,7 @@ Windows x86:
...
@@ -92,7 +88,7 @@ Windows x86:
-
-
|
-
-
|
# make
# make
echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2"
echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2"
-
cmake -build build.cmake --parallel 1 --verbose
--preset ninja-x86_mingw_static_vcpkg-debug
-
cmake
-
-build build.cmake --parallel 1 --verbose
-
|
-
|
# make
# make
echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K"
echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K"
...
...
This diff is collapsed.
Click to expand it.
src/CMakeLists.txt
+
7
−
2
View file @
acc1b829
...
@@ -464,8 +464,13 @@ else()
...
@@ -464,8 +464,13 @@ else()
endif
()
endif
()
if
(
TARGET miniupnpc::miniupnpc
)
if
(
TARGET miniupnpc::miniupnpc
)
if
(
"
${
VCPKG_TARGET_TRIPLET
}
"
MATCHES
"-mingw-static$"
)
target_compile_definitions
(
SRB2SDL2 PRIVATE -DHAVE_MINIUPNPC -DMINIUPNP_STATICLIB
)
target_link_libraries
(
SRB2SDL2 PRIVATE miniupnpc::miniupnpc -liphlpapi
)
else
()
target_compile_definitions
(
SRB2SDL2 PRIVATE -DHAVE_MINIUPNPC
)
target_compile_definitions
(
SRB2SDL2 PRIVATE -DHAVE_MINIUPNPC
)
target_link_libraries
(
SRB2SDL2 PRIVATE miniupnpc::miniupnpc
)
target_link_libraries
(
SRB2SDL2 PRIVATE miniupnpc::miniupnpc
)
endif
()
message
(
STATUS
"miniupnpc Found"
)
message
(
STATUS
"miniupnpc Found"
)
else
()
else
()
message
(
STATUS
"No miniupnpc Found"
)
message
(
STATUS
"No miniupnpc Found"
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment