-
Notifications
You must be signed in to change notification settings - Fork 65
Deploy wazero #733
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Deploy wazero #733
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,7 +15,6 @@ concurrency: | |
cancel-in-progress: false | ||
|
||
env: | ||
CHECKOUT_BRANCH: benjamin | ||
CACHE_KEY: fe-benjamin-button | ||
CONTRACTS_ENVFILE: fe-benjamin | ||
CARGOCONTRACT_REV: 2b1758756de59bd81e7bed5f8429d364f281cb9a | ||
|
@@ -70,11 +69,12 @@ jobs: | |
contracts/ticket_token/target/ | ||
contracts/wrapped_azero/target/ | ||
|
||
# TODO : this should NOT be built every time | ||
- name: Install cargo-contract | ||
run: | | ||
cargo install cargo-dylint dylint-link --force | ||
# revision merging Hans's PR changes [fix for node URL parsing ] | ||
cargo install --git https://github.com/paritytech/cargo-contract.git --rev 2b1758756de59bd81e7bed5f8429d364f281cb9a --force | ||
cargo install --git https://github.com/paritytech/cargo-contract.git --rev ${{ env.CARGOCONTRACT_REV }} --force | ||
|
||
- name: Configure AWS credentials | ||
uses: aws-actions/configure-aws-credentials@v1 | ||
|
@@ -142,8 +142,6 @@ jobs: | |
steps: | ||
- name: Checkout repo | ||
uses: actions/[email protected] | ||
with: | ||
ref: ${{ env.CHECKOUT_BRANCH }} | ||
|
||
- name: Check if environment is reachable | ||
shell: bash | ||
|
@@ -188,13 +186,22 @@ jobs: | |
with: | ||
target-key: ${{ env.CACHE_KEY }} | ||
cargo-key: ${{ env.CACHE_KEY }} | ||
cache-version: v1 | ||
cache-version: v2 | ||
cargo-targets: | | ||
contracts/access_control/target/ | ||
contracts/button/target/ | ||
contracts/game_token/target/ | ||
contracts/marketplace/target/ | ||
contracts/simple_dex/target/ | ||
contracts/ticket_token/target/ | ||
contracts/wrapped_azero/target/ | ||
|
||
- name: Install cargo additional libs | ||
run: | | ||
. "$HOME/.cargo/env" | ||
cargo install dylint-link cargo-dylint | ||
|
||
# TODO : this should NOT be built every time | ||
- name: Install cargo-contract with bug fixes around URL parsing | ||
run: | | ||
. "$HOME/.cargo/env" | ||
|
@@ -211,24 +218,17 @@ jobs: | |
aws-secret-access-key: ${{ secrets.AWS_DEVNET_SECRET_ACCESS_KEY }} | ||
aws-region: ${{ env.AWS_REGION }} | ||
|
||
- name: Get contracts' target directories cache from S3 bucket | ||
shell: bash | ||
continue-on-error: true | ||
run: | | ||
aws s3 cp s3://${{ secrets.CI_S3BUCKET_NAME }}/${{ env.S3BUCKET_PATH }}/targets.tgz targets.tgz | ||
tar -xzf targets.tgz | ||
|
||
- name: Copy metadata.json and addresses.json files from S3 bucket | ||
continue-on-error: true | ||
shell: bash | ||
run: | | ||
aws s3 cp s3://${{ secrets.CI_S3BUCKET_NAME }}/${{ env.S3BUCKET_PATH }}/addresses.json contracts/addresses.json | ||
for i in ticket_token marketplace button game_token simple_dex access_control; do \ | ||
for i in ticket_token marketplace button game_token simple_dex wrapped_azero access_control; do \ | ||
mkdir -p contracts/"$i"/target/ink | ||
aws s3 cp s3://${{ secrets.CI_S3BUCKET_NAME }}/${{ env.S3BUCKET_PATH }}/"$i"/metadata.json contracts/"$i"/target/ink/metadata.json; \ | ||
done | ||
|
||
- name: Run clean.sh script | ||
continue-on-error: true | ||
shell: bash | ||
run: | | ||
. "$HOME/.cargo/env" | ||
|
@@ -244,19 +244,22 @@ jobs: | |
shell: bash | ||
run: | | ||
aws s3 cp contracts/addresses.json s3://${{ secrets.CI_S3BUCKET_NAME }}/${{ env.S3BUCKET_PATH }}/addresses.json | ||
for i in ticket_token marketplace button game_token simple_dex access_control; do \ | ||
for i in ticket_token marketplace button game_token simple_dex wrapped_azero access_control; do \ | ||
aws s3 cp contracts/"$i"/target/ink/metadata.json s3://${{ secrets.CI_S3BUCKET_NAME }}/${{ env.S3BUCKET_PATH }}/"$i"/metadata.json; \ | ||
done | ||
|
||
echo -n "${{ steps.get_branch.outputs.sha_short }}" > commit_sha.txt | ||
|
||
aws s3 cp commit_sha.txt s3://${{ secrets.CI_S3BUCKET_NAME }}/${{ env.S3BUCKET_PATH }}/commit_sha.txt | ||
|
||
source contracts/env/${{ env.CONTRACTS_ENVFILE }} && echo -n "$NODE" > env_NODE.txt | ||
aws s3 cp env_NODE.txt s3://${{ secrets.CI_S3BUCKET_NAME }}/${{ env.S3BUCKET_PATH }}/env_NODE.txt | ||
|
||
- name: Rename metadata and addresses JSON files to artifact upload | ||
shell: bash | ||
run: | | ||
cp contracts/addresses.json addresses.${{ env.CONTRACTS_ENVFILE }}.json | ||
for i in ticket_token marketplace button game_token access_control; do \ | ||
for i in ticket_token marketplace button game_token wrapped_azero access_control; do \ | ||
cp contracts/"$i"/target/ink/metadata.json metadata_"$i".${{ env.CONTRACTS_ENVFILE }}.json; \ | ||
done | ||
|
||
|
@@ -276,16 +279,8 @@ jobs: | |
if-no-files-found: error | ||
retention-days: 90 | ||
|
||
- name: Cache contracts' target directories in S3 bucket | ||
shell: bash | ||
run: | | ||
tar -czf targets.tgz contracts/ticket_token/target \ | ||
contracts/marketplace/target \ | ||
contracts/button/target \ | ||
contracts/game_token/target \ | ||
contracts/simple_dex/target \ | ||
contracts/access_control/target | ||
aws s3 cp targets.tgz s3://${{ secrets.CI_S3BUCKET_NAME }}/${{ env.S3BUCKET_PATH }}/targets.tgz | ||
- name: Cleanup cache | ||
uses: ./.github/actions/post-cache | ||
|
||
- name: Trigger Indexer deployment workflow | ||
run: | | ||
|
@@ -300,3 +295,5 @@ jobs: | |
-H "Accept: application/vnd.github+json" \ | ||
-H 'Authorization: Bearer ${{ secrets.CI_GH_TOKEN }}' \ | ||
-d '{ "ref":"main", "inputs": { "buildImage": "false", "deployImage": "true" }}' | ||
|
||
# TODO : Here the workflow should wait for a hook that notifies this workflow when the two prior steps have been finished succesfully |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.