Skip to content

Commit 147f067

Browse files
authored
More fixes to the release workflow (#868)
* Test workflow * Fix usage of env variable * Add missing v * Skip locale test in release * Reenable commented out wheels, add parameter to control uploading to pypi * Try out global env var * Try out without curly braces on linux * Check if windows works * Add env var definition back to build_wheels workflow * Fix sending env variables in release build * Reenable other OSs * Append existing env vars * Hardcode the scipoptsuite-deploy release version for now * Change runner to macos-13 * Make locale test less annoying
1 parent c50ce12 commit 147f067

File tree

3 files changed

+19
-21
lines changed

3 files changed

+19
-21
lines changed

.github/workflows/build_wheels.yml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ name: Build wheels
33
on:
44
workflow_dispatch:
55
inputs:
6-
scip_version:
7-
type: string
8-
description: SCIPOptSuite deployment version
9-
required: true
10-
default: "v0.4.0"
6+
# scip_version:
7+
# type: string
8+
# description: SCIPOptSuite deployment version
9+
# required: true
10+
# default: "v0.4.0"
1111
upload_to_pypi:
1212
type: boolean
1313
description: Whether the artifacts should be uploaded to PyPI
@@ -25,7 +25,7 @@ jobs:
2525
arch: x86_64
2626
- os: macos-14
2727
arch: arm64
28-
- os: macos-latest
28+
- os: macos-13
2929
arch: x86_64
3030
- os: windows-latest
3131
arch: AMD64
@@ -41,7 +41,6 @@ jobs:
4141
CIBW_ARCHS: ${{ matrix.arch }}
4242
CIBW_TEST_REQUIRES: pytest
4343
CIBW_TEST_COMMAND: "pytest {project}/tests"
44-
SCIPOPTSUITE_VERSION: ${{ github.event.inputs.scip_version }}
4544

4645
- uses: actions/upload-artifact@v3
4746
with:

pyproject.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ skip="pp*" # currently doesn't work with PyPy
4444
skip="pp* cp36* cp37* *musllinux*"
4545
before-all = [
4646
"(apt-get update && apt-get install --yes wget) || yum install -y wget zlib libgfortran || brew install wget",
47-
"wget https://github.com/scipopt/scipoptsuite-deploy/releases/download/${SCIPOPTSUITE_VERSION}/libscip-linux.zip -O scip.zip",
47+
"wget https://github.com/scipopt/scipoptsuite-deploy/releases/download/v0.4.0/libscip-linux.zip -O scip.zip",
4848
"unzip scip.zip",
4949
"mv scip_install scip"
5050
]
@@ -57,9 +57,9 @@ before-all = '''
5757
#!/bin/bash
5858
brew install wget zlib gcc
5959
if [[ $CIBW_ARCHS == *"arm"* ]]; then
60-
wget https://github.com/scipopt/scipoptsuite-deploy/releases/download/${SCIPOPTSUITE_VERSION}/libscip-macos-arm.zip -O scip.zip
60+
wget https://github.com/scipopt/scipoptsuite-deploy/releases/download/v0.4.0/libscip-macos-arm.zip -O scip.zip
6161
else
62-
wget https://github.com/scipopt/scipoptsuite-deploy/releases/download/${SCIPOPTSUITE_VERSION}/libscip-macos.zip -O scip.zip
62+
wget https://github.com/scipopt/scipoptsuite-deploy/releases/download/v0.4.0/libscip-macos.zip -O scip.zip
6363
fi
6464
unzip scip.zip
6565
mv scip_install src/scip
@@ -75,7 +75,7 @@ repair-wheel-command = [
7575
skip="pp* cp36* cp37*"
7676
before-all = [
7777
"choco install 7zip wget",
78-
"wget https://github.com/scipopt/scipoptsuite-deploy/releases/download/${SCIPOPTSUITE_VERSION}/libscip-windows.zip -O scip.zip",
78+
"wget https://github.com/scipopt/scipoptsuite-deploy/releases/download/v0.4.0/libscip-windows.zip -O scip.zip",
7979
"\"C:\\Program Files\\7-Zip\\7z.exe\" x \"scip.zip\" -o\"scip-test\"",
8080
"mv .\\scip-test\\scip_install .\\test",
8181
"mv .\\test .\\scip"

tests/test_model.py

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -356,19 +356,18 @@ def test_locale():
356356

357357
try:
358358
locale.setlocale(locale.LC_NUMERIC, "pt_PT")
359-
except Exception:
360-
pytest.skip("pt_PT locale was not found. It might need to be installed.")
361-
362-
assert locale.str(1.1) == "1,1"
359+
assert locale.str(1.1) == "1,1"
363360

364-
m.writeProblem("model.cip")
361+
m.writeProblem("model.cip")
365362

366-
with open("model.cip") as file:
367-
assert "1,1" not in file.read()
368-
369-
m.readProblem(os.path.join("tests", "data", "test_locale.cip"))
363+
with open("model.cip") as file:
364+
assert "1,1" not in file.read()
365+
366+
m.readProblem(os.path.join("tests", "data", "test_locale.cip"))
370367

371-
locale.setlocale(locale.LC_NUMERIC,"")
368+
locale.setlocale(locale.LC_NUMERIC,"")
369+
except Exception:
370+
pytest.skip("pt_PT locale was not found. It might need to be installed.")
372371

373372

374373
def test_version_external_codes():

0 commit comments

Comments
 (0)