-
Notifications
You must be signed in to change notification settings - Fork 12
88 lines (78 loc) · 2.65 KB
/
publish-pypi.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
name: publish PyPI
on:
push:
tags:
- 'v*'
branches:
- 'main'
jobs:
build:
runs-on: ubuntu-latest
# strategy:
# matrix:
# python-version: ["3.8", "3.12"]
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.12"
# python-version: ${{ matrix.python-version }}
- name: Install system dependencies
run: |
sudo apt-get update && sudo apt-get install -y \
gcc \
g++ \
gfortran \
libopenmpi-dev \
libhdf5-openmpi-dev \
python3-tk \
mesa-common-dev \
libgl1-mesa-dev \
libglu1-mesa-dev \
libosmesa6-dev \
xorg-dev
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install wheel setuptools scons numpy mpi4py
- name: Verify Python and Installed Packages
run: |
python --version
python -m pip list
- name: Build Cassiopee package
run: |
export CASSIOPEE=$GITHUB_WORKSPACE
export MACHINE=azure
. $CASSIOPEE/Cassiopee/Envs/sh_Cassiopee_r8
cd $CASSIOPEE/Cassiopee
echo -e "FREEMODULES='KCore XCore Converter Geom Transform Generator Post Initiator Connector Distributor2 Dist2Walls RigidMotion Compressor Modeler Intersector Apps CPlot'\nexport FREEMODULES\nFULLMODULES='KCore XCore Converter Geom Transform Generator Post Initiator Connector Distributor2 Dist2Walls RigidMotion Compressor Modeler Intersector Apps CPlot'\nexport FULLMODULES\nOTHERS=''" > $CASSIOPEE/Cassiopee/MODULES
echo "PATH: $PATH"
echo "LD_LIBRARY_PATH: $LD_LIBRARY_PATH"
echo "PYTHONPATH: $PYTHONPATH"
./install
- name: Publish to PyPI
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
run: |
find $CASSIOPEE -name "*.whl"
# find $CASSIOPEE -name "*.whl" -exec twine upload {} +
# publish:
# runs-on: ubuntu-latest
# needs: build
# steps:
# - name: Checkout repository
# uses: actions/checkout@v3
#
# - name: Set up Python
# uses: actions/setup-python@v4
# with:
# python-version: "3.12"
#
# - name: Publish to PyPI
# env:
# TWINE_USERNAME: __token__
# TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
# run: find -name "*.whl" -exec twine upload {} +