Skip to content

Commit

Permalink
Merge branch 'main' into issue1243
Browse files Browse the repository at this point in the history
  • Loading branch information
agarny authored Oct 23, 2024
2 parents 4c4842f + a2b993f commit 8fda60d
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 26 deletions.
46 changes: 24 additions & 22 deletions .github/workflows/deploy-on-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ jobs:
build_type: "Release", cc: "gcc", cxx: "g++"
}
- {
name: "macOS 12 Clang",
os: macos-12,
name: "macOS 13 Clang",
os: macos-13,
cc: "clang", cxx: "clang++"
}

Expand Down Expand Up @@ -266,7 +266,7 @@ jobs:

- name: Upload libraries as artifacts
if: needs.setup-jobs.outputs.binaries-destination == 'Artifact'
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
path: ./build/dist/*

Expand All @@ -278,17 +278,19 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [macos-12, ubuntu-20.04, windows-2019]
py: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12']
os: [macos-13, ubuntu-20.04, windows-2019]
py: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12', '3.13']
include:
- name: 'Windows'
os: windows-2019
- name: 'Linux'
os: ubuntu-20.04
- name: 'macOS'
os: macos-12
os: macos-13
exclude:
- os: macos-12
- os: macos-13
py: '3.7'
- os: ubuntu-20.04
py: '3.7'

steps:
Expand All @@ -313,29 +315,27 @@ jobs:
if [[ "${{ matrix.py }}" == "3.8" ]]; then
echo "Setting macos_archs as: macos_archs='x86_64'"
echo "macos_archs=x86_64" >> $GITHUB_OUTPUT
echo "macos_deployment_target=10.15" >> $GITHUB_OUTPUT
else
echo "Setting macos_archs as: macos_archs='x86_64 arm64'"
echo 'MACOS_ARCHS=x86_64 arm64' >> $GITHUB_OUTPUT
echo 'macos_archs=x86_64 arm64' >> $GITHUB_OUTPUT
echo "macos_deployment_target=11.0" >> $GITHUB_OUTPUT
fi
else
echo "Setting macos_archs as: macos_archs='x86_64'"
echo "macos_archs=x86_64" >> $GITHUB_OUTPUT
fi
- name: Configure MSVC
- name: Configure MSVC (Windows)
if: runner.os == 'Windows'
uses: ilammy/msvc-dev-cmd@v1

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'

- name: Install cibuildwheel
run: python -m pip install cibuildwheel==2.11.2
- name: Install SWIG (macOS)
if: runner.os == 'macOS'
run: brew install swig

- name: Build wheels
run: python -m cibuildwheel --output-dir wheelhouse src/bindings/python/
uses: pypa/[email protected]
env:
#CIBW_BUILD_VERBOSITY: 1
CIBW_ARCHS: auto64
Expand All @@ -346,15 +346,17 @@ jobs:
CIBW_BEFORE_ALL_WINDOWS: cd src/bindings/python && cmake -S wheel_dependencies -B build-wheel_dependencies -G Ninja && cd build-wheel_dependencies && ninja
CIBW_ENVIRONMENT: LIBCELLML_VERSION_TAG=${{ steps.setup.outputs.tag }}
CIBW_ENVIRONMENT_MACOS: >
MACOSX_DEPLOYMENT_TARGET=10.15
LIBCELLML_VERSION_TAG=${{ steps.setup.outputs.tag }}
MACOSX_DEPLOYMENT_TARGET=${{ steps.setup.outputs.macos_deployment_target }}
CIBW_REPAIR_WHEEL_COMMAND_MACOS: ""
CIBW_BEFORE_BUILD_LINUX: pip install renamewheel
CIBW_REPAIR_WHEEL_COMMAND_LINUX: renamewheel -w {dest_dir} {wheel}
with:
output-dir: wheelhouse
package-dir: src/bindings/python/

- name: Upload Python wheels as artifacts
if: needs.setup-jobs.outputs.binaries-destination == 'Artifact'
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
path: ./wheelhouse/*.whl

Expand All @@ -373,7 +375,7 @@ jobs:
needs: setup-jobs
if: needs.setup-jobs.outputs.allowed-jobs == 'Javascript' || needs.setup-jobs.outputs.allowed-jobs == 'All'
name: libcellml.js
runs-on: macos-12
runs-on: macos-13
steps:
- name: Checkout libCellML
uses: actions/checkout@v4
Expand Down Expand Up @@ -435,7 +437,7 @@ jobs:
- name: Upload libcellml.js as artifacts
if: needs.setup-jobs.outputs.binaries-destination == 'Artifact'
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
path: ${{ steps.package-javascript.outputs.files }}

Expand Down
2 changes: 0 additions & 2 deletions src/xmldoc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ void XmlDoc::parse(const std::string &input)
xmlFreeParserCtxt(context);
xmlSetStructuredErrorFunc(nullptr, nullptr);
xmlCleanupParser();
xmlCleanupGlobals();
}

std::string decompressMathMLDTD()
Expand Down Expand Up @@ -129,7 +128,6 @@ void XmlDoc::parseMathML(const std::string &input)
xmlFreeParserCtxt(context);
xmlSetStructuredErrorFunc(nullptr, nullptr);
xmlCleanupParser();
xmlCleanupGlobals();
}

std::string XmlDoc::prettyPrint() const
Expand Down
2 changes: 0 additions & 2 deletions tests/parser/libxml_user.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ TEST(Parser, parseValidXmlDirectlyUsingLibxml)
xmlFreeDoc(doc);
xmlSetStructuredErrorFunc(nullptr, nullptr);
xmlCleanupParser();
xmlCleanupGlobals();
}

TEST(Parser, parseInvalidXmlDirectlyUsingLibxml)
Expand All @@ -76,7 +75,6 @@ TEST(Parser, parseInvalidXmlDirectlyUsingLibxml)
xmlFreeParserCtxt(context);
xmlSetStructuredErrorFunc(nullptr, nullptr);
xmlCleanupParser();
xmlCleanupGlobals();

EXPECT_EQ(nullptr, doc);
}

0 comments on commit 8fda60d

Please sign in to comment.