Skip to content

Commit

Permalink
Build binaries in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
t-sommer committed Dec 16, 2024
1 parent 5862e08 commit 5743c9f
Showing 1 changed file with 75 additions and 71 deletions.
146 changes: 75 additions & 71 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
branches: [ main ]

jobs:
build-wheels:
build-binaries:
strategy:
matrix:
include:
Expand All @@ -26,81 +26,85 @@ jobs:
- uses: actions/setup-python@v5
with:
python-version: '3.10'
- run: python -m pip install setuptools wheel attrs numpy PySide6 requests
- run: python -m pip install fmpy requests toml
- run: python build_cvode.py
- run: python build_binaries.py
- if: matrix.name == 'linux' || matrix.name == 'windows'
run: python build_remoting.py
- run: python setup.py bdist_wheel
- uses: actions/upload-artifact@v4
with:
name: ${{ matrix.name }}
path: dist
path: |
*.exe
*.dll
*.dylib
*.so
server_tcp
if-no-files-found: error
merge-wheels:
runs-on: ubuntu-22.04
needs: [ build-wheels ]
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: linux
path: wheels/linux
- uses: actions/download-artifact@v4
with:
name: darwin
path: wheels/darwin
- uses: actions/download-artifact@v4
with:
name: windows
path: wheels/windows
- uses: actions/setup-python@v5
with:
python-version: '3.10'
- run: python merge_wheels.py
- uses: actions/upload-artifact@v4
with:
name: merged
path: wheels/merged
if-no-files-found: error
run-tests:
strategy:
matrix:
include:
- name: windows
image: windows-2022
- name: linux
image: ubuntu-22.04
- name: darwin
image: macos-13
runs-on: ${{ matrix.image }}
needs: [ merge-wheels ]
steps:
- uses: actions/checkout@v4
with:
submodules: 'true'
- uses: JesseTG/rm@b0586afffd89db69f7309bd44cc90209173fdbbe
with:
path: fmpy
- uses: actions/download-artifact@v4
with:
name: merged
path: .
- run: ls
- uses: actions/setup-python@v5
with:
python-version: '3.10'
- if: matrix.name == 'linux' || matrix.name == 'darwin'
run: |
for f in FMPy-*.whl; do
python -m pip install $f[complete]
done
- if: matrix.name == 'windows'
run: |
$files = Get-ChildItem "FMPy-*.whl"
foreach ($f in $files) {
$name = $f.FullName + "[complete]"
python -m pip install $name
}
- run: python -m pip install pytest
- run: pytest tests
# merge-wheels:
# runs-on: ubuntu-22.04
# needs: [ build-wheels ]
# steps:
# - uses: actions/checkout@v4
# - uses: actions/download-artifact@v4
# with:
# name: linux
# path: wheels/linux
# - uses: actions/download-artifact@v4
# with:
# name: darwin
# path: wheels/darwin
# - uses: actions/download-artifact@v4
# with:
# name: windows
# path: wheels/windows
# - uses: actions/setup-python@v5
# with:
# python-version: '3.10'
# - run: python merge_wheels.py
# - uses: actions/upload-artifact@v4
# with:
# name: merged
# path: wheels/merged
# if-no-files-found: error
# run-tests:
# strategy:
# matrix:
# include:
# - name: windows
# image: windows-2022
# - name: linux
# image: ubuntu-22.04
# - name: darwin
# image: macos-13
# runs-on: ${{ matrix.image }}
# needs: [ merge-wheels ]
# steps:
# - uses: actions/checkout@v4
# with:
# submodules: 'true'
# - uses: JesseTG/rm@b0586afffd89db69f7309bd44cc90209173fdbbe
# with:
# path: fmpy
# - uses: actions/download-artifact@v4
# with:
# name: merged
# path: .
# - run: ls
# - uses: actions/setup-python@v5
# with:
# python-version: '3.10'
# - if: matrix.name == 'linux' || matrix.name == 'darwin'
# run: |
# for f in FMPy-*.whl; do
# python -m pip install $f[complete]
# done
# - if: matrix.name == 'windows'
# run: |
# $files = Get-ChildItem "FMPy-*.whl"
# foreach ($f in $files) {
# $name = $f.FullName + "[complete]"
# python -m pip install $name
# }
# - run: python -m pip install pytest
# - run: pytest tests

0 comments on commit 5743c9f

Please sign in to comment.