-
Notifications
You must be signed in to change notification settings - Fork 3
128 lines (107 loc) · 2.93 KB
/
releases.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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
---
name: Release
# Do this on every tagged commit
on:
push:
tags:
- "v*"
env:
CARGO_TERM_COLOR: always
CARGO_INCREMENTAL: 0
jobs:
build-linux-release:
name: Build release for Linux
runs-on: ubuntu-22.04
steps:
- name: Checkout sources
uses: actions/checkout@v4
with:
fetch-depth: 0
# - name: Install CUDA
# run: |
# wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-keyring_1.0-1_all.deb
# sudo dpkg -i cuda-keyring_1.0-1_all.deb
# sudo apt -y update
# sudo apt -y install cuda --no-install-recommends
# - name: Check semver
# uses: obi1kenobi/cargo-semver-checks-action@v2
# env:
# NVCC: /usr/local/cuda/bin/nvcc
- name: Build hyperbeam
uses: docker://quay.io/pypa/manylinux_2_28_x86_64:latest
with:
entrypoint: /bin/bash
args: .github/workflows/build.sh
- name: Upload tarball
uses: actions/upload-artifact@v2
with:
name: linux.tar.gz
path: "*.tar.gz"
if-no-files-found: error
build-macos-release:
name: Build release for MacOS
runs-on: macos-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- name: Add Python 3.7
uses: actions/setup-python@v2
with:
python-version: "3.7"
architecture: "x64"
- name: Add Python 3.8
uses: actions/setup-python@v2
with:
python-version: "3.8"
architecture: "x64"
- name: Add Python 3.9
uses: actions/setup-python@v2
with:
python-version: "3.9"
architecture: "x64"
- name: Add Python 3.10
uses: actions/setup-python@v2
with:
python-version: "3.10"
architecture: "x64"
- name: Add Python 3.11
uses: actions/setup-python@v2
with:
python-version: "3.11"
architecture: "x64"
- name: Build hyperbeam
run: .github/workflows/build.sh
- name: Upload tarball
uses: actions/upload-artifact@v2
with:
name: macos.tar.gz
path: "*.tar.gz"
if-no-files-found: error
create-release:
name: Create a new release
runs-on: ubuntu-latest
needs: [build-linux-release, build-macos-release]
steps:
- name: Download Linux artifact
uses: actions/download-artifact@v2
with:
name: linux.tar.gz
- name: Download MacOS artifact
uses: actions/download-artifact@v2
with:
name: macos.tar.gz
- name: Provide new release asset
uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
prerelease: false
files: |
*.tar.gz