Skip to content

Commit

Permalink
Merge branch 'main' into feature/upgrade-polkadot-sdk-to-stable2407
Browse files Browse the repository at this point in the history
  • Loading branch information
asiniscalchi committed Oct 17, 2024
2 parents 35896b7 + 1361605 commit 7f688d3
Show file tree
Hide file tree
Showing 45 changed files with 49,178 additions and 1,388 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -123,3 +123,6 @@ jobs:
- name: Try Runtime for Laos Sigma
run: |
RUST_LOG=try-runtime ./try-runtime --runtime ./target/release/wbuild/laos-runtime/laos_runtime.wasm on-runtime-upgrade --disable-spec-version-check --checks=all live --uri ws://159.223.241.51:9944
- name: Try Runtime for Laos
run: |
RUST_LOG=try-runtime ./try-runtime --runtime ./target/release/wbuild/laos-runtime/laos_runtime.wasm on-runtime-upgrade --disable-spec-version-check --checks=all live --uri wss://rpc.laos.laosfoundation.io
16 changes: 5 additions & 11 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,10 @@ jobs:
run: |
cargo build --release --locked
- name: Copy polkadot relay chain binary
- name: Download polkadot
run: |
wget https://github.com/paritytech/polkadot/releases/download/v0.9.42/polkadot
chmod +x ./polkadot
- name: Copy Astar parachain binary
run: |
wget https://github.com/AstarNetwork/Astar/releases/download/v5.23.0/astar-collator-v5.23.0-ubuntu-x86_64.tar.gz
tar xf astar-collator-v5.23.0-ubuntu-x86_64.tar.gz
chmod +x ./astar-collator
chmod +x ./zombienet/download_polkadot.sh
./zombienet/download_polkadot.sh
- name: Copy zombienet binary
run: |
Expand All @@ -43,9 +38,8 @@ jobs:
- name: Run zombienet
run: |
export ZOMBIENET_RELAYCHAIN_COMMAND=./polkadot
export ZOMBIENET_RELAYCHAIN_COMMAND=./tmp/polkadot
export ZOMBIENET_LAOS_COMMAND=./target/release/laos
export ZOMBIENET_ASTAR_COMMAND=./astar-collator
./zombienet-linux-x64 spawn ./zombienet/native.toml &
echo "Zombienet started"
Expand All @@ -66,4 +60,4 @@ jobs:
- name: Run e2e tests
run: |
npm run build && npm run test
working-directory: ./e2e-tests
working-directory: ./e2e-tests
126 changes: 97 additions & 29 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
outputs:
is_release_version: ${{ steps.check_version.outputs.is_release_version }}

