Skip to content

Commit

Permalink
Merge branch 'main' into hash-release-process
Browse files Browse the repository at this point in the history
  • Loading branch information
ahramy authored Jan 30, 2025
2 parents 3a6fd1c + d371b1e commit 30dfc37
Show file tree
Hide file tree
Showing 281 changed files with 9,415 additions and 4,400 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/codecov.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ jobs:
run: sudo apt-get install libclang-dev

- name: Cache build artifacts
uses: useblacksmith/rust-cache@v3
uses: useblacksmith/rust-cache@v3.0.1
with:
shared-key: "cache"
shared-key: "cache-codecov"

- name: Install cargo-llvm-cov
uses: taiki-e/install-action@cargo-llvm-cov
Expand Down
9 changes: 7 additions & 2 deletions .github/workflows/compile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,14 @@ jobs:
targets: wasm32-unknown-unknown

- name: Rust Cache
uses: useblacksmith/rust-cache@v3
uses: useblacksmith/rust-cache@v3.0.1
with:
shared-key: "cache"
shared-key: "cache-compilation"

- name: Run build
run: RUSTFLAGS="-D warnings" cargo build --locked --release
env:
RUST_BACKTRACE: 1

- name: Build wasm release
run: cargo wasm
4 changes: 2 additions & 2 deletions .github/workflows/create-release-pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,5 +50,5 @@ jobs:
command: release-pr
version: "0.3.105"
env:
GITHUB_TOKEN: ${{ secrets.PAT_TOKEN }}
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
GITHUB_TOKEN: ${{ secrets.PAT_TOKEN }}
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
4 changes: 2 additions & 2 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ jobs:
components: clippy

- name: Rust Cache
uses: useblacksmith/rust-cache@v3
uses: useblacksmith/rust-cache@v3.0.1
with:
shared-key: "cache"
shared-key: "cache-lint"

- name: Install cargo-sort
uses: baptiste0928/cargo-install@v2
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
((github.event.pull_request.merged == true) &&
contains(github.event.pull_request.labels.*.name, 'release'))
runs-on: blacksmith-2vcpu-ubuntu-2204
runs-on: blacksmith-8vcpu-ubuntu-2204

outputs:
releases: ${{ steps.prepare-matrix.outputs.releases }}
Expand All @@ -38,7 +38,7 @@ jobs:

- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable

# Creates git tags and publishes the crates of the new releases
- name: Publish release
id: publish-release
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/reusable-build-upload.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ on:
secrets:
github-token:
description: "The github token to use to do the tag updates"
required: true
required: true
cf-endpoint-url:
description: "The endpoint URL of the CF bucket"
required: true
Expand All @@ -55,14 +55,14 @@ on:

jobs:
build-and-upload:
runs-on: blacksmith-2vcpu-ubuntu-2204
runs-on: blacksmith-8vcpu-ubuntu-2204
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.github-token }}

- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
Expand All @@ -72,7 +72,7 @@ jobs:
- name: Build artifacts for ${{ inputs.package-name }}-v${{ inputs.package-version }}
run: |
echo "Building wasm for '${{ inputs.package-name }}-v${{ inputs.package-version }}'";
cargo install --locked soroban-cli --version 22.0.0-rc.1 --features opt
cargo install --locked stellar-cli --version 22.2.0 --features opt
cargo wasm -p ${{ inputs.package-name }}
stellar contract build
./optimize.sh
Expand All @@ -84,7 +84,7 @@ jobs:
export PACKAGE_VERSION='v${{ inputs.package-version }}'
export BASE_ARTIFACTS_DIR="./target/wasm32-unknown-unknown/release"
export ARTIFACT_NAME="axelar-cgp-soroban-wasm-${PACKAGE_NAME}-${PACKAGE_VERSION}"
export ARTIFACT_NAME="axelar-cgp-stellar-wasm-${PACKAGE_NAME}-${PACKAGE_VERSION}"
export BASE_ARTIFACTS_VERSIONED_DIR="$(dirname ${BASE_ARTIFACTS_DIR})/${ARTIFACT_NAME}" # Regardless of the dir type, relative or absolute
export ARCHIVES_OUTPUT_DIR="${{ github.workspace }}/build/archives"
Expand All @@ -94,7 +94,7 @@ jobs:
# Ensures that this dir is created
mkdir -p ${ARCHIVES_OUTPUT_DIR}
# ex: axelar-gas-service
# ex: stellar-axelar-gas-service
echo "PACKAGE_NAME=${PACKAGE_NAME}" >> $GITHUB_ENV
# ex: v0.1.0
Expand All @@ -103,10 +103,10 @@ jobs:
# ex: ./target/wasm32-unknown-unknown/release
echo "BASE_ARTIFACTS_DIR=${BASE_ARTIFACTS_DIR}" >> $GITHUB_ENV
# ex: axelar-cgp-soroban-wasm-axelar-gas-service-v0.1.0
# ex: axelar-cgp-stellar-wasm-stellar-axelar-gas-service-v0.1.0
echo "ARTIFACT_NAME=${ARTIFACT_NAME}" >> $GITHUB_ENV
# ex: ./axelar-cgp-soroban-wasm-axelar-gas-service-v0.1.0
# ex: ./axelar-cgp-stellar-wasm-stellar-axelar-gas-service-v0.1.0
echo "BASE_ARTIFACTS_VERSIONED_DIR=${BASE_ARTIFACTS_VERSIONED_DIR}" >> $GITHUB_ENV
echo "ZIP_ARCHIVE_FILE=${ZIP_ARCHIVE_FILE}" >> $GITHUB_ENV
Expand Down
24 changes: 20 additions & 4 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,27 @@ jobs:
toolchain: 1.81.0

- name: Rust Cache
uses: useblacksmith/rust-cache@v3
uses: useblacksmith/rust-cache@v3.0.1
with:
shared-key: "cache"
shared-key: "cache-test"

- name: Run tests
run: cargo test --locked
- name: Run tests for contracts
run: for C in contracts/*; do cd $C; RUSTFLAGS="-D warnings" cargo test --locked; cd ../../ ; done
env:
RUST_BACKTRACE: 1

- name: Run tests for packages
run: for C in packages/*; do cd $C; RUSTFLAGS="-D warnings" cargo test --locked; cd ../../ ; done
env:
RUST_BACKTRACE: 1

- name: Remove all golden files
run: find . -name "*.golden" -exec rm -rf {} \;

- name: Regenerate golden files
run: RUSTFLAGS="-D warnings" cargo test --locked
env:
GOLDIE_UPDATE: 1

- name: Check for stale golden files
run: git diff --exit-code
4 changes: 2 additions & 2 deletions .github/workflows/upload-docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ jobs:
toolchain: 1.81.0

- name: Rust Cache
uses: useblacksmith/rust-cache@v3
uses: useblacksmith/rust-cache@v3.0.1
with:
shared-key: "cache"
shared-key: "cache-docs"

- name: Build Documentation
run: |
Expand Down
2 changes: 1 addition & 1 deletion .release-plz.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Changes:
"""

[[package]]
name = "example"
name = "stellar-example"
release = false # don't process this package

[changelog]
Expand Down
Loading

0 comments on commit 30dfc37

Please sign in to comment.