Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
BUYT-1 committed Aug 14, 2024
1 parent 36419af commit b4f2085
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 22 deletions.
33 changes: 27 additions & 6 deletions .github/composite-actions/download-libraries/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ inputs:
description: 'Download googletest'
default: true

install-boost:
type: boolean
description: 'Install boost'
default: true

runs:
using: 'composite'
steps:
Expand All @@ -21,17 +26,33 @@ runs:
sudo apt-get install gcc-10 g++-10 cmake build-essential -y
shell: bash

- name: Install Boost
- name: Make lib directory
run: |
sudo add-apt-repository ppa:mhier/libboost-latest
sudo apt update
sudo apt-get install libboost1.81-all-dev -y
mkdir -p lib
shell: bash

- name: Make lib directory
- name: Cache Boost
uses: actions/cache@v3
id: cache-boost
with:
path: ${{github.workspace}}/lib/boost_1_81_0
key: ${{ runner.os }}-boost-81

- name: Download and unpack Boost
run: |
mkdir -p lib
cd ${{github.workspace}}/lib
wget -O boost_1_81_0.tar.gz https://sourceforge.net/projects/boost/files/boost/1.81.0/boost_1_81_0.tar.gz/download
tar xzf boost_1_81_0.tar.gz
shell: bash
if: steps.cache-boost.outputs.cache-hit != 'true'

- name: Install Boost
run: |
cd lib/boost_1_81_0
./bootstrap.sh --prefix=/usr
sudo ./b2 install --prefix=/usr || true
shell: bash
if: inputs.install-boost != 'false'

- name: Download googletest
uses: ./.github/composite-actions/download-library
Expand Down
18 changes: 2 additions & 16 deletions .github/workflows/wheel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,29 +79,15 @@ jobs:
with:
download-pybind: true
download-googletest: false

- name: Cache unpacked Boost
uses: actions/cache@v3
id: cache-unpacked-boost
with:
path: ${{github.workspace}}/lib/boost_1_81_0
key: ${{ runner.os }}-boost-for-wheels-81

- name: Download & unpack Boost
run: |
cd ${{github.workspace}}/lib
wget -O boost_1_81_0.tar.gz https://sourceforge.net/projects/boost/files/boost/1.81.0/boost_1_81_0.tar.gz/download
tar xzf boost_1_81_0.tar.gz
shell: bash
if: steps.cache-unpacked-boost.outputs.cache-hit != 'true'
install-boost: false

- name: Build wheels
uses: pypa/[email protected]
with:
only: ${{ matrix.only }}
env:
CIBW_BEFORE_ALL: >
cd lib/boost_1_81_0 &&
cd lib/boost_1_81_0 &&
./bootstrap.sh --prefix=/usr/local &&
./b2 install -j4 --prefix=/usr/local
CIBW_TEST_COMMAND: >
Expand Down

0 comments on commit b4f2085

Please sign in to comment.