prepare-release:
srtool_build:
needs: check-version
runs-on: ubuntu-latest
strategy:
Expand All @@ -54,53 +54,121 @@ jobs:
package: ${{ matrix.runtime.package }}
runtime_dir: ${{ matrix.runtime.path }}
tag: 1.74.0
- name: Summary
id: summary
- name: Export output info
run: |
echo '${{ steps.srtool_build.outputs.json }}' | jq . > ${{ matrix.runtime.name }}-srtool-digest.json
cat ${{ matrix.runtime.name }}-srtool-digest.json
echo "Runtime location: ${{ steps.srtool_build.outputs.wasm }}"
RUSTC_VERSION=$(jq '.info.rustc' < ${{ matrix.runtime.name }}-srtool-digest.json)
SRTOOL_VERSION=$(jq '.info.generator.version' < ${{ matrix.runtime.name }}-srtool-digest.json)
echo "rustc_version='$RUSTC_VERSION'" >> $GITHUB_OUTPUT
echo "srtool_version=$SRTOOL_VERSION" >> $GITHUB_OUTPUT
echo '${{ steps.srtool_build.outputs.json }}' | jq . > srtool-digest.json
- name: Upload Laos Wasm Artifact
uses: actions/upload-artifact@v3
with:
name: laos-wasm
path: |
${{ steps.srtool_build.outputs.wasm }}
${{ steps.srtool_build.outputs.wasm_compressed }}
srtool-digest.json
srtool_build_paseo:
needs: check-version
runs-on: ubuntu-latest
strategy:
matrix:
runtime:
- { name: "laos", package: "laos-runtime", path: "runtime/laos" }
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/setup
- uses: ./.github/actions/cache
with:
cache-key: build_and_push
- name: Srtool build for paseo
id: srtool_build_paseo
uses: chevdor/[email protected]
env:
BUILD_OPTS: "--features paseo"
with:
chain: ${{ matrix.runtime.name }}
package: ${{ matrix.runtime.package }}
runtime_dir: ${{ matrix.runtime.path }}
tag: 1.74.0
- name: Export output info
run: |
echo '${{ steps.srtool_build_paseo.outputs.json }}' | jq . > srtool-digest.json
- name: Upload Paseo Wasm Artifact
uses: actions/upload-artifact@v3
with:
name: paseo-wasm
path: |
${{ steps.srtool_build_paseo.outputs.wasm }}
${{ steps.srtool_build_paseo.outputs.wasm_compressed }}
srtool-digest.json
prepare-release:
needs: [srtool_build, srtool_build_paseo]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Download Laos Wasm Artifact
uses: actions/download-artifact@v3
with:
name: laos-wasm
path: laos-wasm
- name: Download Paseo Wasm Artifact
uses: actions/download-artifact@v3
with:
name: paseo-wasm
path: paseo-wasm
- name: Install subwasm ${{ env.SUBWASM_VERSION }}
run: |
wget https://github.com/chevdor/subwasm/releases/download/v${{ env.SUBWASM_VERSION }}/subwasm_linux_amd64_v${{ env.SUBWASM_VERSION }}.deb
sudo dpkg -i subwasm_linux_amd64_v${{ env.SUBWASM_VERSION }}.deb
subwasm --version
- name: Extract metadata
id: metadata
run: |
subwasm --json info ${{ steps.srtool_build.outputs.wasm }} > ${{ matrix.runtime.name }}-info.json
subwasm info ${{ steps.srtool_build.outputs.wasm }} > ${{ matrix.runtime.name }}-info.txt
cat ${{ matrix.runtime.name }}-info.txt
LAOS_COMPRESSED_WASM="laos-wasm/runtime/laos/target/srtool/release/wbuild/laos-runtime/laos_runtime.compact.compressed.wasm"
LAOS_PASEO_COMPRESSED_WASM="paseo-wasm/runtime/laos/target/srtool/release/wbuild/laos-runtime/laos_runtime.compact.compressed.wasm"
subwasm --json info $LAOS_COMPRESSED_WASM > laos-info.json
subwasm info $LAOS_COMPRESSED_WASM > laos-info.txt
subwasm --json info $LAOS_PASEO_COMPRESSED_WASM > paseo-info.json
subwasm info $LAOS_PASEO_COMPRESSED_WASM > paseo-info.txt
subwasm --json info ${{ steps.srtool_build.outputs.wasm_compressed }} > ${{ matrix.runtime.name }}-subwam-info.json
subwasm info ${{ steps.srtool_build.outputs.wasm_compressed }} > ${{ matrix.runtime.name }}-subwam-info.txt
cat ${{ matrix.runtime.name }}-subwam-info.txt
RUSTC_VERSION_POLKA=$(jq '.info.rustc' < laos-wasm/srtool-digest.json)
SRTOOL_VERSION_POLKA=$(jq '.info.generator.version' < laos-wasm/srtool-digest.json)
RUSTC_VERSION_PASEO=$(jq '.info.rustc' < paseo-wasm/srtool-digest.json)
SRTOOL_VERSION_PASEO=$(jq '.info.generator.version' < paseo-wasm/srtool-digest.json)
echo "rustc_version_polka='$RUSTC_VERSION_POLKA'" >> $GITHUB_OUTPUT
echo "srtool_version_polka=$SRTOOL_VERSION_POLKA" >> $GITHUB_OUTPUT
echo "rustc_version_paseo='$RUSTC_VERSION_PASEO'" >> $GITHUB_OUTPUT
echo "srtool_version_paseo=$SRTOOL_VERSION_PASEO" >> $GITHUB_OUTPUT
- name: Update Release Description with subwasm info
run: |
gh release view ${{ github.ref_name }} --json body -q .body > description.txt
RUSTC_VERSION=$(echo ${{ steps.summary.outputs.rustc_version }} | tr -d '"')
SRTOOL_VERSION=${{ steps.summary.outputs.srtool_version }}
printf "\n\n## ${{ matrix.runtime.name }} runtime\nThis runtime was built using %s with srtool %s\n" "$RUSTC_VERSION" "$SRTOOL_VERSION" >> description.txt
RUSTC_VERSION_POLKA=$(echo ${{ steps.metadata.outputs.rustc_version_polka }} | tr -d '"')
SRTOOL_VERSION_POLKA=${{ steps.metadata.outputs.srtool_version_polka }}
RUSTC_VERSION_PASEO=$(echo ${{ steps.metadata.outputs.rustc_version_paseo }} | tr -d '"')
SRTOOL_VERSION_PASEO=${{ steps.metadata.outputs.srtool_version_paseo }}
printf "\n\n## Laos Runtime for Polkadot\nThis runtime was built using $RUSTC_VERSION_POLKA with srtool $SRTOOL_VERSION_POLKA\n" >> description.txt
echo '```' >> description.txt
cat ${{ matrix.runtime.name }}-subwam-info.txt >> description.txt
cat laos-info.txt >> description.txt
echo '```' >> description.txt
printf "\n\n## Laos Runtime for Paseo\nThis runtime was built using $RUSTC_VERSION_PASEO with srtool $SRTOOL_VERSION_PASEO\n" >> description.txt
echo '```' >> description.txt
cat paseo-info.txt >> description.txt
echo '```' >> description.txt
gh release edit ${{ github.ref_name }} --notes-file description.txt
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload Ownership Wasm Binaries
- name: Upload Files to Release
run: |
echo "Uploading ownership wasm binary for tag ${{ github.ref_name }}"
gh release upload ${{ github.ref_name }} ${{ steps.srtool_build.outputs.wasm_compressed }}
gh release upload ${{ github.ref_name }} laos-wasm/runtime/laos/target/srtool/release/wbuild/laos-runtime/laos_runtime.compact.compressed.wasm
mv paseo-wasm/runtime/laos/target/srtool/release/wbuild/laos-runtime/laos_runtime.compact.compressed.wasm paseo-wasm/laos_paseo_runtime.compact.compressed.wasm
gh release upload ${{ github.ref_name }} paseo-wasm/laos_paseo_runtime.compact.compressed.wasm
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,5 @@
node_modules/
frontier-test-tmp
build/

tmp/
Loading

0 comments on commit 7f688d3

Please sign in to comment.