Skip to content

Commit 3590a5c

Browse files
committed
Fixes for CI runners
1 parent 3af240c commit 3590a5c

2 files changed

Lines changed: 38 additions & 12 deletions

File tree

.github/workflows/build.yml

Lines changed: 30 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,17 @@ jobs:
1616
steps:
1717
- uses: actions/checkout@v4
1818

19+
- name: Install Ubuntu build deps
20+
if: runner.os == 'Linux'
21+
shell: bash
22+
run: |
23+
sudo apt-get update
24+
sudo apt-get install -y flex bison libgmp-dev libmpfr-dev
25+
26+
- name: Stabilize generated configure script timestamp
27+
shell: bash
28+
run: touch configure
29+
1930
- name: Configure
2031
shell: bash
2132
run: ./configure
@@ -39,6 +50,13 @@ jobs:
3950
steps:
4051
- uses: actions/checkout@v4
4152

53+
- name: Install Ubuntu build deps
54+
if: runner.os == 'Linux'
55+
shell: bash
56+
run: |
57+
sudo apt-get update
58+
sudo apt-get install -y flex bison libgmp-dev libmpfr-dev
59+
4260
- name: Create Build Environment
4361
run: cmake -E make_directory ${{github.workspace}}/build
4462

@@ -76,27 +94,27 @@ jobs:
7694
steps:
7795
- uses: actions/checkout@v4
7896

97+
- name: Setup Perl
98+
uses: shogo82148/actions-setup-perl@v1
99+
79100
- name: Create Build Environment
80-
shell: bash
81-
run: cmake -E make_directory ${{github.workspace}}/build
101+
shell: pwsh
102+
run: cmake -E make_directory "${{ github.workspace }}\\build"
82103

83104
- name: Configure CMake
84-
shell: bash
85-
working-directory: ${{github.workspace}}/build
105+
shell: pwsh
86106
run: >
87-
cmake $GITHUB_WORKSPACE
88-
-DCMAKE_BUILD_TYPE=$BUILD_TYPE
107+
cmake -S "${{ github.workspace }}" -B "${{ github.workspace }}\\build"
108+
-G "Visual Studio 17 2022" -A x64
89109
-DGECODE_ENABLE_QT=OFF
90110
-DGECODE_ENABLE_GIST=OFF
91111
-DGECODE_BUILD_SHARED=${{ matrix.build_shared }}
92112
-DGECODE_BUILD_STATIC=${{ matrix.build_static }}
93113
94114
- name: Build
95-
working-directory: ${{github.workspace}}/build
96-
shell: bash
97-
run: cmake --build . --config $BUILD_TYPE
115+
shell: pwsh
116+
run: cmake --build "${{ github.workspace }}\\build" --config ${{ env.BUILD_TYPE }}
98117

99118
- name: Build test binary
100-
working-directory: ${{github.workspace}}/build
101-
shell: bash
102-
run: cmake --build . --config $BUILD_TYPE --target gecode-test
119+
shell: pwsh
120+
run: cmake --build "${{ github.workspace }}\\build" --config ${{ env.BUILD_TYPE }} --target gecode-test

examples/CMakeLists.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,16 @@ macro (GECODE_EXAMPLE NAME)
4747
endmacro ()
4848

4949
file(GLOB EXAMPLE_FILES *.cpp)
50+
set(GECODE_MPFR_EXAMPLES
51+
archimedean-spiral
52+
golden-spiral)
5053
foreach (EXAMPLE_FILE ${EXAMPLE_FILES})
5154
get_filename_component(EXAMPLE_NAME ${EXAMPLE_FILE} NAME_WE)
55+
if (EXAMPLE_NAME IN_LIST GECODE_MPFR_EXAMPLES AND
56+
(NOT GECODE_ENABLE_FLOAT_VARS OR NOT GECODE_ENABLE_MPFR OR NOT MPFR_FOUND))
57+
message("-- Skipping example: " ${EXAMPLE_NAME} " (requires MPFR float support)")
58+
continue()
59+
endif()
5260
message("-- Adding example: " ${EXAMPLE_NAME})
5361
gecode_example(${EXAMPLE_NAME})
5462
endforeach()

0 commit comments

Comments
 (0)