Compare commits
8 Commits
ad2deb5819
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| f45ab91998 | |||
| f3554454a9 | |||
| 83451137d0 | |||
| 352fa5a034 | |||
| 1662477d20 | |||
| 7e8b4d107d | |||
| 3bcff4467c | |||
| b288f7f973 |
32
.gitea/workflows/ubuntu.yaml
Normal file
32
.gitea/workflows/ubuntu.yaml
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
name: Linux arm64
|
||||||
|
run-name: Build And Test
|
||||||
|
|
||||||
|
on: [push]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
Build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Check out repository code
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: "Clone submodule"
|
||||||
|
run: "git submodule update --init"
|
||||||
|
|
||||||
|
- name: Prepare XMake
|
||||||
|
uses: xmake-io/github-action-setup-xmake@v1
|
||||||
|
with:
|
||||||
|
xmake-version: latest
|
||||||
|
actions-cache-folder: '.xmake-cache'
|
||||||
|
actions-cache-key: 'ubuntu'
|
||||||
|
|
||||||
|
- name: XMake config
|
||||||
|
run: xmake f -p linux -y --root
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
run: xmake --root
|
||||||
|
|
||||||
|
- name: Test
|
||||||
|
run: |
|
||||||
|
xmake f -m debug --root
|
||||||
|
xmake test --root
|
||||||
2
Blitz
2
Blitz
Submodule Blitz updated: 52da1cf19b...026a841a04
19
README.md
Normal file
19
README.md
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
# Blitz-Console
|
||||||
|
|
||||||
|
## Update submodule
|
||||||
|
|
||||||
|
```
|
||||||
|
git submodule update --init
|
||||||
|
```
|
||||||
|
|
||||||
|
## Build
|
||||||
|
|
||||||
|
```
|
||||||
|
xmake
|
||||||
|
```
|
||||||
|
|
||||||
|
## Run
|
||||||
|
|
||||||
|
```
|
||||||
|
xmake run
|
||||||
|
```
|
||||||
@@ -70,6 +70,6 @@ void Client::SendTextChat(const std::string& msg) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void Client::Shoot() {
|
void Client::Shoot() {
|
||||||
protocol::PlayerShootPacket packet;
|
protocol::PlayerShootPacket packet({}, 0, 0);
|
||||||
SendPacket(&packet);
|
SendPacket(&packet);
|
||||||
}
|
}
|
||||||
76
xmake.lua
76
xmake.lua
@@ -1,4 +1,4 @@
|
|||||||
add_rules("mode.debug", "mode.release")
|
add_rules("mode.debug", "mode.release", "mode.valgrind")
|
||||||
|
|
||||||
add_includedirs("Blitz/include")
|
add_includedirs("Blitz/include")
|
||||||
set_languages("c++17")
|
set_languages("c++17")
|
||||||
@@ -10,72 +10,10 @@ target("BlitzConsole")
|
|||||||
add_deps("Blitz")
|
add_deps("Blitz")
|
||||||
add_files("src/*.cpp")
|
add_files("src/*.cpp")
|
||||||
|
|
||||||
--
|
-- Valgrind test
|
||||||
-- If you want to known more usage about xmake, please see https://xmake.io
|
if is_mode("valgrind") then
|
||||||
--
|
on_run(function (target)
|
||||||
-- ## FAQ
|
os.execv("valgrind", {"-s", "--leak-check=full", target:targetfile()})
|
||||||
--
|
end)
|
||||||
-- You can enter the project directory firstly before building project.
|
end
|
||||||
--
|
|
||||||
-- $ cd projectdir
|
|
||||||
--
|
|
||||||
-- 1. How to build project?
|
|
||||||
--
|
|
||||||
-- $ xmake
|
|
||||||
--
|
|
||||||
-- 2. How to configure project?
|
|
||||||
--
|
|
||||||
-- $ xmake f -p [macosx|linux|iphoneos ..] -a [x86_64|i386|arm64 ..] -m [debug|release]
|
|
||||||
--
|
|
||||||
-- 3. Where is the build output directory?
|
|
||||||
--
|
|
||||||
-- The default output directory is `./build` and you can configure the output directory.
|
|
||||||
--
|
|
||||||
-- $ xmake f -o outputdir
|
|
||||||
-- $ xmake
|
|
||||||
--
|
|
||||||
-- 4. How to run and debug target after building project?
|
|
||||||
--
|
|
||||||
-- $ xmake run [targetname]
|
|
||||||
-- $ xmake run -d [targetname]
|
|
||||||
--
|
|
||||||
-- 5. How to install target to the system directory or other output directory?
|
|
||||||
--
|
|
||||||
-- $ xmake install
|
|
||||||
-- $ xmake install -o installdir
|
|
||||||
--
|
|
||||||
-- 6. Add some frequently-used compilation flags in xmake.lua
|
|
||||||
--
|
|
||||||
-- @code
|
|
||||||
-- -- add debug and release modes
|
|
||||||
-- add_rules("mode.debug", "mode.release")
|
|
||||||
--
|
|
||||||
-- -- add macro definition
|
|
||||||
-- add_defines("NDEBUG", "_GNU_SOURCE=1")
|
|
||||||
--
|
|
||||||
-- -- set warning all as error
|
|
||||||
-- set_warnings("all", "error")
|
|
||||||
--
|
|
||||||
-- -- set language: c99, c++11
|
|
||||||
-- set_languages("c99", "c++11")
|
|
||||||
--
|
|
||||||
-- -- set optimization: none, faster, fastest, smallest
|
|
||||||
-- set_optimize("fastest")
|
|
||||||
--
|
|
||||||
-- -- add include search directories
|
|
||||||
-- add_includedirs("/usr/include", "/usr/local/include")
|
|
||||||
--
|
|
||||||
-- -- add link libraries and search directories
|
|
||||||
-- add_links("tbox")
|
|
||||||
-- add_linkdirs("/usr/local/lib", "/usr/lib")
|
|
||||||
--
|
|
||||||
-- -- add system link libraries
|
|
||||||
-- add_syslinks("z", "pthread")
|
|
||||||
--
|
|
||||||
-- -- add compilation and link flags
|
|
||||||
-- add_cxflags("-stdnolib", "-fno-strict-aliasing")
|
|
||||||
-- add_ldflags("-L/usr/local/lib", "-lpthread", {force = true})
|
|
||||||
--
|
|
||||||
-- @endcode
|
|
||||||
--
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user