-
Notifications
You must be signed in to change notification settings - Fork 35
173 lines (155 loc) · 5.42 KB
/
release.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
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
name: Release
on:
push:
branches-ignore:
- '**'
tags:
- '*'
env:
CUDA_BASE_REPO: cuda-go-python-base
AIGES_REPO: aiges-gpu
jobs:
# conda-build:
# strategy:
# matrix:
# cuda: [10.1, 10.2, 11.2,11.6]
# python: [3.7,3.8,3.9 ]
# golang: [1.17]
# ubuntu_os: [1804]
# runs-on: ubuntu-latest
# steps:
# - name: Checkout
# uses: actions/checkout@master
# with:
# submodules: true
#
# - name: Set up Go
# uses: actions/setup-go@master
# with:
# go-version: 1.17
#
# - name: Prepare
# id: prepare
# run: |
# TAG=${GITHUB_REF#refs/tags/}
# echo ::set-output name=tag_name::${TAG}
#
# - name: Setup Python And Generate Dockerfile
# shell: bash
# run: |
# sudo apt install -y python3-pip
# sudo pip install jinja2 plumbum
# python docker/build.py generate --all --use_github
#
# - name: Log in to Docker Hub
# uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
# with:
# username: ${{ secrets.IFLYOPENSOURCE }}
# password: ${{ secrets.DOCKER_SECRET }}
#
# - name: Build Docker Image For AIges
# uses: docker/build-push-action@v2
# with:
# context: .
# file: ./dist/aiges/conda/ubuntu${{ matrix.ubuntu_os }}/cuda-${{ matrix.cuda }}/${{matrix.python}}/Dockerfile
# builder: ${{ steps.buildx.outputs.name }}
# push: true
# tags: ${{ secrets.IFLYOPENSOURCE }}/${{env.AIGES_REPO}}:conda-${{ matrix.cuda }}-${{ matrix.golang }}-${{ matrix.python }}-ubuntu${{ matrix.ubuntu_os }}-${{ steps.prepare.outputs.tag_name }}
goreleaser:
strategy:
matrix:
cuda: [ 10.1,11.2,11.6,11.7]
python: [ 3.9.13 ]
golang: [1.17]
ubuntu_os: [1804]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@master
with:
submodules: true
- name: Set up Go
uses: actions/setup-go@master
with:
go-version: 1.17
- name: Prepare
id: prepare
run: |
TAG=${GITHUB_REF#refs/tags/}
echo ::set-output name=tag_name::${TAG}
# - name: Configure AWS credentials
# uses: aws-actions/configure-aws-credentials@v1
# with:
# aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
# aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
# aws-region: us-east-1
# - name: Login to Amazon Public ECR
# uses: docker/login-action@v1
# with:
# registry: public.ecr.aws
# username: ${{ secrets.AWS_ACCESS_KEY_ID }}
# password: ${{ secrets.AWS_ACCESS_KEY_KEY }}
# env:
# AWS_REGION: us-east-1
- name: Setup Python And Generate Dockerfile
shell: bash
run: |
sudo apt install -y python3-pip
sudo pip install jinja2 plumbum
python docker/build.py generate --all --use_github
python docker/build.py generate --action build-bussiness --use_github
# Set up credentials used by AWS CLI
# - name: CreateRepo
# shell: bash
# env:
# AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
# AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
# run: |
# aws ecr-public create-repository --repository-name $AIGES_REPO || true
- name: Log in to Docker Hub
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
with:
username: ${{ secrets.IFLYOPENSOURCE }}
password: ${{ secrets.DOCKER_SECRET }}
- name: Build Opensource Docker Image For AIges
uses: docker/build-push-action@v2
with:
context: .
file: ./dist/aiges/ubuntu${{ matrix.ubuntu_os }}/cuda-${{ matrix.cuda }}/Dockerfile
builder: ${{ steps.buildx.outputs.name }}
push: true
tags: ${{ secrets.IFLYOPENSOURCE }}/${{env.AIGES_REPO}}:${{ matrix.cuda }}-${{ matrix.golang }}-${{ matrix.python }}-ubuntu${{ matrix.ubuntu_os }}-${{ steps.prepare.outputs.tag_name }}
- name: Build Bussiness Docker Image For AIges
uses: docker/build-push-action@v2
with:
context: .
file: ./dist/aiges/bussiness/ubuntu${{ matrix.ubuntu_os }}/cuda-${{ matrix.cuda }}/Dockerfile
builder: ${{ steps.buildx.outputs.name }}
push: true
tags: ${{ secrets.IFLYOPENSOURCE }}/${{env.AIGES_REPO}}:${{ matrix.cuda }}-${{ matrix.golang }}-${{ matrix.python }}-ubuntu${{ matrix.ubuntu_os }}-bussiness-${{ steps.prepare.outputs.tag_name }}
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@master
with:
submodules: true
- name: Set up Go
uses: actions/setup-go@master
with:
go-version: 1.17
- name: Prepare
id: prepare
run: |
TAG=${GITHUB_REF#refs/tags/}
echo ::set-output name=tag_name::${TAG}
- name: Setup Python And Generate Dockerfile
shell: bash
run: |
sudo apt install -y python3-pip
sudo pip install jinja2 plumbum
python docker/build.py generate --action release --use_github --git_tag=${{ steps.prepare.outputs.tag_name }}
- name: Release
run: |
export GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}
make build-release