Skip to content

Wheels

Wheels #3

Workflow file for this run

name: Wheels
on:
workflow_dispatch:
release:
types:
- published
jobs:
sdist:
name: Source distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: 3.11
- name: Build sdist
run: |
python -m pip install build
python -m build --sdist .
- uses: actions/upload-artifact@v3
with:
name: sdist
path: dist/*.tar.gz
wheel:
name: ${{ matrix.config.os }} ${{ matrix.config.arch }}
runs-on: ${{ matrix.config.os }}
strategy:
matrix:
config:
[
{ os: macos-latest, arch: arm64 },
{ os: ubuntu-latest, arch: x86_64 },
]
python-version: [3.11]
continue-on-error: true
steps:
- uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install additional dependencies (ubuntu)
if: matrix.platform == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install -y libxerces-c-dev
python -m pip install cmake
- name: Install additional dependencies (macos)
if: matrix.platform == 'macos-latest'
run: |
brew install xerces-c
- name: Cache Geant4 Installation
id: cache-geant4
uses: actions/cache@v3
with:
path: ${{ github.workspace }}/geant4
key: geant4-${{ matrix.geant4-version }}-${{ matrix.platform }}
fail-on-cache-miss: true
- name: Cache Geant4 Datasets
id: cache-geant4-data
uses: actions/cache@v3
with:
path: ${{ github.workspace }}/geant4-data
key: geant4-${{ matrix.geant4-version }}-data
fail-on-cache-miss: true
enableCrossOsArchive: true
- name: Build Wheel
run: |
source ${{ github.workspace }}/geant4/bin/geant4.sh
python -m pip install build
python -m build --wheel .
- name: Upload Wheel
uses: actions/upload-artifact@v3
with:
name: wheels
path: dist/*.whl