-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #12 from ucsd-cse125-sp24/chore/ci
build client in GH actions
- Loading branch information
Showing
33 changed files
with
460 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
--- | ||
Checks: > | ||
*, | ||
-altera-struct-pack-align, | ||
-fuchsia-*, | ||
-google-*, | ||
-zircon-*, | ||
-abseil-*, | ||
-modernize-use-trailing-return-type, | ||
-llvm-*, | ||
-llvmlibc-*, | ||
-cppcoreguidelines-virtual-class-destructor, | ||
CheckOptions: [{ key: misc-non-private-member-variables-in-classes, value: IgnoreClassesWithAllMemberVariablesBeingPublic }] | ||
WarningsAsErrors: '*' | ||
HeaderFilterRegex: '' | ||
FormatStyle: none |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
name: Build | ||
|
||
on: | ||
push: | ||
branches: | ||
- dev | ||
pull_request: | ||
|
||
jobs: | ||
client-windows: | ||
name: Client on Windows | ||
runs-on: windows-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Create build dir | ||
run: mkdir -p build | ||
- name: Run CMake | ||
run: cd build && cmake -G "Unix Makefiles" .. | ||
- name: Build | ||
run: cd build && make client | ||
client-linux: | ||
name: Client on Linux (Ubuntu) | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Create build dir | ||
run: mkdir -p build | ||
- name: Run CMake | ||
run: cd build && cmake .. | ||
- name: Build | ||
run: cd build && make client | ||
server-windows: | ||
name: Server on Windows | ||
runs-on: windows-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Create build dir | ||
run: mkdir -p build | ||
- name: Run CMake | ||
run: cd build && cmake -G "Unix Makefiles" .. | ||
- name: Build | ||
run: cd build && make server | ||
server-linux: | ||
name: Server on Linux (Ubuntu) | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Create build dir | ||
run: mkdir -p build | ||
- name: Run CMake | ||
run: cd build && cmake .. | ||
- name: Build | ||
run: cd build && make server |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
name: Lint | ||
|
||
on: | ||
push: | ||
branches: | ||
- dev | ||
pull_request: | ||
|
||
jobs: | ||
clang-tidy: | ||
name: clang-tidy | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Create build dir | ||
run: mkdir -p build | ||
- name: Run CMake | ||
run: cd build && cmake .. | ||
- name: clang-tidy version | ||
run: clang-tidy --version | ||
- name: Lint | ||
run: cd build && make lint |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
name: Test | ||
|
||
on: | ||
push: | ||
branches: | ||
- dev | ||
pull_request: | ||
|
||
jobs: | ||
client-windows: | ||
name: Client on Windows | ||
runs-on: windows-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Create build dir | ||
run: mkdir -p build | ||
- name: Run CMake | ||
run: cd build && cmake -G "Unix Makefiles" .. | ||
- name: Test | ||
run: cd build && make run_client_tests | ||
client-linux: | ||
name: Client on Linux (Ubuntu) | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Create build dir | ||
run: mkdir -p build | ||
- name: Run CMake | ||
run: cd build && cmake .. | ||
- name: Test | ||
run: cd build && make run_client_tests | ||
server-windows: | ||
name: Server on Windows | ||
runs-on: windows-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Create build dir | ||
run: mkdir -p build | ||
- name: Run CMake | ||
run: cd build && cmake -G "Unix Makefiles" .. | ||
- name: Test | ||
run: cd build && make run_server_tests | ||
server-linux: | ||
name: Server on Linux (Ubuntu) | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Create build dir | ||
run: mkdir -p build | ||
- name: Run CMake | ||
run: cd build && cmake .. | ||
- name: Test | ||
run: cd build && make run_server_tests | ||
shared-windows: | ||
name: Shared on Windows | ||
runs-on: windows-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Create build dir | ||
run: mkdir -p build | ||
- name: Run CMake | ||
run: cd build && cmake -G "Unix Makefiles" .. | ||
- name: Test | ||
run: cd build && make run_shared_tests | ||
shared-linux: | ||
name: Shared on Linux (Ubuntu) | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Create build dir | ||
run: mkdir -p build | ||
- name: Run CMake | ||
run: cd build && cmake .. | ||
- name: Test | ||
run: cd build && make run_shared_tests |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ build/ | |
assets/* | ||
.vscode/ | ||
.vs/ | ||
.cache/ | ||
|
||
docs/* | ||
!docs/.gitkeep |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Disable all checks in this folder. | ||
Checks: '-*' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
# Download and unpack googletest at configure time | ||
# See: http://crascit.com/2015/07/25/cmake-gtest/ | ||
configure_file(CMakeLists.txt.in googletest-download/CMakeLists.txt) | ||
# Call CMake to download and Google Test | ||
execute_process(COMMAND ${CMAKE_COMMAND} -G "${CMAKE_GENERATOR}" . | ||
RESULT_VARIABLE result | ||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/googletest-download ) | ||
if(result) | ||
message(FATAL_ERROR "CMake step for googletest failed: ${result}") | ||
endif() | ||
# Build the downloaded google test | ||
execute_process(COMMAND ${CMAKE_COMMAND} --build . | ||
RESULT_VARIABLE result | ||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/googletest-download ) | ||
if(result) | ||
message(FATAL_ERROR "Build step for googletest failed: ${result}") | ||
endif() | ||
|
||
# Prevent overriding the parent project's compiler/linker | ||
# settings on Windows | ||
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE) | ||
# Prevent installation of GTest with your project | ||
set(INSTALL_GTEST OFF CACHE BOOL "" FORCE) | ||
set(INSTALL_GMOCK OFF CACHE BOOL "" FORCE) | ||
|
||
# Add googletest directly to our build. This defines | ||
# the gtest and gtest_main targets. | ||
add_subdirectory(${CMAKE_CURRENT_BINARY_DIR}/googletest-src | ||
${CMAKE_CURRENT_BINARY_DIR}/googletest-build) | ||
|
||
# This is a bit of a hack that can be used to get gtest libraries to build in C++11 if you aren't using CMAKE_CXX_STANDARD | ||
# | ||
#set(CXX11_FEATURES | ||
# cxx_nullptr | ||
# cxx_auto_type | ||
# cxx_delegating_constructors | ||
#) | ||
#target_compile_features(gtest | ||
# PRIVATE | ||
# ${CXX11_FEATURES} | ||
#) | ||
# | ||
#target_compile_features(gmock_main | ||
# PRIVATE | ||
# ${CXX11_FEATURES} | ||
#) | ||
# | ||
#target_compile_features(gmock | ||
# PRIVATE | ||
# ${CXX11_FEATURES} | ||
#) | ||
# | ||
#target_compile_features(gmock_main | ||
# PRIVATE | ||
# ${CXX11_FEATURES} | ||
#) | ||
|
||
# Add aliases for GTest and GMock libraries | ||
if(NOT TARGET GTest::GTest) | ||
add_library(GTest::GTest ALIAS gtest) | ||
add_library(GTest::Main ALIAS gtest_main) | ||
endif() | ||
|
||
if(NOT TARGET GTest::GMock) | ||
add_library(GMock::GMock ALIAS gmock) | ||
add_library(GMock::Main ALIAS gmock_main) | ||
endif() | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
cmake_minimum_required(VERSION 3.0) | ||
|
||
project(googletest-download NONE) | ||
|
||
include(ExternalProject) | ||
|
||
# Version bfc0ffc8a698072c794ae7299db9cb6866f4c0bc happens to be master when I set this up. | ||
# To prevent an issue with accidentally installing GTest / GMock with your project you should use a | ||
# commit after 9469fb687d040b60c8749b7617fee4e77c7f6409 | ||
# Note: This is after the release of v1.8 | ||
ExternalProject_Add(googletest | ||
URL https://github.com/google/googletest/archive/refs/tags/v1.14.0.tar.gz | ||
SOURCE_DIR "${CMAKE_CURRENT_BINARY_DIR}/googletest-src" | ||
BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/googletest-build" | ||
CONFIGURE_COMMAND "" | ||
BUILD_COMMAND "" | ||
INSTALL_COMMAND "" | ||
TEST_COMMAND "" | ||
DOWNLOAD_EXTRACT_TIMESTAMP true | ||
) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
|
||
class Client { | ||
public: | ||
Client(); | ||
Client() = default; | ||
private: | ||
|
||
}; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
|
||
class Server { | ||
public: | ||
Server(); | ||
Server() = default; | ||
private: | ||
|
||
}; |
Oops, something went wrong.