Skip to content
Merged
Show file tree
Hide file tree
Changes from 7 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
136 changes: 136 additions & 0 deletions .github/scripts/resolc-bin-gh-pages.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,136 @@
#!/bin/bash

# This script updates `index.md` in the directory provided by the required
# `GH_PAGES_ROOT_DIR` environment variable. The file will be updated to
# render the `resolc-bin` JSON data for each of the supported platforms.
# `index.md` is the file served by GitHub Pages after being built by Jekyll
# and the Markdown processed by kramdown.

if [ -z "$GH_PAGES_ROOT_DIR" ]; then
echo "Error: GH_PAGES_ROOT_DIR environment variable is not set."
exit 1
fi

linux="$GH_PAGES_ROOT_DIR/linux/list.json"
macos="$GH_PAGES_ROOT_DIR/macos/list.json"
nightly_linux="$GH_PAGES_ROOT_DIR/nightly/linux/list.json"
nightly_macos="$GH_PAGES_ROOT_DIR/nightly/macos/list.json"
nightly_wasm="$GH_PAGES_ROOT_DIR/nightly/wasm/list.json"
nightly_windows="$GH_PAGES_ROOT_DIR/nightly/windows/list.json"
wasm="$GH_PAGES_ROOT_DIR/wasm/list.json"
windows="$GH_PAGES_ROOT_DIR/windows/list.json"

build_info_files=("$linux" "$macos" "$nightly_linux" "$nightly_macos"
"$nightly_wasm" "$nightly_windows" "$wasm" "$windows")

for file in "${build_info_files[@]}"; do
if [ ! -f "$file" ]; then
echo "Error: File does not exist - $file"
exit 1
fi
done

echo "Updating GitHub Pages index.md file..."

cat > "$GH_PAGES_ROOT_DIR/index.md" << EOF
---
title: resolc-bin
---

# resolc-bin

