Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

First attempt at building a wheel. See issue #176 #179

Draft
wants to merge 11 commits into
base: 1.4.2
Choose a base branch
from
Prev Previous commit
Next Next commit
Split build steps into separate jobs.
  • Loading branch information
windelbouwman committed Aug 3, 2024
commit 33f7a3e1080718f483719d33291245e7ce6556df
25 changes: 0 additions & 25 deletions .github/workflows/cibuildwheel.yml

This file was deleted.

125 changes: 125 additions & 0 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
name: Build

on: [push, pull_request]

jobs:
build-fastdds-ubuntu:
name: Build fast DDS library for ubuntu
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Cache build
id: cache-build
uses: actions/cache@v4
with:
path: install
key: fastdds-ubuntu-${{ hashFiles('scripts/build_deps.sh') }}

- name: Build fast DDS library
if: steps.cache-build.outputs.cache-hit != 'true'
run: scripts/build_deps.sh

- uses: actions/upload-artifact@v4
with:
name: fastdds-ubuntu
path: ./install

build-fastdds-linux:
name: Build fast DDS library for manylinux2014
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Cache build
id: cache-build
uses: actions/cache@v4
with:
path: install
key: fastdds-linux-${{ hashFiles('scripts/build_deps.sh') }}

- name: Build fast DDS library
if: steps.cache-build.outputs.cache-hit != 'true'
run: |
yum install -y tinyxml2-devel asio-devel
scripts/build_deps.sh

- uses: actions/upload-artifact@v4
with:
name: fastdds-linux
path: ./install

build-fastdds-windows:
name: Build fast DDS library for windows
runs-on: windows-latest

steps:
- uses: actions/checkout@v4

- name: Build fast DDS library
if: false
run: scripts\build_deps.bat

- uses: actions/upload-artifact@v4
with:
path: ./wheelhouse/*.whl

build-ubuntu-wheels:
name: Build wheels for ubuntu
runs-on: ubuntu-latest
needs: build-fastdds-ubuntu

steps:
- uses: actions/checkout@v4

- name: Download Library Build
uses: actions/download-artifact@v4
with:
name: fastdds-ubuntu

- name: Build wheels
run: python -m build .

- uses: actions/upload-artifact@v4
with:
path: ./wheelhouse/*.whl

build-ubuntu-wheels:
name: Build wheels for linux
runs-on: ubuntu-latest
needs: build-fastdds-linux

steps:
- uses: actions/checkout@v4

- name: Download Library Build
uses: actions/download-artifact@v4
with:
name: fastdds-linux
path: HelloLibrary/install

- name: Build wheels
env:
CIBW_BEFORE_BUILD_LINUX: "scripts/build_deps.sh"
uses: pypa/cibuildwheel@v2.19.2

- uses: actions/upload-artifact@v4
with:
path: ./wheelhouse/*.whl

build-windows-wheels:
name: Build wheels for windows
runs-on: windows-latest
needs: build-fastdds-windows

steps:
- uses: actions/checkout@v4

- name: Build wheels
uses: pypa/cibuildwheel@v2.19.2

- uses: actions/upload-artifact@v4
with:
path: ./wheelhouse/*.whl
2 changes: 1 addition & 1 deletion scripts/build_deps.sh
Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@
set -eu

# Install tinyxml2 and asio
yum install -y tinyxml2-devel asio-devel
# yum install -y tinyxml2-devel asio-devel

# Foo nathan
git clone --branch v0.7-3 https://github.com/foonathan/memory.git