diff --git a/.github/workflows/deploy-docs.yml b/.github/workflows/deploy-docs.yml index 42e9c103c..4e566d4be 100644 --- a/.github/workflows/deploy-docs.yml +++ b/.github/workflows/deploy-docs.yml @@ -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 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 674abfca9..46ec82fa2 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -49,21 +49,31 @@ jobs: run: | git config user.name release-bot git config user.email release-bot@ingonyama.com - 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 diff --git a/.github/workflows/test-deploy-docs.yml b/.github/workflows/test-deploy-docs.yml index 47550b2db..cc9079ae5 100644 --- a/.github/workflows/test-deploy-docs.yml +++ b/.github/workflows/test-deploy-docs.yml @@ -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 diff --git a/docs/package.json b/docs/package.json index 29ec2f3d0..5b53749df 100644 --- a/docs/package.json +++ b/docs/package.json @@ -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": [ @@ -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" diff --git a/scripts/release/build_all.sh b/scripts/release/build_all.sh index 3930d3a6a..965f01c80 100755 --- a/scripts/release/build_all.sh +++ b/scripts/release/build_all.sh @@ -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 @@ -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 &