Skip to content

Commit

Permalink
python workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Géry Casiez committed Dec 14, 2024
1 parent c5f50e9 commit 8e4cf06
Showing 1 changed file with 29 additions and 3 deletions.
32 changes: 29 additions & 3 deletions .github/workflows/pythonBinding.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ on:
branches: [ "master" ]

workflow_run:
workflows: [Linux macOS Windows]
types:
- completed
workflows: [Linux, macOS, Windows]
branches: [ master ]
types: [ completed ]

jobs:

Expand All @@ -19,6 +19,7 @@ jobs:

steps:
- uses: actions/checkout@v4
- uses: ahmadnassri/action-workflow-run-wait@v1
- name: Install python
run: |
apt-get update
Expand Down Expand Up @@ -57,10 +58,35 @@ jobs:
if_no_artifact_found: fail
path: windows-artifact

- name: Copy files from artifacts
run: |
mkdir librairies
mkdir libraries/Linux
mkdir libraries/macOS
mkdir libraries/Windows
cp -r linux-artifact/pointing/libpointing.a libraries/Linux/
cp -r macOS-artifact/artifact/pointing/libpointing.a libraries/macOS/
cp -r windows-artifact/artifact/pointing/release/pointing.lib libraries/Windows/
cp -r linux-artifact/libpointing/bindings/Python/cython/libpointing/*.so bindings/Python/cython/libpointing/
cp -r macOS-artifact/artifact/bindings/Python/cython/libpointing/*.so bindings/Python/cython/libpointing/
cp -r windows-artifact/artifact/bindings/Python/cython/libpointing/*.pyd bindings/Python/cython/libpointing/
- name: compile Python binding
run: |
. venv/bin/activate
cd bindings/Python/cython/
ls -la libpointing/
python3 -m build
ls -la dist/
cd ../../..
mkdir python
cp -r bindings/Python/cython/dist/*.whl python/
- name: Save the compiled libraries
uses: actions/upload-artifact@v4
with:
path: |
libraries/
python/

0 comments on commit 8e4cf06

Please sign in to comment.