Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More fixes to the release workflow #868

Merged
merged 16 commits into from
Jun 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 6 additions & 7 deletions .github/workflows/build_wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ name: Build wheels
on:
workflow_dispatch:
inputs:
scip_version:
type: string
description: SCIPOptSuite deployment version
required: true
default: "v0.4.0"
# scip_version:
# type: string
# description: SCIPOptSuite deployment version
# required: true
# default: "v0.4.0"
upload_to_pypi:
type: boolean
description: Whether the artifacts should be uploaded to PyPI
Expand All @@ -25,7 +25,7 @@ jobs:
arch: x86_64
- os: macos-14
arch: arm64
- os: macos-latest
- os: macos-13
arch: x86_64
- os: windows-latest
arch: AMD64
Expand All @@ -41,7 +41,6 @@ jobs:
CIBW_ARCHS: ${{ matrix.arch }}
CIBW_TEST_REQUIRES: pytest
CIBW_TEST_COMMAND: "pytest {project}/tests"
SCIPOPTSUITE_VERSION: ${{ github.event.inputs.scip_version }}

- uses: actions/upload-artifact@v3
with:
Expand Down
8 changes: 4 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ skip="pp*" # currently doesn't work with PyPy
skip="pp* cp36* cp37* *musllinux*"
before-all = [
"(apt-get update && apt-get install --yes wget) || yum install -y wget zlib libgfortran || brew install wget",
"wget https://github.com/scipopt/scipoptsuite-deploy/releases/download/${SCIPOPTSUITE_VERSION}/libscip-linux.zip -O scip.zip",
"wget https://github.com/scipopt/scipoptsuite-deploy/releases/download/v0.4.0/libscip-linux.zip -O scip.zip",
"unzip scip.zip",
"mv scip_install scip"
]
Expand All @@ -57,9 +57,9 @@ before-all = '''
#!/bin/bash
brew install wget zlib gcc
if [[ $CIBW_ARCHS == *"arm"* ]]; then
wget https://github.com/scipopt/scipoptsuite-deploy/releases/download/${SCIPOPTSUITE_VERSION}/libscip-macos-arm.zip -O scip.zip
wget https://github.com/scipopt/scipoptsuite-deploy/releases/download/v0.4.0/libscip-macos-arm.zip -O scip.zip
else
wget https://github.com/scipopt/scipoptsuite-deploy/releases/download/${SCIPOPTSUITE_VERSION}/libscip-macos.zip -O scip.zip
wget https://github.com/scipopt/scipoptsuite-deploy/releases/download/v0.4.0/libscip-macos.zip -O scip.zip
fi
unzip scip.zip
mv scip_install src/scip
Expand All @@ -75,7 +75,7 @@ repair-wheel-command = [
skip="pp* cp36* cp37*"
before-all = [
"choco install 7zip wget",
"wget https://github.com/scipopt/scipoptsuite-deploy/releases/download/${SCIPOPTSUITE_VERSION}/libscip-windows.zip -O scip.zip",
"wget https://github.com/scipopt/scipoptsuite-deploy/releases/download/v0.4.0/libscip-windows.zip -O scip.zip",
"\"C:\\Program Files\\7-Zip\\7z.exe\" x \"scip.zip\" -o\"scip-test\"",
"mv .\\scip-test\\scip_install .\\test",
"mv .\\test .\\scip"
Expand Down
19 changes: 9 additions & 10 deletions tests/test_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -356,19 +356,18 @@ def test_locale():

try:
locale.setlocale(locale.LC_NUMERIC, "pt_PT")
except Exception:
pytest.skip("pt_PT locale was not found. It might need to be installed.")

assert locale.str(1.1) == "1,1"
assert locale.str(1.1) == "1,1"

m.writeProblem("model.cip")
m.writeProblem("model.cip")

with open("model.cip") as file:
assert "1,1" not in file.read()

m.readProblem(os.path.join("tests", "data", "test_locale.cip"))
with open("model.cip") as file:
assert "1,1" not in file.read()
m.readProblem(os.path.join("tests", "data", "test_locale.cip"))

locale.setlocale(locale.LC_NUMERIC,"")
locale.setlocale(locale.LC_NUMERIC,"")
except Exception:
pytest.skip("pt_PT locale was not found. It might need to be installed.")


def test_version_external_codes():
Expand Down
Loading