Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIX]: Add nodejs setup for release script #690

Merged
merged 6 commits into from
Dec 11, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions .github/workflows/build-release-docker-img.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Build Release Docker Images

on: workflow_dispatch

jobs:
build-and-publish:
name: Build and Publish Docker Images
runs-on: ubuntu-latest
strategy:
matrix:
images:
- ubuntu22
- ubuntu20
- ubi8
- ubi9
steps:
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build, tag, and push docker image
uses: docker/build-push-action@v6
with:
# this label connects the icicle repo with the built package
# See more: https://docs.github.com/en/packages/learn-github-packages/connecting-a-repository-to-a-package
labels: |
org.opencontainers.image.source=https://github.com/ingonyama-zk/icicle
file: ./Dockerfile.${{ matrix.images }}
jeremyfelder marked this conversation as resolved.
Show resolved Hide resolved
tags: ghcr.io/ingonyama-zk/icicle-release-${{ matrix.images }}-cuda122:latest
push: true
14 changes: 12 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ on:
jobs:
release:
name: Release
runs-on: [self-hosted, Linux, X64, icicle]
runs-on: [self-hosted, Linux, X64, icicle]
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down Expand Up @@ -50,13 +50,17 @@ jobs:
git config user.name release-bot
git config user.email [email protected]
cargo workspaces version ${{ inputs.releaseType }} -y --no-individual-tags --no-git-push -m "Bump rust crates' version"
- uses: actions/setup-node@v4
with:
node-version: 18
- name: Bump docs version
id: bump-docs-version
if: inputs.releaseType != 'patch'
working-directory: ./docs
run: |
LATEST_TAG=$(git describe --tags --abbrev=0)
LATEST_VERSION=$LATEST_TAG:0:1
LATEST_VERSION=${LATEST_TAG:1}
npm install
npm run docusaurus docs:version $LATEST_VERSION
git add --all
git commit -m "Bump docs version"
Expand All @@ -67,6 +71,12 @@ jobs:
run: |
LATEST_TAG=$(git describe --tags --abbrev=0)
gh release create $LATEST_TAG --generate-notes -d --verify-tag -t "Release $LATEST_TAG"
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Upload release tars
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
21 changes: 10 additions & 11 deletions scripts/release/build_all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,11 @@ if [[ ! -d "./icicle" || ! -d "./scripts" ]]; then
exit 1
fi

# Build Docker images
echo "Building Docker images..."
# Ubuntu 22.04, CUDA 12.2.2
docker build -t icicle-release-ubuntu22-cuda122 -f ./scripts/release/Dockerfile.ubuntu22 .
# Ubuntu 20.04, CUDA 12.2.2
docker build -t icicle-release-ubuntu20-cuda122 -f ./scripts/release/Dockerfile.ubuntu20 .
# ubi8 (rhel compatible), CUDA 12.2.2
docker build -t icicle-release-ubi8-cuda122 -f ./scripts/release/Dockerfile.ubi8 .
# ubi9 (rhel compatible), CUDA 12.2.2
docker build -t icicle-release-ubi9-cuda122 -f ./scripts/release/Dockerfile.ubi9 .
# Download latest build images
jeremyfelder marked this conversation as resolved.
Show resolved Hide resolved
docker pull ghcr.io/ingonyama-zk/icicle-release-ubuntu22-cuda122:latest
docker pull ghcr.io/ingonyama-zk/icicle-release-ubuntu20-cuda122:latest
docker pull ghcr.io/ingonyama-zk/icicle-release-ubi8-cuda122:latest
docker pull ghcr.io/ingonyama-zk/icicle-release-ubi9-cuda122:latest

# Compile and tar release in each

Expand Down Expand Up @@ -71,9 +66,13 @@ docker run --rm --gpus all \
-v ./scripts:/scripts \
icicle-release-ubi8-cuda122 bash /scripts/release/build_release_and_tar.sh icicle_$version ubi8 cuda122 &

# NOTE: The last command should not be run in the background,
jeremyfelder marked this conversation as resolved.
Show resolved Hide resolved
# otherwise the script completes and the github action continues
# and may exit before the builds finish

# ubi 9 (rhel compatible)
docker run --rm --gpus all \
-v ./icicle:/icicle \
-v "$output_dir:/output" \
-v ./scripts:/scripts \
icicle-release-ubi9-cuda122 bash /scripts/release/build_release_and_tar.sh icicle_$version ubi9 cuda122 &
icicle-release-ubi9-cuda122 bash /scripts/release/build_release_and_tar.sh icicle_$version ubi9 cuda122
Loading