Skip to content

Release

Release #135

Workflow file for this run

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