path: root/.ci/appveyor.yml
blob: 318b16bd866149d47b975f0f0b08006c1d0bd49e (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
environment:
    global:
        S3_UPLOAD_USERNAME: oss-ci-bot
        S3_UPLOAD_BUCKET: magicstack-oss-releases
        S3_UPLOAD_ACCESSKEY:
            secure: 1vmOqSXq5zDN8UdezZ3H4l0A9LUJiTr7Wuy9whCdffE=
        S3_UPLOAD_SECRET:
            secure: XudOvV6WtY9yRoqKahXMswFth8SF1UTnSXws4UBjeqzQUjOx2V2VRvIdpPfiqUKt

    matrix:
        - PYTHON: "C:\\Python35\\python.exe"
        - PYTHON: "C:\\Python35-x64\\python.exe"
        - PYTHON: "C:\\Python36\\python.exe"
        - PYTHON: "C:\\Python36-x64\\python.exe"

branches:
    # Avoid building PR branches.
    only:
        - master
        - ci
        - releases

install:
    - "%PYTHON% -m pip install --upgrade pip wheel setuptools"
    - "%PYTHON% -m pip install --upgrade -r .ci/requirements-win.txt"

build_script:
    - "%PYTHON% setup.py build_ext --inplace"

test_script:
    - "%PYTHON% setup.py test"

after_test:
    - "%PYTHON% setup.py bdist_wheel"

artifacts:
    - path: dist\*

deploy_script:
    - ps: |
        if ($env:appveyor_repo_branch -eq 'releases') {
            $PACKAGE_VERSION = & "$env:PYTHON" ".ci/package-version.py"
            $PYPI_VERSION = & "$env:PYTHON" ".ci/pypi-check.py" "immutables"

            if ($PACKAGE_VERSION -eq $PYPI_VERSION) {
                Write-Error "immutables-$PACKAGE_VERSION is already published on PyPI"
                exit 1
            }

            & "$env:PYTHON" ".ci/s3-upload.py" dist\*.whl
        }