Listed here are details about the \`resolc\` binary releases for the supported platforms.
The information is synced with the [resolc-bin GitHub repository](https://github.com/paritytech/resolc-bin).

## Linux

<details>
<summary>See builds</summary>

{% highlight json %}
$(cat $linux)
{% endhighlight %}

</details>

## MacOS

<details>
<summary>See builds</summary>

{% highlight json %}
$(cat $macos)
{% endhighlight %}

</details>

## Nightly

### Linux

<details>
<summary>See builds</summary>

{% highlight json %}
$(cat $nightly_linux)
{% endhighlight %}

</details>

### MacOS

<details>
<summary>See builds</summary>

{% highlight json %}
$(cat $nightly_macos)
{% endhighlight %}

</details>

### Wasm

<details>
<summary>See builds</summary>

{% highlight json %}
$(cat $nightly_wasm)
{% endhighlight %}

</details>

### Windows

<details>
<summary>See builds</summary>

{% highlight json %}
$(cat $nightly_windows)
{% endhighlight %}

</details>

## Wasm

<details>
<summary>See builds</summary>

{% highlight json %}
$(cat $wasm)
{% endhighlight %}

</details>

## Windows

<details>
<summary>See builds</summary>

{% highlight json %}
$(cat $windows)
{% endhighlight %}

</details>
EOF

echo "File has been updated!"
2 changes: 1 addition & 1 deletion .github/workflows/book.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,6 @@ jobs:
- name: Compare with committed docs
run: |
if ! diff -r docs-tmp docs 2>/dev/null; then
echo "docs/ is not up-to-date. Run make test-book and commit the docs/ directory"
echo "docs/ is not up-to-date. Run 'make book' and commit the docs/ directory"
exit 1
fi
5 changes: 5 additions & 0 deletions .github/workflows/generate_versions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,11 @@ jobs:
cd resolc-bin
python ../tmp/.github/scripts/json_generator.py ${GITHUB_REPOSITORY} ${{ github.event.release.tag_name }}

# Update GitHub Pages file with the JSON data.
export GH_PAGES_ROOT_DIR=$PWD
chmod +x ../tmp/.github/scripts/resolc-bin-gh-pages.sh
bash ../tmp/.github/scripts/resolc-bin-gh-pages.sh

echo "${Green}Add new remote with gh app token${NC}"
git remote set-url origin $(git config remote.origin.url | sed "s/github.com/${APP_NAME}:${TOKEN}@github.com/g")

Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/release-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,11 @@ jobs:
cd nightly
python3 ../../revive/.github/scripts/json_generator_nightly.py
cd ..

# Update GitHub Pages file with the JSON data.
export GH_PAGES_ROOT_DIR=$PWD
chmod +x ../revive/.github/scripts/resolc-bin-gh-pages.sh
bash ../revive/.github/scripts/resolc-bin-gh-pages.sh
git status

echo "${Green}Add new remote with gh app token${NC}"
Expand All @@ -154,7 +159,7 @@ jobs:
git config user.email "ci@parity.io"
git config user.name "${APP_NAME}"

git add nightly/
git add nightly/ index.md
git commit -m "Update nightly json"
git push origin main

Expand Down
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Building Solidity contracts for PolkaVM requires installing the following two co

### `resolc` binary releases

`resolc` is distributed as a standalone binary (with `solc` as the only external dependency). Please download one of our [binary releases](https://github.com/paritytech/revive/releases) for your target platform and mind the platform specific instructions below. We also provide [nightly builds](https://github.com/paritytech/resolc-bin/tree/main/nightly).
`resolc` is distributed as a standalone binary (with `solc` as the only external dependency). Please download one of our [binary releases](https://paritytech.github.io/resolc-bin/) for your target platform and mind the platform specific instructions below. We also provide [nightly builds](https://paritytech.github.io/resolc-bin//#nightly).

<details>
<summary>MacOS users</summary>
Expand Down Expand Up @@ -106,4 +106,3 @@ Please consult the [Developer Guide](https://paritytech.github.io/revive/develop

The revive compiler project, after some early experiments with EVM bytecode translations, decided to fork the `era-compiler` framework.
[Frontend](https://github.com/matter-labs/era-compiler-solidity), [code generator](https://github.com/matter-labs/era-compiler-llvm-context) and some supporting libraries are based of ZKSync `zksolc`. I'd like to express my gratitude and thank the original authors for providing a useable code base under a generous license.

4 changes: 2 additions & 2 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ To create a new pre-release:
4. The release workflow will attempt to build and publish a new pre-release if the latest tag does match the cargo package version.
5. Wait for the `Release` workflow to finish. It should create the pre-release with the same name.
6. Check that pre-release was created on the [Releases page](https://github.com/paritytech/revive/releases) with all artifacts.
7. After the release is published, another workflow should start automatically and update json files in https://github.com/paritytech/resolc-bin. Check the changes.
8. Update the [contract-docs](https://github.com/paritytech/contract-docs/) accordingly
7. After the release is published, another workflow should start automatically and update JSON files in the [resolc-bin repository](https://github.com/paritytech/resolc-bin) as well as render the JSON on its [GitHub Pages website](https://paritytech.github.io/resolc-bin/). Check the changes.
8. Update the [revive compiler book](https://github.com/paritytech/revive/tree/main/book) accordingly.

# `resolc` NPM package release

Expand Down
3 changes: 1 addition & 2 deletions book/src/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ See above, the same applies.

We generally recommend to always use the latest supported version to profit from latest bugfixes, features and performance improvements.

Find out about the latest supported version by running `resolc --supported-solc-versions` or checking [here](https://github.com/paritytech/resolc-bin).
Find out about the latest supported version by running `resolc --supported-solc-versions` or checking [here](https://paritytech.github.io/resolc-bin/).

## Tool `XY` says the contract size is larger than 24kb and will fail to deploy?

Expand All @@ -25,4 +25,3 @@ The 24kb code size restriction only exist for the EVM. Our limit is currently ar
## Is `resolc` a drop-in replacement for `solc`?

No. `resolc` aims to work similarly to `solc`, but it's not considered a drop-in replacement.

3 changes: 1 addition & 2 deletions book/src/user_guide/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Building Solidity contracts for PolkaVM requires installing the following two co
## `resolc` binary releases

`resolc` is supported an all major operating systems and installation is straightforward.
Please find our [binary releases](https://github.com/paritytech/revive/releases) for the following platforms:
Please find our [binary releases](https://paritytech.github.io/resolc-bin/) for the following platforms:
- Linux (MUSL)
- MacOS (universal)
- Windows
Expand All @@ -24,4 +24,3 @@ We distribute the revive compiler as [node.js module](https://github.com/parityt
## Buidling `resolc` from source

Please follow the build [instructions in the revive `README.md`](https://github.com/paritytech/revive?tab=readme-ov-file#building-from-source).

2 changes: 1 addition & 1 deletion docs/faq.html
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ <h2 id="do-you-support-opcode-xy"><a class="header" href="#do-you-support-opcode
<p>See above, the same applies.</p>
<h2 id="in-what-solidity-version-should-i-write-my-dapp"><a class="header" href="#in-what-solidity-version-should-i-write-my-dapp">In what Solidity version should I write my dApp?</a></h2>
<p>We generally recommend to always use the latest supported version to profit from latest bugfixes, features and performance improvements.</p>
<p>Find out about the latest supported version by running <code>resolc --supported-solc-versions</code> or checking <a href="https://github.com/paritytech/resolc-bin">here</a>.</p>
<p>Find out about the latest supported version by running <code>resolc --supported-solc-versions</code> or checking <a href="https://paritytech.github.io/resolc-bin/">here</a>.</p>
<h2 id="tool-xy-says-the-contract-size-is-larger-than-24kb-and-will-fail-to-deploy"><a class="header" href="#tool-xy-says-the-contract-size-is-larger-than-24kb-and-will-fail-to-deploy">Tool <code>XY</code> says the contract size is larger than 24kb and will fail to deploy?</a></h2>
<p>The 24kb code size restriction only exist for the EVM. Our limit is currently around 1mb and may increase further in the future.</p>
<h2 id="is-resolc-a-drop-in-replacement-for-solc"><a class="header" href="#is-resolc-a-drop-in-replacement-for-solc">Is <code>resolc</code> a drop-in replacement for <code>solc</code>?</a></h2>
Expand Down
4 changes: 2 additions & 2 deletions docs/print.html
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ <h1 id="installation"><a class="header" href="#installation">Installation</a></h
</ul>
<h2 id="resolc-binary-releases"><a class="header" href="#resolc-binary-releases"><code>resolc</code> binary releases</a></h2>
<p><code>resolc</code> is supported an all major operating systems and installation is straightforward.
Please find our <a href="https://github.com/paritytech/revive/releases">binary releases</a> for the following platforms:</p>
Please find our <a href="https://paritytech.github.io/resolc-bin/">binary releases</a> for the following platforms:</p>
<ul>
<li>Linux (MUSL)</li>
<li>MacOS (universal)</li>
Expand Down Expand Up @@ -645,7 +645,7 @@ <h2 id="do-you-support-opcode-xy"><a class="header" href="#do-you-support-opcode
<p>See above, the same applies.</p>
<h2 id="in-what-solidity-version-should-i-write-my-dapp"><a class="header" href="#in-what-solidity-version-should-i-write-my-dapp">In what Solidity version should I write my dApp?</a></h2>
<p>We generally recommend to always use the latest supported version to profit from latest bugfixes, features and performance improvements.</p>
<p>Find out about the latest supported version by running <code>resolc --supported-solc-versions</code> or checking <a href="https://github.com/paritytech/resolc-bin">here</a>.</p>
<p>Find out about the latest supported version by running <code>resolc --supported-solc-versions</code> or checking <a href="https://paritytech.github.io/resolc-bin/">here</a>.</p>
<h2 id="tool-xy-says-the-contract-size-is-larger-than-24kb-and-will-fail-to-deploy"><a class="header" href="#tool-xy-says-the-contract-size-is-larger-than-24kb-and-will-fail-to-deploy">Tool <code>XY</code> says the contract size is larger than 24kb and will fail to deploy?</a></h2>
<p>The 24kb code size restriction only exist for the EVM. Our limit is currently around 1mb and may increase further in the future.</p>
<h2 id="is-resolc-a-drop-in-replacement-for-solc"><a class="header" href="#is-resolc-a-drop-in-replacement-for-solc">Is <code>resolc</code> a drop-in replacement for <code>solc</code>?</a></h2>
Expand Down
2 changes: 1 addition & 1 deletion docs/user_guide/installation.html
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ <h1 id="installation"><a class="header" href="#installation">Installation</a></h
</ul>
<h2 id="resolc-binary-releases"><a class="header" href="#resolc-binary-releases"><code>resolc</code> binary releases</a></h2>
<p><code>resolc</code> is supported an all major operating systems and installation is straightforward.
Please find our <a href="https://github.com/paritytech/revive/releases">binary releases</a> for the following platforms:</p>
Please find our <a href="https://paritytech.github.io/resolc-bin/">binary releases</a> for the following platforms:</p>
<ul>
<li>Linux (MUSL)</li>
<li>MacOS (universal)</li>
Expand Down
Loading