51 lines
1.4 KiB
YAML
51 lines
1.4 KiB
YAML
name: 'Build'
|
|
description: 'Compile CryFS'
|
|
inputs:
|
|
cc:
|
|
description: "Which C compiler to use for the build"
|
|
required: true
|
|
cxx:
|
|
description: "Which C++ compiler to use for the build"
|
|
required: true
|
|
build_type:
|
|
description: "Which cmake build type to use (e.g. Release, Debug, RelWithDebInfo)"
|
|
required: true
|
|
extra_cmake_flags:
|
|
description: "Extra flags to add to the cmake command"
|
|
required: true
|
|
extra_cxxflags:
|
|
description: "Extra flags to add to the compiler"
|
|
required: true
|
|
runs:
|
|
using: "composite"
|
|
steps:
|
|
- name: Show build system information
|
|
shell: bash
|
|
run: |
|
|
set -v
|
|
echo CMake version:
|
|
cmake --version
|
|
echo Ninja version:
|
|
ninja --version
|
|
echo CC: ${{inputs.cc}}
|
|
${{inputs.cc}} --version
|
|
echo CXX: ${{inputs.cxx}}
|
|
${{inputs.cxx}} --version
|
|
echo CCache:
|
|
ccache --version
|
|
ccache -s
|
|
- name: Run cmake
|
|
shell: bash
|
|
run: |
|
|
set -v
|
|
export CXXFLAGS="$CXXFLAGS ${{inputs.extra_cxxflags}}"
|
|
mkdir build
|
|
cd build
|
|
cmake .. -GNinja -DCMAKE_CXX_COMPILER=${{inputs.cxx}} -DCMAKE_C_COMPILER=${{inputs.cc}} -DBUILD_TESTING=on -DCMAKE_BUILD_TYPE=${{inputs.build_type}} -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_C_COMPILER_LAUNCHER=ccache ${{inputs.extra_cmake_flags}}
|
|
- name: Run ninja
|
|
shell: bash
|
|
run: |
|
|
set -v
|
|
cd build
|
|
ninja
|