diff --git a/.github/workflows/test_macos.yml b/.github/workflows/test_macos.yml new file mode 100644 index 0000000..21a40dc --- /dev/null +++ b/.github/workflows/test_macos.yml @@ -0,0 +1,23 @@ +# Run tests on Mac OS. +name: test_macos +on: [push, pull_request] +permissions: read-all +jobs: + test_macos: + runs-on: ${{ matrix.os }} + strategy: + matrix: + include: + - os: macos-26 + python-version: '3.14' + toxenv: 'py314' + steps: + - uses: actions/checkout@v5 + - name: Install dependencies + run: | + brew update -q + brew install -q gettext gnu-sed python@${{ matrix.python-version }} tox || true + brew link --force gettext + - name: Run tests + run: | + tox -e ${{ matrix.toxenv }} diff --git a/appveyor.yml b/appveyor.yml index a5d4599..67ef6c2 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -30,16 +30,10 @@ environment: PYTHON_VERSION: "3.14" L2TBINARIES_TRACK: "dev" TARGET: wheel - - DESCRIPTION: "Run tests on Mac OS with Python 3.14" - APPVEYOR_BUILD_WORKER_IMAGE: macos-sonoma - HOMEBREW_NO_INSTALL_CLEANUP: 1 - TARGET: tests - PYTHON_VERSION: "3.14" install: - cmd: "%PYTHON%\\python.exe -m pip install -U build pip setuptools twine wheel" -- ps: If ($isWindows) { .\config\appveyor\install.ps1 } -- sh: config/appveyor/install.sh +- ps: .\config\appveyor\install.ps1 build_script: - cmd: IF [%TARGET%]==[wheel] ( @@ -51,11 +45,10 @@ test_script: IF EXIST "tests\\end-to-end.py" ( set PYTHONPATH=. && "%PYTHON%\\python.exe" "tests\\end-to-end.py" --debug -c "config\\end-to-end.ini" ) ) -- sh: config/appveyor/runtests.sh artifacts: - path: dist\*.whl deploy_script: -- ps: If ($env:APPVEYOR_REPO_TAG -eq "true" -And $isWindows -And $env:MACHINE_TYPE -eq "x86") { +- ps: If ($env:APPVEYOR_REPO_TAG -eq "true" -And $env:MACHINE_TYPE -eq "x86") { Invoke-Expression "${env:PYTHON}\\python.exe -m twine upload dist/*.whl --username __token__ --password ${env:PYPI_TOKEN} --skip-existing" } diff --git a/config/appveyor/install.sh b/config/appveyor/install.sh deleted file mode 100755 index e0cee36..0000000 --- a/config/appveyor/install.sh +++ /dev/null @@ -1,8 +0,0 @@ -# Script to set up tests on AppVeyor MacOS. - -set -e - -brew untap homebrew/homebrew-cask-versions -brew update -q -brew install -q gettext gnu-sed python@${PYTHON_VERSION} tox || true - diff --git a/config/appveyor/runtests.sh b/config/appveyor/runtests.sh deleted file mode 100755 index 8de19b1..0000000 --- a/config/appveyor/runtests.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh -# Script to run tests - -# Set the following environment variables to build libyal with gettext. -export CPPFLAGS="-I/usr/local/include -I/usr/local/opt/gettext/include ${CPPFLAGS}" -export LDFLAGS="-L/usr/local/lib -L/usr/local/opt/gettext/lib ${LDFLAGS}" - -# Set the following environment variables to build pycrypto and yara-python. -export CPPFLAGS="-I/usr/local/opt/openssl@1.1/include ${CPPFLAGS}" -export LDFLAGS="-L/usr/local/opt/openssl@1.1/lib ${LDFLAGS}" - -# Set the following environment variables to ensure tox can find Python. -export PATH="/usr/local/opt/python@${PYTHON_VERSION}/bin:${PATH}" - -tox -e py${PYTHON_VERSION//./}