Skip to content

Commit

Permalink
Playerlist and repository structure changes (#358)
Browse files Browse the repository at this point in the history
  • Loading branch information
TrickyLeifa authored Jun 23, 2024
1 parent d62121c commit 040f5a3
Show file tree
Hide file tree
Showing 122 changed files with 1,045 additions and 856 deletions.
80 changes: 39 additions & 41 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
- name: qmake and build
run: |
cd $GITHUB_WORKSPACE
qmake
qmake project-akashi.pro
make
mv bin/config_sample bin/config
Expand All @@ -62,52 +62,50 @@ jobs:
name: akashi-linux
path: bin/

coverage:
needs: build-linux
runs-on: ubuntu-latest
# coverage:
# runs-on: ubuntu-latest

steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
# steps:
# # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
# - uses: actions/checkout@v2

- name: Install dependencies
uses: awalsh128/cache-apt-pkgs-action@latest
with:
packages: qt5-qmake libqt5websockets5-dev g++ make
version: 1.0
# - name: Install dependencies
# uses: awalsh128/cache-apt-pkgs-action@latest
# with:
# packages: qt5-qmake libqt5websockets5-dev g++ make
# version: 1.0

# Runs a set of commands using the runners shell
- name: qmake and build
run: |
cd $GITHUB_WORKSPACE
qmake CONFIG+=coverage
make
# # Runs a set of commands using the runners shell
# - name: qmake and build
# run: |
# cd $GITHUB_WORKSPACE
# qmake CONFIG+=coverage project-akashi.pro
# make

- name: Run tests
run: |
cd ${{github.workspace}}/bin_tests/
for test in ./unittest_*; do
LD_LIBRARY_PATH=../bin:$LD_LIBRARY_PATH ./$test
done;
# - name: Run tests
# run: |
# cd ${{github.workspace}}/bin_tests/
# for test in ./unittest_*; do
# LD_LIBRARY_PATH=../bin:$LD_LIBRARY_PATH ./$test
# done;

- name: Copy coverage files
run: |
cd ${{github.workspace}}/core
gcov *.o
cd ..
mkdir coverage
cp core/*.gcov coverage/
# - name: Copy coverage files
# run: |
# mkdir coverage
# cd ${{github.workspace}}
# gcov *.o
# cp *.gcov ../coverage/

- name: Codecov
uses: codecov/[email protected]
with:
files: coverage/*
# - name: Codecov
# uses: codecov/[email protected]
# with:
# files: coverage/*

- name: Upload coverage files
uses: actions/upload-artifact@v2
with:
name: coverage statistics
path: coverage/
# - name: Upload coverage files
# uses: actions/upload-artifact@v2
# with:
# name: coverage statistics
# path: coverage/

build-windows:
needs: formatting-check
Expand All @@ -132,7 +130,7 @@ jobs:
- name: Build
run: |
cd $Env:GITHUB_WORKSPACE
qmake "CONFIG += qtquickcompiler" akashi.pro
qmake "CONFIG += qtquickcompiler" project-akashi.pro
nmake
windeployqt bin\akashi.exe --release --no-opengl-sw
mv bin\config_sample bin\config
Expand Down
40 changes: 30 additions & 10 deletions akashi.pro
Original file line number Diff line number Diff line change
@@ -1,13 +1,33 @@
TEMPLATE = subdirs
QT += network websockets core sql

SUBDIRS += \
core \
akashi \
tests
TEMPLATE = app

akashi.subdirs = akashi
core.subdirs = core
core.tests = tests
CONFIG += c++2a console

# How to make subdirs not suck. Simple, use depends.
akashi.depends = core
coverage {
LIBS += -lgcov
}

# The following define makes your compiler emit warnings if you use
# any Qt feature that has been marked deprecated (the exact warnings
# depend on your compiler). Please consult the documentation of the
# deprecated API in order to know how to port your code away from it.
DEFINES += QT_DEPRECATED_WARNINGS

# You can also make your code fail to compile if it uses deprecated APIs.
# In order to do so, uncomment the following line.
# You can also select to disable deprecated APIs only up to a certain version of Qt.
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0

QMAKE_CXXFLAGS_WARN_OFF -= -Wunused-parameter

DESTDIR = $$PWD/bin

RC_ICONS = resource/icon/akashi.ico

INCLUDEPATH += src

SOURCES += \
src/main.cpp

LIBS += -L$$PWD/bin -lcore
38 changes: 0 additions & 38 deletions akashi/akashi.pro

This file was deleted.

126 changes: 126 additions & 0 deletions core.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
QT += network websockets core sql

TEMPLATE = lib

# shared static is required by Windows.
CONFIG += shared static c++2a

coverage {
QMAKE_CXXFLAGS += --coverage -g -Og # -fprofile-arcs -ftest-coverage
LIBS += -lgcov
CONFIG -= static
}

# Needed so that Windows doesn't do `release/` and `debug/` subfolders
# in the output directory.
CONFIG -= \
copy_dir_files \
debug_and_release \
debug_and_release_target

DESTDIR = $$PWD/bin

# You can make your code fail to compile if it uses deprecated APIs.
# In order to do so, uncomment the following line.
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0

# Enable this to print network messages to the console
# DEFINES += NET_DEBUG

INCLUDEPATH += src

SOURCES += \
src/acl_roles_handler.cpp \
src/aoclient.cpp \
src/network/aopacket.cpp \
src/network/network_socket.cpp \
src/area_data.cpp \
src/command_extension.cpp \
src/commands/area.cpp \
src/commands/authentication.cpp \
src/commands/casing.cpp \
src/commands/command_helper.cpp \
src/commands/messaging.cpp \
src/commands/moderation.cpp \
src/commands/music.cpp \
src/commands/roleplay.cpp \
src/config_manager.cpp \
src/db_manager.cpp \
src/discord.cpp \
src/packets.cpp \
src/playerstateobserver.cpp \
src/server.cpp \
src/testimony_recorder.cpp \
src/advertiser.cpp \
src/logger/u_logger.cpp \
src/logger/writer_modcall.cpp \
src/logger/writer_full.cpp \
src/music_manager.cpp \
src/packet/packet_factory.cpp \
src/packet/packet_generic.cpp \
src/packet/packet_hi.cpp \
src/packet/packet_id.cpp \
src/packet/packet_askchaa.cpp \
src/packet/packet_casea.cpp \
src/packet/packet_cc.cpp \
src/packet/packet_ch.cpp \
src/packet/packet_ct.cpp \
src/packet/packet_de.cpp \
src/packet/packet_ee.cpp \
src/packet/packet_hp.cpp \
src/packet/packet_mc.cpp \
src/packet/packet_ms.cpp \
src/packet/packet_pe.cpp \
src/packet/packet_pl.cpp \
src/packet/packet_pw.cpp \
src/packet/packet_rc.cpp \
src/packet/packet_rd.cpp \
src/packet/packet_rm.cpp \
src/packet/packet_rt.cpp \
src/packet/packet_setcase.cpp \
src/packet/packet_zz.cpp

HEADERS += src/aoclient.h \
src/acl_roles_handler.h \
src/akashidefs.h \
src/akashiutils.h \
src/network/aopacket.h \
src/network/network_socket.h \
src/area_data.h \
src/command_extension.h \
src/config_manager.h \
src/data_types.h \
src/db_manager.h \
src/discord.h \
src/playerstateobserver.h \
src/server.h \
src/typedefs.h \
src/advertiser.h \
src/logger/u_logger.h \
src/logger/writer_modcall.h \
src/logger/writer_full.h \
src/music_manager.h \
src/packet/packet_factory.h \
src/packet/packet_info.h \
src/packet/packet_generic.h \
src/packet/packet_hi.h \
src/packet/packet_id.h \
src/packet/packet_askchaa.h \
src/packet/packet_casea.h \
src/packet/packet_cc.h \
src/packet/packet_ch.h \
src/packet/packet_ct.h \
src/packet/packet_de.h \
src/packet/packet_ee.h \
src/packet/packet_hp.h \
src/packet/packet_mc.h \
src/packet/packet_ms.h \
src/packet/packet_pe.h \
src/packet/packet_pl.h \
src/packet/packet_pw.h \
src/packet/packet_rc.h \
src/packet/packet_rd.h \
src/packet/packet_rm.h \
src/packet/packet_rt.h \
src/packet/packet_setcase.h \
src/packet/packet_zz.h
Loading

0 comments on commit 040f5a3

Please sign in to comment.