Skip to content

refactor: fixed the debug flag #155

refactor: fixed the debug flag

refactor: fixed the debug flag #155

Workflow file for this run

name: C/C++ CI
on:
push:
branches:
- master
- development
paths:
- '**.cpp'
- '**.h'
- '**.hpp'
- '**.bat'
- '**.txt'
- '.github/workflows/**'
- '!.vscode**'
- '!**.md'
- '!LICENSE'
- '!CNAME'
pull_request:
branches:
- master
jobs:
Ubuntu:
runs-on: ubuntu-latest
steps:
- name: Updating Git
run: |
sudo apt update
sudo apt -y install git
- uses: actions/checkout@v4
with:
submodules: 'true'
token: ${{ secrets.SUBMODULE_KEY }}
- name: Getting prerequisites
run: |
sudo apt upgrade
sudo apt -y install g++ cmake libcurl4-openssl-dev libncurses5-dev libncursesw5-dev
- name: Building application
run: |
mkdir build && cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
cmake --build . --config Release
Debian:
runs-on: ubuntu-latest
container: debian
steps:
- name: Updating Git
run: |
apt update
apt install -y git
- uses: actions/checkout@v4
with:
submodules: 'true'
token: ${{ secrets.SUBMODULE_KEY }}
- name: Getting prerequisites
run: |
apt upgrade
apt -y install g++ cmake libcurl4-openssl-dev libncurses5-dev libncursesw5-dev
- name: Building application
run: |
mkdir build && cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
cmake --build . --config Release
Arch-Linux:
runs-on: ubuntu-latest
container: archlinux
steps:
- name: Updating Git
run: |
pacman -Syy --noconfirm
pacman -S git --noconfirm
- uses: actions/checkout@v4
with:
submodules: 'true'
token: ${{ secrets.SUBMODULE_KEY }}
- name: Getting prerequisites
run: |
pacman -Syu --noconfirm
pacman -S gcc cmake make curl ncurses --noconfirm
- name: Building application
run: |
mkdir build && cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
cmake --build . --config Release
Fedora-Linux:
runs-on: ubuntu-latest
container: fedora
steps:
- name: Updating Git
run: |
dnf -y upgrade
dnf -y install git
- uses: actions/checkout@v4
with:
submodules: 'true'
token: ${{ secrets.SUBMODULE_KEY }}
- name: Getting prerequisites
run: |
dnf -y upgrade
dnf -y install gcc-c++ cmake ncurses-devel libcurl-devel
- name: Building application
run: |
mkdir build && cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
cmake --build . --config Release
Kali-Linux:
runs-on: ubuntu-latest
container: kalilinux/kali-rolling
steps:
- name: Updating Git
run: |
apt -y update
apt -y install git
- uses: actions/checkout@v4
with:
submodules: 'true'
token: ${{ secrets.SUBMODULE_KEY }}
- name: Getting prerequisites
run: |
apt -y upgrade
apt -y install g++ cmake libcurl4-openssl-dev libncurses5-dev libncursesw5-dev
- name: Building application
run: |
mkdir build && cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
cmake --build . --config Release
Alpine:
runs-on: ubuntu-latest
container: alpine
steps:
- name: Updating Git
run: |
apk update
apk add git
- uses: actions/checkout@v4
with:
submodules: 'true'
token: ${{ secrets.SUBMODULE_KEY }}
- name: Getting prerequisites
run: |
apk upgrade
apk add g++ cmake make curl-dev ncurses-dev
- name: Building application
run: |
mkdir build && cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
cmake --build . --config Release
Windows:
runs-on: windows-latest
strategy:
matrix:
build_type: [Debug, Release, MinSizeRel]
architecture: [Win32, x64]
steps:
- uses: actions/checkout@v4
with:
submodules: 'true'
token: ${{ secrets.SUBMODULE_KEY }}
- name: Compiling the main project for MinGW G++ compiler
run: |
./prereq.bat "MinGW Makefiles"
mkdir build && cd build
cmake .. -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
cmake --build . --config ${{ matrix.build_type }}
cd .. && rm -r -force build
- name: Compiling the main project for MSVC compiler
run: |
./prereq.bat "Visual Studio 17 2022"
mkdir build && cd build
cmake .. -G "Visual Studio 17 2022" -A ${{ matrix.architecture }} -DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
cmake --build . --config ${{ matrix.build_type }}
cd .. && rm -r -force build
MacOS:
runs-on: macos-latest
strategy:
matrix:
xcode: [11.7, 12.4, 13.1, 13.2]
build_type: [Debug, Release, MinSizeRel]
env:
DEVELOPER_DIR: /Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer
steps:
- uses: actions/checkout@v4
with:
submodules: 'true'
token: ${{ secrets.SUBMODULE_KEY }}
- name: Installing prerequisites
run: |
brew install make
brew install cmake
brew install curl
brew install ncurses
sudo xcode-select --reset
sudo xcodebuild -license accept
sudo xcode-select -s /Applications/Xcode.app/Contents/Developer
- name: Building and compiling using CMake as Xcode Project
run: |
mkdir build && cd build
cmake .. -G "Xcode" -DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
cmake --build . --config ${{ matrix.build_type }}