Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into solana-sync-1904
Browse files Browse the repository at this point in the history
  • Loading branch information
eloylp committed Apr 19, 2024
2 parents 9c2b6cb + 07bc88f commit e56482a
Show file tree
Hide file tree
Showing 102 changed files with 5,172 additions and 8,433 deletions.
2 changes: 1 addition & 1 deletion .cargo/config
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[alias]
wasm = "build --release --lib --target wasm32-unknown-unknown --locked --workspace --exclude ampd"
wasm = "build --release --lib --target wasm32-unknown-unknown --locked --workspace --exclude ampd --exclude integration-tests"
unit-test = "test --lib"

[build]
Expand Down
61 changes: 61 additions & 0 deletions .github/workflows/build-ampd-and-push-to-r2.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Upload ampd contracts to Cloudflare R2 bucket

on:
push:
branches:
- main
workflow_dispatch:
inputs:
branch:
description: Github branch to checkout for compilation
required: true
default: main
type: string


jobs:
compile-and-upload:
name: Compile contracts and push to R2
runs-on: ubuntu-22.04
permissions:
contents: write
packages: write
id-token: write
steps:
- name: Determine branch
id: get-branch-name
run: |
if [ "${{ github.event_name }}" == "push" ]; then
branch="main"
else
branch="${{ inputs.branch }}"
fi
echo "branch=$branch" >> $GITHUB_OUTPUT
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: "0"
path: axelar-amplifier
submodules: recursive
ref: ${{ steps.get-branch-name.outputs.branch }}

- name: Compile amplifier contracts
id: compile-contracts
run: |
cd axelar-amplifier
docker run --rm -v "$(pwd)":/code --mount type=volume,source="$(basename "$(pwd)")_cache",target=/code/target --mount type=volume,source=registry_cache,target=/usr/local/cargo/registry cosmwasm/rust-optimizer:0.15.1
commit_hash=$(git rev-parse --short HEAD)
cd ..
mkdir -p ./artifacts/$commit_hash/
sudo mv axelar-amplifier/artifacts/*.wasm ./artifacts/$commit_hash/
echo "wasm-directory=./artifacts" >> $GITHUB_OUTPUT
- uses: ryand56/r2-upload-action@latest
with:
r2-account-id: ${{ secrets.R2_ACCOUNT_ID }}
r2-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID_CF }}
r2-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY_CF }}
r2-bucket: ${{ secrets.R2_BUCKET }}
source-dir: ${{ steps.compile-contracts.outputs.wasm-directory }}
destination-dir: ./pre-releases/ampd/contracts/
2 changes: 2 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ on:
- rewards
- service-registry
- voting-verifier
- monitoring
dry-run:
description: Dry run
type: boolean
Expand Down Expand Up @@ -48,6 +49,7 @@ jobs:
["rewards"]="rewards,/(major-rewards)|(major-contracts)/,/(minor-rewards)|(minor-contracts)/,contracts/rewards packages"
["service-registry"]="service-registry,/(major-service-registry)|(major-contracts)/,/(minor-service-registry)|(minor-contracts)/,contracts/service-registry packages"
["voting-verifier"]="voting-verifier,/(major-voting-verifier)|(major-contracts)/,/(minor-voting-verifier)|(minor-contracts)/,contracts/voting-verifier packages"
["monitoring"]="monitoring,/(major-monitoring)|(major-contracts)/,/(minor-monitoring)|(minor-contracts)/,contracts/monitoring packages"
)
if [[ -n "${binaries_data[$binary]}" ]]; then
Expand Down
Loading

0 comments on commit e56482a

Please sign in to comment.