Skip to content

Commit

Permalink
Using cibuildwheel
Browse files Browse the repository at this point in the history
  • Loading branch information
davidhjp01 committed Jul 12, 2024
1 parent 1f43ece commit 52e84fc
Show file tree
Hide file tree
Showing 5 changed files with 376 additions and 46 deletions.
67 changes: 26 additions & 41 deletions .github/workflows/ci-main.yml
Original file line number Diff line number Diff line change
@@ -1,67 +1,52 @@
name: libcosimpy CI

# This workflow is triggered on pushes to the repository.
on: [push, workflow_dispatch ]
on: [push, workflow_dispatch]

jobs:
test:
name: Tests
runs-on: ${{ matrix.platform }}
strategy:
fail-fast: false
matrix:
platform: [ 'windows-latest', 'ubuntu-latest' ]
python-version: [ '3.8', '3.9', '3.10', '3.11', '3.12' ]
timeout-minutes: 35
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Build and publish libcosimc
uses: pypa/[email protected]
env:
CIBW_ENVIRONMENT: >
CONAN_LOGIN_USERNAME_OSP=${{ secrets.osp_artifactory_usr }}
CONAN_PASSWORD_OSP=${{ secrets.osp_artifactory_pwd }}
CONAN_NON_INTERACTIVE=1
CONAN_REVISIONS_ENABLED=1
CONAN_USE_ALWAYS_SHORT_PATHS=1
CIBW_BEFORE_BUILD: |
pip install conan==1.64.0
conan remote add osp https://osp.jfrog.io/artifactory/api/conan/conan-local --force
conan install proxyfmu/0.3.1@osp/stable -b missing
conan install libcosimc/0.10.2@osp/stable -b missing -o "libcosim:proxyfmu=True"
conan upload --all --confirm --remote osp '*'
- name: 'Run test'
run: |
pip install .
pip install pytest==7.2.2
pytest .
# test:
# name: Tests
# runs-on: ${{ matrix.platform }}
# strategy:
# fail-fast: false
# matrix:
# platform: [ 'windows-latest', 'ubuntu-latest' ]
# python-version: [ '3.8', '3.9', '3.10', '3.11', '3.12' ]
# timeout-minutes: 35
# steps:
# - uses: actions/checkout@v3
# - uses: actions/setup-python@v4
# with:
# python-version: ${{ matrix.python-version }}
# - name: 'Run test'
# run: |
# pip install .
# pip install pytest==7.2.2
# pytest .
build:
name: build
needs:
- test
# needs:
# - test
runs-on: ${{ matrix.platform }}
strategy:
fail-fast: false
matrix:
platform: [ 'windows-latest', 'ubuntu-latest' ]
python-version: [ '3.8', '3.9', '3.10', '3.11', '3.12' ]
python-version: [ 'cp38', 'cp39', 'cp310', 'cp311', 'cp312' ]
timeout-minutes: 35
env:
CONAN_REVISIONS_ENABLED: 1
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
python-version: 3.11
- name: Install build and twine
run: pip install build twine
- name: Upgrade pkginfo
run: pip install --upgrade pkginfo>=1.10.0
- name: Build wheels
uses: pypa/[email protected]
env:
CIBW_BUILD: ${{ matrix.python-version }}-win_amd64 ${{ matrix.python-version }}-manylinux_x86_64
- name: Build source
run: python -m build --sdist --outdir wheelhouse
- name: Run twine check
Expand Down
Loading

0 comments on commit 52e84fc

Please sign in to comment.