Skip to content

Commit

Permalink
Merge branch 'fix/tagging-ios-package' into fix/ios-bindings-update-a…
Browse files Browse the repository at this point in the history
…ction

# Conflicts:
#	.github/workflows/update-ios-package.yml
  • Loading branch information
ElusAegis committed Dec 15, 2024
2 parents 5f2b72e + 67562f0 commit c9a7824
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 13 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
run: cargo doc --verbose

library-tests:
runs-on: ubuntu-latest-32-cores
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
Expand Down Expand Up @@ -350,7 +350,7 @@ jobs:
run: cargo nextest run --release --verbose tests_evm::kzg_evm_hashed_output_prove_and_verify --test-threads 1

prove-and-verify-tests:
runs-on: non-gpu
runs-on: ubuntu-latest
needs: [build, library-tests, docs]
steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -551,7 +551,7 @@ jobs:
run: cargo nextest run --release tests_examples

python-tests:
runs-on: non-gpu
runs-on: ubuntu-latest # TODO - remove this
needs: [build, library-tests, docs]
steps:
- uses: actions/checkout@v4
Expand Down
36 changes: 26 additions & 10 deletions .github/workflows/update-ios-package.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,31 @@
name: Build and Publish EZKL iOS SPM package

on:
workflow_dispatch:
inputs:
tag:
description: "The tag to release"
required: true
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
- '[0-9]+.[0-9]+.[0-9]+'

jobs:
build-and-update:
runs-on: macos-latest
env:
EZKL_SWIFT_PACKAGE_REPO: github.com/zkonduit/ezkl-swift-package.git
EZKL_SWIFT_PACKAGE_REPO: github.com/ElusAegis/ezkl-swift-package.git

steps:
- name: Checkout EZKL
uses: actions/checkout@v3

- name: Extract TAG from github.ref_name
run: |
# github.ref_name is provided by GitHub Actions and contains the tag name directly.
TAG="${{ github.ref_name }}"
echo "Original TAG: $TAG"
# Remove leading 'v' if present
NEW_TAG=${TAG#v}
echo "Stripped TAG: $NEW_TAG"
echo "TAG=$NEW_TAG" >> $GITHUB_ENV
- name: Install Rust (nightly)
uses: actions-rs/toolchain@v1
with:
Expand Down Expand Up @@ -85,7 +94,7 @@ jobs:
cd ezkl-swift-package
git config user.name "GitHub Action"
git config user.email "[email protected]"
git remote set-url origin https://zkonduit:${EZKL_SWIFT_PACKAGE_REPO_TOKEN}@${{ env.EZKL_SWIFT_PACKAGE_REPO }}
git remote set-url origin https://ElusAegis:${EZKL_SWIFT_PACKAGE_REPO_TOKEN}@${{ env.EZKL_SWIFT_PACKAGE_REPO }}
env:
EZKL_SWIFT_PACKAGE_REPO_TOKEN: ${{ secrets.EZKL_PORTER_TOKEN }}

Expand All @@ -104,9 +113,16 @@ jobs:
- name: Tag the latest commit
run: |
cd ezkl-swift-package
source $GITHUB_ENV
# Tag the latest commit on the current branch
git tag ${{ github.event.inputs.tag }}
if ! git push origin ${{ github.event.inputs.tag }}; then
echo "::error::Failed to push tag '${{ github.event.inputs.tag }}' to ${{ env.EZKL_SWIFT_PACKAGE_REPO }}. Please ensure EZKL_PORTER_TOKEN has correct permissions."
if git rev-parse "$TAG" >/dev/null 2>&1; then
echo "Tag $TAG already exists locally. Skipping tag creation."
else
git tag "$TAG"
fi
if ! git push origin "$TAG"; then
echo "::error::Failed to push tag '$TAG' to ${{ env.EZKL_SWIFT_PACKAGE_REPO }}. Please ensure EZKL_PORTER_TOKEN has correct permissions."
exit 1
fi

0 comments on commit c9a7824

Please sign in to comment.