Skip to content

Commit f09b0c8

Browse files
DanilBaibakvmoens
andauthored
[CI] Add macOS M1 binaries Wheels (#1504)
Co-authored-by: vmoens <vincentmoens@gmail.com>
1 parent 6a3e9f8 commit f09b0c8

File tree

3 files changed

+49
-0
lines changed

3 files changed

+49
-0
lines changed

.github/scripts/m1_script.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/bash
2+
3+
export BUILD_VERSION=0.2.0
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/bash
2+
3+
python3 -mpip install git+https://github.com/pytorch/tensordict.git

.github/workflows/build-wheels-m1.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Build M1 Wheels
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- nightly
8+
- main
9+
- release/*
10+
tags:
11+
# NOTE: Binary build pipelines should only get triggered on release candidate builds
12+
# Release candidate tags look like: v1.11.0-rc1
13+
- v[0-9]+.[0-9]+.[0-9]+-rc[0-9]+
14+
workflow_dispatch:
15+
16+
jobs:
17+
generate-matrix:
18+
uses: pytorch/test-infra/.github/workflows/generate_binary_build_matrix.yml@main
19+
with:
20+
package-type: wheel
21+
os: macos-arm64
22+
test-infra-repository: pytorch/test-infra
23+
test-infra-ref: main
24+
build:
25+
needs: generate-matrix
26+
name: pytorch/rl
27+
uses: pytorch/test-infra/.github/workflows/build_wheels_macos.yml@main
28+
with:
29+
repository: pytorch/rl
30+
ref: ""
31+
test-infra-repository: pytorch/test-infra
32+
test-infra-ref: main
33+
build-matrix: ${{ needs.generate-matrix.outputs.matrix }}
34+
pre-script: .github/scripts/pre_build_script_m1.sh
35+
post-script: ""
36+
package-name: torchrl
37+
runner-type: macos-m1-12
38+
smoke-test-script: ""
39+
trigger-event: ${{ github.event_name }}
40+
env-var-script: .github/scripts/m1_script.sh
41+
secrets:
42+
AWS_PYTORCH_UPLOADER_ACCESS_KEY_ID: ${{ secrets.AWS_PYTORCH_UPLOADER_ACCESS_KEY_ID }}
43+
AWS_PYTORCH_UPLOADER_SECRET_ACCESS_KEY: ${{ secrets.AWS_PYTORCH_UPLOADER_SECRET_ACCESS_KEY }}

0 commit comments

Comments
 (0)