Skip to content

Commit

Permalink
💚 update CI config
Browse files Browse the repository at this point in the history
  • Loading branch information
burgholzer committed Jun 21, 2021
1 parent 657858a commit 6db4606
Showing 1 changed file with 17 additions and 41 deletions.
58 changes: 17 additions & 41 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@ name: Deploy to PyPI

on:
release:
types: [published]
types: [ published ]
push:
branches: [ master ]
pull_request:
branches: [ master ]
workflow_dispatch:

env:
Expand All @@ -14,6 +18,7 @@ env:
CIBW_SKIP: "*-win32 *-manylinux_i686 cp35-*"
CIBW_BUILD_VERBOSITY: 3
CIBW_TEST_COMMAND: "python -c \"from jkq import qmap\""
Z3_GIT_TAG: z3-4.8.10

jobs:
build_manylinux_wheels:
Expand All @@ -24,19 +29,12 @@ jobs:
- uses: actions/checkout@v2
with:
submodules: recursive

- uses: actions/setup-python@v2
name: Install Python
with:
python-version: '3.8'

- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools wheel cibuildwheel==1.7.4
- name: Build wheels
run: |
python -m cibuildwheel --output-dir wheelhouse
uses: pypa/cibuildwheel@v1.11.1
- uses: actions/upload-artifact@v2
with:
path: ./wheelhouse/*.whl
Expand All @@ -49,20 +47,14 @@ jobs:
- uses: actions/checkout@v2
with:
submodules: recursive

- uses: actions/setup-python@v2
name: Install Python
with:
python-version: '3.8'

- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools wheel cibuildwheel==1.7.4
brew install z3
- name: Install Z3
run: brew install z3
- name: Build wheels
run: |
python -m cibuildwheel --output-dir wheelhouse
uses: pypa/cibuildwheel@v1.11.1
- uses: actions/upload-artifact@v2
with:
path: ./wheelhouse/*.whl
Expand All @@ -75,39 +67,30 @@ jobs:
- uses: actions/checkout@v2
with:
submodules: recursive

- uses: actions/setup-python@v2
name: Install Python
with:
python-version: '3.8'

- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools wheel cibuildwheel==1.7.4
- uses: ilammy/msvc-dev-cmd@v1
- name: Cache Z3
id: cache-z3
uses: actions/cache@v2
with:
path: z3
key: ${{ runner.OS }}-z3-4.8.10-static

key: ${{ runner.OS }}-z3-${{ env.Z3_GIT_TAG }}-static
- name: Building Z3
if: steps.cache-z3.outputs.cache-hit != 'true'
shell: bash
run: |
git clone --depth 1 https://github.com/Z3Prover/z3.git
git clone --branch $Z3_GIT_TAG --depth 1 https://github.com/Z3Prover/z3.git
cmake -S z3 -B z3/build -DCMAKE_BUILD_TYPE=Release -G "Visual Studio 16 2019" -A x64 -DZ3_BUILD_LIBZ3_SHARED=FALSE -DZ3_BUILD_EXECUTABLE=False -DZ3_BUILD_TEST_EXECUTABLES=False
cmake --build z3/build --config Release --parallel 8
- name: Installing Z3
shell: bash
working-directory: ${{github.workspace}}/z3/build
run: cmake --build . --config Release --target INSTALL;

- name: Build wheels
run: |
python -m cibuildwheel --output-dir wheelhouse
uses: pypa/cibuildwheel@v1.11.1
- uses: actions/upload-artifact@v2
with:
path: ./wheelhouse/*.whl
Expand All @@ -119,36 +102,29 @@ jobs:
- uses: actions/checkout@v2
with:
submodules: recursive

- uses: actions/setup-python@v2
name: Install Python
with:
python-version: '3.8'

- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools wheel
brew install z3
- name: Install Z3
run: brew install z3
- name: Build sdist
run: python setup.py sdist

- name: Test sdist
run: pip install --verbose dist/*.tar.gz

- uses: actions/upload-artifact@v2
with:
path: dist/*.tar.gz

upload_pypi:
needs: [build_manylinux_wheels, build_macos_wheels, build_windows_wheels, build_sdist]
runs-on: ubuntu-latest
if: github.event_name == 'release' && github.event.action == 'published'
steps:
- uses: actions/download-artifact@v2
with:
name: artifact
path: dist

- uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
Expand Down

0 comments on commit 6db4606

Please sign in to comment.