Skip to content

Fix Windows in CI

Fix Windows in CI #19

Workflow file for this run

name: Test
on:
push:
branches:
- master
pull_request:
branches:
- master
workflow_dispatch:
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest", "windows-latest", "macos-latest"]
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13', '3.14']
steps:
- uses: actions/checkout@v5
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
allow-prereleases: true
- name: Install dependencies (macOS)
if: runner.os == 'macOS'
run: brew install libiconv
- name: Install dependencies (Windows)
if: runner.os == 'Windows'
run: |
vcpkg install libiconv:x64-windows --triplet x64-windows
echo "INCLUDE=C:\vcpkg\installed\x64-windows\include;$env:INCLUDE" >> $env:GITHUB_ENV
echo "LIB=C:\vcpkg\installed\x64-windows\lib;$env:LIB" >> $env:GITHUB_ENV
- name: Install package
run: |
python -m pip install --upgrade pip
pip install -e .
- name: Debug libiconv loc
if: runner.os == 'Windows'
run: dir "C:\vcpkg\installed\x64-windows\bin"
- name: Run tests
run: |
# XXX: This seems very hacky
Copy-Item "C:\vcpkg\installed\x64-windows\bin\iconv-2.dll" "C:\vcpkg\installed\x64-windows\bin\libiconv.dll"
$env:PATH = "C:\vcpkg\installed\x64-windows\bin;$env:PATH"
python -m unittest -v