Skip to content

Commit 508dc5f

Browse files
committed
cicd/lib-build-and-push: combine linux and macos overwrite steps
1 parent 7b372fe commit 508dc5f

File tree

1 file changed

+18
-23
lines changed

1 file changed

+18
-23
lines changed

.github/workflows/lib-build-and-push.yml

Lines changed: 18 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -135,9 +135,11 @@ jobs:
135135
run: |
136136
brew install libev
137137
138-
- name: Prepare CIBW_BUILD for Linux and MacOS
138+
- name: Overwrite for Linux and MacOS
139139
if: runner.os == 'Linux' || runner.os == 'MacOS'
140140
run: |
141+
142+
##### Set CIBW_BUILD
141143
pre=""
142144
post=""
143145
@@ -165,6 +167,21 @@ jobs:
165167
echo "Resulted CIBW_BUILD: $CIBW_BUILD"
166168
echo "CIBW_BUILD=$CIBW_BUILD" >> $GITHUB_ENV
167169
170+
##### Set MACOSX_DEPLOYMENT_TARGET
171+
if [ "${{ matrix.os }}" == "macos-13" ]; then
172+
echo "MACOSX_DEPLOYMENT_TARGET=13.0" >> $GITHUB_ENV;
173+
echo "Enforcing target deployment for 13.0"
174+
elif [ "${{ matrix.os }}" == "macos-14" ]; then
175+
echo "MACOSX_DEPLOYMENT_TARGET=14.0" >> $GITHUB_ENV;
176+
echo "Enforcing target deployment for 14.0"
177+
fi
178+
179+
##### Set CIBW_TEST_COMMAND_MACOS and CIBW_TEST_COMMAND_LINUX
180+
if [[ "${{ matrix.platform }}" == "PyPy" ]]; then
181+
echo "CIBW_TEST_COMMAND_MACOS=" >> $GITHUB_ENV
182+
echo "CIBW_TEST_COMMAND_LINUX=" >> $GITHUB_ENV
183+
fi
184+
168185
- name: Overwrite for Windows
169186
if: runner.os == 'Windows'
170187
run: |
@@ -184,28 +201,6 @@ jobs:
184201
echo "CIBW_TEST_COMMAND_WINDOWS=" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf-8 -Append
185202
}
186203
187-
- name: Overwrite for Linux PyPy
188-
if: runner.os == 'Linux' && matrix.platform == 'PyPy'
189-
run: |
190-
echo "CIBW_TEST_COMMAND_LINUX=" >> $GITHUB_ENV
191-
192-
- name: Overwrite for MacOs
193-
if: runner.os == 'MacOs'
194-
run: |
195-
if [ "${{ matrix.os }}" == "macos-13" ]; then
196-
echo "MACOSX_DEPLOYMENT_TARGET=13.0" >> $GITHUB_ENV;
197-
echo "Enforcing target deployment for 13.0"
198-
elif [ "${{ matrix.os }}" == "macos-14" ]; then
199-
echo "MACOSX_DEPLOYMENT_TARGET=14.0" >> $GITHUB_ENV;
200-
echo "Enforcing target deployment for 14.0"
201-
else
202-
echo "Unknown macos version" && false;
203-
fi
204-
205-
if [[ "${{ matrix.platform }}" == "PyPy" ]]; then
206-
echo "CIBW_TEST_COMMAND_MACOS=" >> $GITHUB_ENV
207-
fi
208-
209204
- name: Build wheels
210205
run: |
211206
python3 -m cibuildwheel --output-dir wheelhouse

0 commit comments

Comments
 (0)