From 3e282e3d3aacbf5a4ce8c0787c8b886f40427b12 Mon Sep 17 00:00:00 2001 From: ClausKlein Date: Thu, 15 Feb 2024 10:10:42 +0100 Subject: [PATCH] Install with pip -U Use default compiler on CI use git@code.rsint.net:mirror --- .clang-tidy | 2 +- .github/workflows/cmake.yml | 25 +++++++++++++++---------- .gitlab-ci.yml | 18 ------------------ CMakeLists.txt | 5 ++++- GNUmakefile | 6 +++--- 5 files changed, 23 insertions(+), 33 deletions(-) diff --git a/.clang-tidy b/.clang-tidy index 5e3ce97..359370b 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -39,6 +39,6 @@ Checks: HeaderFilterRegex: '.*' -#TODO: this isn't realy pedantic tody! CK +#TODO: this isn't realy pedantic today! CK WarningsAsErrors: '*' diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index f050c88..c883690 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -38,21 +38,22 @@ jobs: "**/cpm_modules" key: ${{ github.workflow }}-cpm-modules-${{ hashFiles('**/CMakeLists.txt', '**/*.cmake') }} - - uses: actions/setup-python@v4 - with: - python-version: '3.11' - cache: 'pip' # caching pip dependencies + # - uses: actions/setup-python@v4 + # with: + # python-version: '3.11' + # cache: 'pip' # caching pip dependencies + # # pip but doesn't exist on disk: /home/runner/.cache/pip - - run: | - sudo python -m pip install --upgrade pip - sudo pip install -r requirements.txt + - name: Setup python3 + run: | + sudo python3 -m pip install --upgrade pip + sudo python3 -m pip install -U -r requirements.txt + # /root/.cache/pip/ - name: Setup Cpp if: startsWith(matrix.os, 'ubuntu') uses: aminya/setup-cpp@v1 with: - llvm: true - ccache: true clangtidy: true clangformat: true @@ -69,7 +70,11 @@ jobs: sudo apt-get install libboost-filesystem-dev - name: Configure CMake - run: cmake -G Ninja -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{matrix.BUILD_TYPE}} + run: | + which cmake ninja + cmake --version + cmake --version + cmake -G Ninja -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{matrix.BUILD_TYPE}} - name: Build # Build your program with the given configuration diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 7fc8f99..156bceb 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -42,29 +42,11 @@ variables: CICD_PASSWORD: $SERVICE_USER_API_KEY default: -<<<<<<< HEAD image: saas-linux-small-amd64 tags: [linux] before_script: | export PATH="$HOME/.local/bin:$PATH" pip install -U -r requirements.txt -======= - image: docker.rsint.net/rs_common/rs-ubuntu:22.04-buildessential-2023-07-02 - tags: [linux-container] - before_script: - - echo -e "\e[0Ksection_start:`date +%s`:my_setup_linux[collapsed=true]\r\e[0KHeader of the setup linux collapsible section" - - export PATH="$HOME/.local/bin:$PATH" - - sudo ln -s /usr/share/zoneinfo/Europe/Berlin /etc/localtime - - sudo apt update - - sudo apt install --assume-yes clang-tidy python3-pip libboost-filesystem-dev - - python3 -m pip install -U -r requirements.txt - - echo -e "\e[0Ksection_end:`date +%s`:my_setup_linux\r\e[0K" - # - git config --global url.git@code.rsint.net:mirror/github.com/.insteadOf https://github.com/ - - git config --global user.name "Claus Klein" - - git config --global user.email "claus.klein@rohde-schwarz.com" - - git config --global -l - - git clone https://github.com/aminya/project_options.git ->>>>>>> 2d8f8eb (update git config settings for gitlab CI) .standard-rules: # Make a hidden job to hold the common rules rules: diff --git a/CMakeLists.txt b/CMakeLists.txt index 1569442..228e478 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -175,7 +175,10 @@ if(NETKIT_TFTP_TESTS) add_executable(option_test option_test.cpp async_tftpd_server.hpp) target_link_libraries(option_test PRIVATE tftpd) - # FIXME add_test(NAME option_test COMMAND option_test) + + if(NOT DEFINED ENV{CI}) + add_test(NAME option_test COMMAND option_test) + endif() add_executable(tftpd_test tftpd_test.cpp async_tftpd_server.hpp) target_link_libraries(tftpd_test PRIVATE tftpd) diff --git a/GNUmakefile b/GNUmakefile index 974a664..6e7c10b 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -22,8 +22,8 @@ PROJECT_NAME:=$(shell basename $${PWD}) # prevent hard config of find_package(asio 1.14.1 CONFIG CMAKE_FIND_ROOT_PATH_BOTH) ifeq (NO${CROSS_COMPILE},NO) ifeq (${UNAME},Darwin) - #TODO CC:=/usr/local/opt/llvm/bin/clang - #TODO CXX:=/usr/local/opt/llvm/bin/clang++ + CC:=/usr/bin/gcc + CXX:=/usr/bin/g++ BOOST_ROOT:=/usr/local/opt/boost export BOOST_ROOT endif @@ -44,7 +44,7 @@ endif #NO! BUILD_TYPE=Coverage make lcov BUILD_TYPE?=Debug BUILD_TYPE?=Release -# GENERATOR:=Xcode +GENERATOR:=Xcode GENERATOR?=Ninja # end of config part