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 f0409f9
Show file tree
Hide file tree
Showing 5 changed files with 371 additions and 41 deletions.
61 changes: 22 additions & 39 deletions .github/workflows/ci-main.yml
Original file line number Diff line number Diff line change
@@ -1,47 +1,32 @@
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
Expand All @@ -58,8 +43,6 @@ jobs:
python-version: ${{ matrix.python-version }}
- 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]
- name: Build source
Expand Down
Loading

0 comments on commit f0409f9

Please sign in to comment.