(MOD) Added more steps for project building.
This commit is contained in:
12
.github/workflows/cmake-multi-platform.yml
vendored
12
.github/workflows/cmake-multi-platform.yml
vendored
@@ -66,16 +66,20 @@ jobs:
|
|||||||
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
|
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
|
||||||
-S ${{ github.workspace }}
|
-S ${{ github.workspace }}
|
||||||
|
|
||||||
|
- name: PreInstall
|
||||||
|
# Perform pre-installation.
|
||||||
|
run: ./preinstall
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
# Build your program with the given configuration. Note that --config is needed because the default Windows generator is a multi-config generator (Visual Studio generator).
|
# Build your program with the given configuration. Note that --config is needed because the default Windows generator is a multi-config generator (Visual Studio generator).
|
||||||
run: cmake --build ${{ steps.strings.outputs.build-output-dir }} --config ${{ matrix.build_type }}
|
run: cmake --build ${{ steps.strings.outputs.build-output-dir }} --config ${{ matrix.build_type }}
|
||||||
|
|
||||||
|
- name: PostInstall
|
||||||
|
# Perform post-installation.
|
||||||
|
run: ./postinstall
|
||||||
|
|
||||||
- name: Test
|
- name: Test
|
||||||
working-directory: ${{ steps.strings.outputs.build-output-dir }}
|
working-directory: ${{ steps.strings.outputs.build-output-dir }}
|
||||||
# Execute tests defined by the CMake configuration. Note that --build-config is needed because the default Windows generator is a multi-config generator (Visual Studio generator).
|
# Execute tests defined by the CMake configuration. Note that --build-config is needed because the default Windows generator is a multi-config generator (Visual Studio generator).
|
||||||
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
|
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
|
||||||
run: ctest --build-config ${{ matrix.build_type }}
|
run: ctest --build-config ${{ matrix.build_type }}
|
||||||
|
|
||||||
- name: Install
|
|
||||||
# By running "install" script to install project header files and shared object file later on after the compilation.
|
|
||||||
run: ./install
|
|
||||||
|
6
postinstall
Executable file
6
postinstall
Executable file
@@ -0,0 +1,6 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# Install Compound library.
|
||||||
|
echo "Installing libcompound:"
|
||||||
|
cp -v "libcompound.so" "/usr/lib"
|
||||||
|
|
@@ -19,6 +19,7 @@ if [ ! -d "$DST" ]; then
|
|||||||
mkdir -pv "$DST"
|
mkdir -pv "$DST"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Install project-like headers.
|
||||||
PROJLEN=${#PROJ[*]}
|
PROJLEN=${#PROJ[*]}
|
||||||
echo "======== $PROJLEN projects in total ========"
|
echo "======== $PROJLEN projects in total ========"
|
||||||
|
|
||||||
@@ -38,11 +39,9 @@ while :; do
|
|||||||
echo
|
echo
|
||||||
done
|
done
|
||||||
|
|
||||||
|
# Install individual headers.
|
||||||
cp -v "common.h" "const.h" "platform.h"\
|
cp -v "common.h" "const.h" "platform.h"\
|
||||||
"name.h" "namescope.h" "type.h" "catlog.h"\
|
"name.h" "namescope.h" "type.h" "catlog.h"\
|
||||||
"attr.h" "registry.h" "class.h" "function.h" "$DST"
|
"attr.h" "registry.h" "class.h" "function.h" "$DST"
|
||||||
|
|
||||||
echo "Installing libcompound:"
|
|
||||||
cp -v "libcompound.so" "/usr/lib"
|
|
||||||
|
|
||||||
printf "\nDone\n"
|
printf "\nDone\n"
|
Reference in New Issue
Block a user