Skip to content

Commit

Permalink
Publish workflow on CI (#766)
Browse files Browse the repository at this point in the history
* publish workflow

* fix bad indentation in line 18

* fix bad indentation in line 26

* add test registry and pull request run

* add crate name to the semver check

* add prefix version

* fix comment with extra /

* use fork of semver check

* add ref to action

* add crate name

* add crate name

* update action version

* remove check semver from this PR

* add token for crate io

* wrong name of env var

* remove release test tag

* add features to publish

* bump version of felt and vm

* add manifest path

* debug

* fix triggers and licenses

* remove comment

* add comment about sleep

* restore changes to the path of felt dependency and remove whitespace

* Update Cargo.toml

* add newline

* add newline

* add newline
  • Loading branch information
Jrigada authored Jan 25, 2023
1 parent d71037a commit 0862a98
Show file tree
Hide file tree
Showing 5 changed files with 48 additions and 15 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: publish

on:
push:
tags:
- '*'

jobs:
publish:
name: Publish
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v2
- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- name: Publish crate cairo-felt
env:
CRATES_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
run: cargo publish --token ${CRATES_TOKEN} --all-features --manifest-path ./felt/Cargo.toml
# FIXME: there should be a better way to make sure the index in crates.io is updated before publishing
# cairo-vm but right now the step throws timeout and fails.
- name: wait for index in crates.io
run: sleep 120
- name: Publish crate cairo-vm
env:
CRATES_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
run: cargo publish --token ${CRATES_TOKEN} --all-features -p cairo-vm

20 changes: 10 additions & 10 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ members = [".", "felt", "./deps/parse-hyperlinks"]

[package]
name = "cairo-vm"
version = "0.1.1"
version = "0.1.2"
edition = "2021"
license = "MIT"
license = "Apache-2.0"
description = "Blazing fast Cairo interpreter"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
Expand Down
4 changes: 2 additions & 2 deletions felt/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[package]
name = "cairo-felt"
version = "0.1.0"
version = "0.1.1"
edition = "2021"
license = "MIT"
license = "Apache-2.0"
description = "Field elements representation for the Cairo VM"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
Expand Down
2 changes: 1 addition & 1 deletion src/hint_processor/hint_processor_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ pub fn get_ptr_from_reference(
}
}

///Returns the value given by a reference as an Option<MaybeRelocatable>
//Returns the value given by a reference as an Option<MaybeRelocatable>
pub fn get_maybe_relocatable_from_reference(
vm: &VirtualMachine,
hint_reference: &HintReference,
Expand Down

0 comments on commit 0862a98

Please sign in to comment.