-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
40 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -45,11 +45,9 @@ jobs: | |
- os: ubuntu-latest | ||
c_compiler: gcc | ||
cpp_compiler: g++ | ||
pre_run_command: docker run --rm -v ${{ github.workspace }}:/KNP -w /KNP ${{ vars.DOCKERHUB_LOGIN }}/knp-build-image | ||
- os: ubuntu-latest | ||
c_compiler: clang | ||
cpp_compiler: clang++ | ||
pre_run_command: docker run --rm -v ${{ github.workspace }}:/KNP -w /KNP ${{ vars.DOCKERHUB_LOGIN }}/knp-build-image | ||
exclude: | ||
- os: windows-latest | ||
c_compiler: gcc | ||
|
@@ -67,26 +65,60 @@ jobs: | |
run: | | ||
echo "build-output-dir=build_${{ matrix.c_compiler }}" >> "$GITHUB_OUTPUT" | ||
- name: Configure CMake | ||
- name: Install Windows boost | ||
uses: MarkusJx/[email protected] | ||
id: install-boost | ||
if: ${{ matrix.os }} == 'windows-latest' | ||
with: | ||
boost_version: 1.81.0 | ||
boost_install_dir: C:\boost | ||
platform_version: 2022 | ||
toolset: msvc | ||
|
||
- name: Configure non Windows CMake | ||
if: ${{ matrix.os }} != 'windows-latest' | ||
run: > | ||
${{ matrix.pre_run_comman }} cmake -B ${{ steps.strings.outputs.build-output-dir }}_${{ matrix.c_compiler }} | ||
docker run --rm -v ${{ github.workspace }}:/KNP -w /KNP ${{ vars.DOCKERHUB_LOGIN }}/knp-build-image cmake -B ${{ steps.strings.outputs.build-output-dir }}_${{ matrix.c_compiler }} | ||
-DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }} | ||
-DCMAKE_C_COMPILER=${{ matrix.c_compiler }} | ||
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} | ||
-S . | ||
- name: Build | ||
- name: Configure Windows CMake | ||
if: ${{ matrix.os }} == 'windows-latest' | ||
run: > | ||
cmake -B ${{ steps.strings.outputs.build-output-dir }}_${{ matrix.c_compiler }} | ||
-DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }} | ||
-DCMAKE_C_COMPILER=${{ matrix.c_compiler }} | ||
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} | ||
-S . | ||
- name: Build for non Windows | ||
if: ${{ matrix.os }} != 'windows-latest' | ||
# 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: docker run --rm -v ${{ github.workspace }}:/KNP -w /KNP ${{ vars.DOCKERHUB_LOGIN }}/knp-build-image cmake --build ${{ steps.strings.outputs.build-output-dir }} --config ${{ matrix.build_type }} --parallel 8 | ||
timeout-minutes: 180 | ||
|
||
- name: Test | ||
- name: Build for Windows | ||
if: ${{ matrix.os }} == 'windows-latest' | ||
# 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 }} --parallel 8 | ||
timeout-minutes: 180 | ||
|
||
- name: Test for non Windows | ||
if: ${{ matrix.os }} != 'windows-latest' | ||
run: docker run --rm -v ${{ github.workspace }}:/KNP -w /KNP/${{ steps.strings.outputs.build-output-dir }}/knp/tests ${{ vars.DOCKERHUB_LOGIN }}/knp-build-image ctest -V | ||
timeout-minutes: 180 | ||
|
||
- name: Test for Windows | ||
if: ${{ matrix.os }} == 'windows-latest' | ||
# 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 | ||
run: docker run --rm -v ${{ github.workspace }}:/KNP -w /KNP/${{ steps.strings.outputs.build-output-dir }}/knp/tests ${{ vars.DOCKERHUB_LOGIN }}/knp-build-image ctest --build-config ${{ matrix.build_type }} -V | ||
run: ctest --build-config ${{ matrix.build_type }} -V | ||
timeout-minutes: 180 | ||
|
||
- name: Create packages | ||
- name: Create deb packages | ||
if: ${{ matrix.os }} != 'windows-latest' | ||
run: docker run --rm -v ${{ github.workspace }}:/KNP -w /KNP/${{ steps.strings.outputs.build-output-dir }} ${{ vars.DOCKERHUB_LOGIN }}/knp-build-image cpack -G DEB | ||
timeout-minutes: 180 | ||
|
||
|