Skip to content

fix: Only include directories if using GCC / GNU #362

fix: Only include directories if using GCC / GNU

fix: Only include directories if using GCC / GNU #362

Workflow file for this run

name: Build, Test, and deploy
on: [push]
jobs:
build:
runs-on: ${{ matrix.os }}
name: Build & Test
strategy:
matrix:
python:
- 3.7
- 3.8 # Included in RMS 12.1, and newer
- 3.9
- "3.10"
- 3.11 # Included in RMS 14.2, and newer
- 3.12
os:
- ubuntu-20.04
- macos-11
steps:
- uses: actions/checkout@v4
name: Checkout repository
with:
fetch-depth: 0
filter: tree:0
- name: Download Boost versions
uses: actions/download-artifact@v4
with:
pattern: boost-*
path: sources/boost/
merge-multiple: true
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}
- name: Build
env:
PYTHON: python${{ matrix.python }}
VERBOSE: "1"
run: |
if [[ $RUNNER_OS == "Linux" ]]; then
# Ensure shared directories have the correct permissions
mkdir -p dist wheelhouse
docker-compose run build-linux
elif [[ $RUNNER_OS == "macOS" ]]; then
make build
else
# That is, windows
echo "No supported, yet" >/dev/stderr
exit 1
fi
shell: bash
- name: Test
run: make tests
- name: Move results from auditwheel
# The reason for this, is because setuptools_scm and auditwheel
# causes an incompatibility between the updated wheels, which causes the installation during tests to fail
if: ${{ runner.os == 'Linux' }}
run: |
mv wheelhouse/*.whl dist/
- name: Store wheels
uses: actions/upload-artifact@v4
with:
name: wheel-${{ matrix.python }}-${{ matrix.os }}
path: dist/*.whl
if-no-files-found: error
source-distribution:
runs-on: ubuntu-20.04
name: Create source distribution (sdist)
steps:
- uses: actions/checkout@v4
name: Checkout repository
with:
fetch-depth: 0
filter: tree:0
- uses: actions/setup-python@v4
with:
python-version: "3.7" # Minimum supported version
- name: Download Boost versions
uses: actions/download-artifact@v4
with:
pattern: boost-*
path: sources/boost/
merge-multiple: true
- name: Download FFTW source
uses: actions/download-artifact@v4
with:
pattern: fftw-*
path: .
merge-multiple: true
- name: Create source distribution
run: |
make build-sdist
- name: Store source distribution
uses: actions/upload-artifact@v4
with:
name: sdist
path: dist/*.tar.gz
if-no-files-found: error
check-created-artifacts:
runs-on: ubuntu-20.04
name: Check that all the created artifacts have a consistent version
needs:
- build
- source-distribution
steps:
- uses: actions/checkout@v4
name: Checkout repository
with:
fetch-depth: 0
filter: tree:0
- name: Download compiled wheels
uses: actions/download-artifact@v4
with:
pattern: wheel-*
path: .
merge-multiple: true
- name: Download source distribution
uses: actions/download-artifact@v4
with:
name: sdist
- name: Gather wheels and source distribution
run: |
mkdir -p dist/
mv *.whl dist/
mv *.tar.gz dist/
- name: Ensure artifacts have consistent version
run: ./bin/ensure-consistent-version.sh
- name: Package all artifacts
uses: actions/upload-artifact@v4
with:
name: distribution
path: dist/
if-no-files-found: error
publish:
runs-on: ubuntu-20.04
name: Publish wheels, and source to PyPi
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
needs:
- check-created-artifacts
# Specifying a GitHub environment is optional, but strongly encouraged
environment: release
permissions:
# IMPORTANT: this permission is mandatory for trusted publishing
id-token: write
steps:
- name: Download distribution
uses: actions/download-artifact@v4
with:
name: distribution
path: dist/
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1