-
Notifications
You must be signed in to change notification settings - Fork 218
55 lines (53 loc) · 1.85 KB
/
build-magma-windows.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
name: Build MAGMA for Windows
on:
push:
branches:
main
paths:
- windows/internal/build_magma.bat
- .github/workflows/build-magma-windows.yml
pull_request:
paths:
- windows/internal/build_magma.bat
- .github/workflows/build-magma-windows.yml
jobs:
build-windows-magma:
runs-on: windows-2019
strategy:
matrix:
cuda_version: ["121", "118"]
config: ["Release", "Debug"]
env:
CUDA_VERSION: ${{ matrix.cuda_version }}
CONFIG: ${{ matrix.config }}
steps:
- name: Checkout pytorch/builder
uses: actions/checkout@v3
- name: Enable MSVC dev commands to enable cl.exe # FYI incompatible with shell: bash
uses: ilammy/msvc-dev-cmd@dd5e2fa0a7de1e7929605d9ecc020e749d9856a3
- name: Install CUDA Toolkit
run: windows/internal/cuda_install.bat
- name: Build MAGMA and push to S3
run: windows/internal/build_magma.bat
- name: Save as artifact
uses: actions/upload-artifact@v2
with:
path: magma_*_cuda*_*.7z
push-windows-magma:
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
environment: magma
runs-on: ubuntu-22.04
needs: build-windows-magma
steps:
- name: Download all artifacts
uses: actions/download-artifact@v2
- name: Push MAGMA to S3
run: |
# Setting the following variable avoids errors in GHA https://github.com/aws/aws-cli/issues/5623
cd artifact
export AWS_EC2_METADATA_DISABLED=true
aws s3 cp . $OSSCI_WINDOWS_S3 --exclude="*" --include="magma_*_cuda*.7z" --recursive --acl public-read
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_OSSCI_S3_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_OSSCI_S3_ACCESS_KEY }}
OSSCI_WINDOWS_S3: s3://ossci-windows/