Skip to content

Commit

Permalink
Update release workflow to publish a new version of the docs
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremyfelder committed Nov 21, 2024
1 parent fdf0953 commit ad9bfdf
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 25 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
cache-dependency-path: ./repo/docs/package-lock.json

- name: Install dependencies
run: npm install --frozen-lockfile
run: npm install
working-directory: ./repo/docs

- name: Build website
Expand Down
18 changes: 14 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,21 +49,31 @@ jobs:
run: |
git config user.name release-bot
git config user.email [email protected]
cargo workspaces version ${{ inputs.releaseType }} -y --no-individual-tags -m "Bump rust crates' version"
cargo workspaces version ${{ inputs.releaseType }} -y --no-individual-tags --no-git-push -m "Bump rust crates' version"
- 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
npm run docusaurus docs:version $LATEST_VERSION
git add --all
git commit -m "Bump docs version"
git push
- name: Create draft release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
mkdir -p release_output && rm -rf ./release_output/*
# skip building release tar. TODO Yuval fix
# ./scripts/release/build_all.sh ./release_output
LATEST_TAG=$(git describe --tags --abbrev=0)
gh release create $LATEST_TAG --generate-notes -d --verify-tag -t "Release $LATEST_TAG"
- name: Upload release tars
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
mkdir -p release_output && rm -rf ./release_output/*
LATEST_TAG=$(git describe --tags --abbrev=0)
./scripts/release/build_all.sh ./release_output $LATEST_TAG
for file in ./release_output/*.tar.gz; do
gh release upload $LATEST_TAG "$file"
done
2 changes: 1 addition & 1 deletion .github/workflows/test-deploy-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
cache-dependency-path: ./repo/docs/package-lock.json

- name: Install dependencies
run: npm install --frozen-lockfile
run: npm install
working-directory: ./repo/docs
- name: Test build website
run: npm run build
Expand Down
30 changes: 15 additions & 15 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,16 @@
"format": "prettier --write '**/*.md'"
},
"dependencies": {
"@docusaurus/core": "3.6.0",
"@docusaurus/preset-classic": "3.6.0",
"@mdx-js/react": "^3.0.0",
"clsx": "^1.1.1",
"hast-util-is-element": "1.1.0",
"prism-react-renderer": "^2.1.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"rehype-katex": "7",
"remark-math": "6"
"@docusaurus/core": "~3.6.0",
"@docusaurus/preset-classic": "~3.6.0",
"@mdx-js/react": "~3.0.0",
"clsx": "~1.1.1",
"hast-util-is-element": "~1.1.0",
"prism-react-renderer": "~2.1.0",
"react": "~18.2.0",
"react-dom": "~18.2.0",
"rehype-katex": "~7",
"remark-math": "~6"
},
"browserslist": {
"production": [
Expand All @@ -41,11 +41,11 @@
]
},
"devDependencies": {
"@docusaurus/module-type-aliases": "^3.0.0",
"@docusaurus/tsconfig": "^3.6.1",
"@docusaurus/types": "^3.0.0",
"prettier": "^3.2.4",
"typescript": "^5.6.3"
"@docusaurus/module-type-aliases": "~3.0.0",
"@docusaurus/tsconfig": "~3.6.1",
"@docusaurus/types": "~3.0.0",
"prettier": "~3.2.4",
"typescript": "~5.6.3"
},
"engines": {
"node": ">=18.0"
Expand Down
22 changes: 18 additions & 4 deletions scripts/release/build_all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,20 @@ set -e

# Use provided release_output directory or default to "release_output"
output_dir="${1:-./release_output}"
version="$2"

if [[ -z $version ]]; then
echo "Usage: You must supply a version for release tar files"
exit 1
fi

first_char=${version:0:1}
if [[ "${first_char,,}" == "v" ]]; then
version="${version:1}"
fi


version="${version//./_}"

# Check if both directories exist in the current working directory
if [[ ! -d "./icicle" || ! -d "./scripts" ]]; then
Expand Down Expand Up @@ -32,25 +46,25 @@ docker run --rm --gpus all \
-v ./icicle:/icicle \
-v "$output_dir:/output" \
-v ./scripts:/scripts \
icicle-release-ubuntu22-cuda122 bash /scripts/release/build_release_and_tar.sh icicle_3_1_0 ubuntu22 cuda122 &
icicle-release-ubuntu22-cuda122 bash /scripts/release/build_release_and_tar.sh icicle_$version ubuntu22 cuda122 &

# ubuntu 20
docker run --rm --gpus all \
-v ./icicle:/icicle \
-v "$output_dir:/output" \
-v ./scripts:/scripts \
icicle-release-ubuntu20-cuda122 bash /scripts/release/build_release_and_tar.sh icicle_3_1_0 ubuntu20 cuda122 &
icicle-release-ubuntu20-cuda122 bash /scripts/release/build_release_and_tar.sh icicle_$version ubuntu20 cuda122 &

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

# 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_3_1_0 ubi9 cuda122 &
icicle-release-ubi9-cuda122 bash /scripts/release/build_release_and_tar.sh icicle_$version ubi9 cuda122 &

0 comments on commit ad9bfdf

Please sign in to comment.