Repository navigation
95 lines (82 loc) · 3.21 KB
/
Copy path_build_macos.yml
File metadata and controls
95 lines (82 loc) · 3.21 KB
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
89
90
91
92
93
94
95
name: Build macOS Wheels
on: # yamllint disable-line rule:truthy
workflow_call:
inputs:
test-matrix:
type: string
required: true
release-type:
type: string
required: false
default: ''
description: 'nightly or final'
secrets:
aws-access-key-id:
required: true
aws-secret-access-key:
required: true
defaults:
run:
shell: bash
jobs:
wheel:
runs-on: macos-14
strategy:
fail-fast: false
matrix:
include: ${{ fromJSON(inputs.test-matrix) }}
steps:
- name: Configure AWS
if: ${{ inputs.release-type != '' }}
uses: aws-actions/configure-aws-credentials@v6
with:
aws-access-key-id: ${{ secrets.aws-access-key-id }}
aws-secret-access-key: ${{ secrets.aws-secret-access-key }}
aws-region: us-west-1
- name: Checkout repository
uses: actions/checkout@v7
with:
submodules: recursive
- name: Set up uv
uses: astral-sh/setup-uv@07a047e608db84b3d8c06cd9a7c7dcc9c355c18e # v10.3.2
with:
# NOTE: This is a version used for cibuildwheel but not for wheels.
python-version: '3.11'
activate-environment: true
- name: Install dependencies
run: |
uv pip install 'cibuildwheel>=4.0' delocate
- name: Set version (final)
if: ${{ inputs.release-type == 'final' }}
run: |
VERSION=`sed -n "s/^__version__ = '\(.*\)'/\1/p" pyg_lib/__init__.py`
TORCH_VERSION=`echo "pt${{ matrix.torch-version }}" | sed "s/..$//" | sed "s/\.//g"`
echo "New version name: $VERSION+$TORCH_VERSION"
sed -i "" "s/$VERSION/$VERSION+$TORCH_VERSION/" setup.py
sed -i "" "s/$VERSION/$VERSION+$TORCH_VERSION/" pyg_lib/__init__.py
- name: Set version (nightly)
if: ${{ inputs.release-type != 'final' }}
run: |
VERSION=`sed -n "s/^__version__ = '\(.*\)'/\1/p" pyg_lib/__init__.py`
TORCH_VERSION=`echo "pt${{ matrix.torch-version }}" | sed "s/..$//" | sed "s/\.//g"`
TODAY=$(date +'%Y%m%d')
echo "New version name: $VERSION.dev$TODAY+$TORCH_VERSION"
sed -i "" "s/$VERSION/$VERSION.dev$TODAY+$TORCH_VERSION/" setup.py
sed -i "" "s/$VERSION/$VERSION.dev$TODAY+$TORCH_VERSION/" pyg_lib/__init__.py
- name: Build wheel
run: |
bash ./.github/workflows/utils/build_macos.sh ${{ matrix.torch-version }}
- name: Upload wheel (final)
if: ${{ inputs.release-type == 'final' }}
run: |
aws s3 sync dist s3://data.pyg.org/whl/torch-${{ matrix.torch-version }}+cpu --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers
- name: Upload wheel (nightly)
if: ${{ inputs.release-type == 'nightly' }}
run: |
aws s3 sync dist s3://data.pyg.org/whl/nightly/torch-${{ matrix.torch-version }}+cpu --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers
- name: Upload wheel as GitHub artifact
if: ${{ inputs.release-type == '' }}
uses: actions/upload-artifact@v7
with:
name: wheel-macos-${{ matrix.torch-version }}
path: dist/*.whl