Skip to content

Commit e0043ee

Browse files
committed
CI fixes
1 parent 1dcc69b commit e0043ee

1 file changed

Lines changed: 19 additions & 8 deletions

File tree

.github/workflows/test.yml

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,10 @@ jobs:
6464
6565
#windows
6666
for platform in win_paltforms:
67-
hosts.append({'os': 'windows-latest', 'platform': platform, 'module': True, 'jobname': f'Windows - {platform}'})
67+
hosts.append({'os': 'windows-latest', 'platform': platform, 'module': True, 'nopython': platform == "Win32", 'jobname': f'Windows - {platform}'})
6868
6969
for arch in win_clang_archs:
70-
hosts.append({'os': 'windows-latest', 'arch': arch, 'compiler': 'clang-cl', 'jobname': f'Windows - clang - {arch}'})
70+
hosts.append({'os': 'windows-latest', 'arch': arch, 'compiler': 'clang-cl', 'nopython': platform == "x86", 'jobname': f'Windows - clang - {arch}'})
7171
7272
#gcc hosts
7373
for gcc, runon in gcc_map.items():
@@ -103,6 +103,7 @@ jobs:
103103
uses: actions/checkout@v4
104104

105105
- name: Setup Python
106+
if: !matrix.nopython
106107
uses: actions/setup-python@v5
107108
with:
108109
python-version: "3.12"
@@ -153,17 +154,27 @@ jobs:
153154
fi
154155
fi
155156
156-
if [[ '${{ matrix.module}}' == 'true' ]]; then
157-
echo "CMAKE_ARGS=-DISPTR_ENABLE_MODULE=ON" >> $GITHUB_ENV
157+
CMAKE_ARGS=( )
158+
if [[ '${{ matrix.module }}' == 'true' ]]; then
159+
CMAKE_ARGS+=(-DISPTR_ENABLE_MODULE=ON)
160+
fi
161+
162+
if [[ '${{ matrix.nopython }}' != 'true' ]]; then
163+
CMAKE_ARGS+=(-DISPTR_ENABLE_PYTHON=ON)
164+
fi
165+
166+
if [[ '${{ matrix.platform }}' != "" ]]; then
167+
CMAKE_ARGS+=(-DCMAKE_GENERATOR_PLATFORM=${{ matrix.platform }})
168+
fi
169+
170+
if [[ ${#CMAKE_ARGS[@]} != 0 ]]; then
171+
echo "CMAKE_ARGS=${CMAKE_ARGS[@]}" >> $GITHUB_ENV
158172
fi
159173
160174
- name: Configure
161175
shell: bash
162176
run: |
163-
if [[ '${{ matrix.platform }}' != "" ]]; then
164-
export CMAKE_ARGS="$CMAKE_ARGS -DCMAKE_GENERATOR_PLATFORM=${{ matrix.platform }}"
165-
fi
166-
cmake $CMAKE_GENERATOR -S . -B build $CMAKE_ARGS -DISPTR_ENABLE_PYTHON=ON -DCMAKE_BUILD_TYPE=Release
177+
cmake $CMAKE_GENERATOR -S . -B build $CMAKE_ARGS -DCMAKE_BUILD_TYPE=Release
167178
168179
- name: Build and Test
169180
shell: bash

0 commit comments

Comments
 (0)