mirror of
https://github.com/avinal/blowfish.git
synced 2026-01-10 23:08:33 +05:30
Refactor CMake workflow for simplified build process
Some checks failed
Build C++ Project / Build on Ubuntu with GCC (push) Failing after 1m25s
Some checks failed
Build C++ Project / Build on Ubuntu with GCC (push) Failing after 1m25s
Updated the CMake workflow to simplify the build process and hardcode the build type to 'Debug'.
This commit is contained in:
46
.github/workflows/cmake.yml
vendored
46
.github/workflows/cmake.yml
vendored
@@ -1,33 +1,29 @@
|
|||||||
name: build
|
name: Build C++ Project
|
||||||
|
|
||||||
on: [push]
|
on: [push]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
name: ${{ matrix.config.name }}
|
name: Build on Ubuntu with GCC
|
||||||
runs-on: ${{ matrix.config.os }}
|
runs-on: ubuntu-latest # For Gitea, ensure you have a runner with the 'ubuntu-latest' label
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
# Environment variables for the C/C++ compiler
|
||||||
matrix:
|
env:
|
||||||
config:
|
CC: gcc
|
||||||
- {
|
CXX: g++
|
||||||
name: "Ubuntu Latest GCC",
|
|
||||||
os: ubuntu-latest,
|
|
||||||
build_type: "Debug", cc: "gcc", cxx: "g++"
|
|
||||||
}
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
# Step 1: Check out the repository code
|
||||||
- name: configure
|
- name: Checkout repository
|
||||||
shell: cmake -P {0}
|
uses: actions/checkout@v4 # Updated to the latest version for best practice
|
||||||
run: |
|
# Note for Gitea: Ensure your instance can access this action or use a native 'git clone' command.
|
||||||
set(ENV{CC} ${{matrix.config.cc}})
|
|
||||||
set(ENV{CXX} ${{matrix.config.cxx}})
|
|
||||||
- name: generate
|
|
||||||
run: |
|
|
||||||
mkdir build
|
|
||||||
cd build
|
|
||||||
cmake -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_BUILD_TYPE=${{matrix.config.build_type}} ..
|
|
||||||
- name: build
|
|
||||||
run: cmake --build build --config ${{matrix.config.build_type}}
|
|
||||||
|
|
||||||
|
# Step 2: Configure the project and build it
|
||||||
|
- name: Configure and Build
|
||||||
|
run: |
|
||||||
|
# Configure using CMake. The -B flag creates the 'build' directory.
|
||||||
|
# The build type is now hardcoded to 'Debug'.
|
||||||
|
cmake -B build -DCMAKE_BUILD_TYPE=Debug -DCMAKE_VERBOSE_MAKEFILE=ON .
|
||||||
|
|
||||||
|
# Build the project using the generated configuration.
|
||||||
|
cmake --build build --config Debug
|
||||||
|
|||||||
Reference in New Issue
Block a user