forked from pytorch/pytorch
-
Notifications
You must be signed in to change notification settings - Fork 0
69 lines (65 loc) · 2.09 KB
/
build-magma-linux.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
name: build-linux-magma
on:
push:
branches:
main
paths:
- .ci/magma/*
- .ci/magma/package_files/*
- .github/workflows/build-magma-linux.yml
pull_request:
paths:
- .ci/magma/*
- .ci/magma/package_files/*
- .github/workflows/build-magma-linux.yml
defaults:
run:
shell: bash -x -e -l {0}
env:
BUILD_ENVIRONMENT: build-linux-magma
IN_CI: 1
IS_GHA: 1
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}-${{ github.event_name == 'workflow_dispatch' }}
cancel-in-progress: true
jobs:
build-linux-magma:
if: github.repository_owner == 'pytorch'
runs-on: linux.2xlarge
permissions:
id-token: write
strategy:
matrix:
cuda_version: ["126", "124", "121", "118"] # There is no pytorch/manylinux-cuda126 yet
steps:
- name: Checkout PyTorch
uses: actions/checkout@v4
- name: Build Magma Cuda
working-directory: .ci/magma
run: |
# Produces artifacts under magma/output/linux-64/magma-cuda*.bz2
make magma-cuda${{ matrix.cuda_version }}
- name: Save as artifact
uses: actions/upload-artifact@v4
with:
path: .ci/magma/output/linux-64/magma-cuda*.bz2
name: artifact_${{ matrix.cuda_version }}
- name: Configure AWS credentials(PyTorch account)
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
uses: aws-actions/configure-aws-credentials@v3
with:
role-to-assume: arn:aws:iam::308535385114:role/gha_workflow_s3_ossci_linux_windows_read_write
aws-region: us-east-1
- name: Set DRY_RUN
if: ${{ github.event_name == 'push' && github.event.ref == 'refs/heads/main' }}
run: |
echo "DRY_RUN=disabled" >> "$GITHUB_ENV"
- name: Upload binaries
shell: bash
env:
PKG_DIR: ".ci/magma/output/linux-64/"
TARGET_OS: "linux"
PKG_INCLUDE: "magma-cuda*.tar.bz2"
run: |
set -ex
bash .github/scripts/upload_aws_ossci.sh