Skip to content

Commit

Permalink
bump optimizer to v0.15.1 (#67)
Browse files Browse the repository at this point in the history
  • Loading branch information
NoahSaso authored May 28, 2024
1 parent 9ec7b0a commit 9501651
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 17 deletions.
47 changes: 32 additions & 15 deletions .github/workflows/artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,38 @@ on:
jobs:
release-artifacts:
runs-on: ubuntu-latest
container: cosmwasm/workspace-optimizer:0.15.1
steps:
- uses: actions/checkout@v3
- name: Install latest stable
uses: ATiltedTree/setup-rust@v1

# tar is required for cargo cache
- run: apk add --no-cache tar

- name: Set up cargo cache
uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}

- name: Compile contracts
timeout-minutes: 30
run: optimize_workspace.sh .

- name: Upload contracts
uses: actions/upload-artifact@v3
with:
name: contracts
path: artifacts/

- name: release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
rust-version: stable
- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Build Artifacts
run: |
./devtools/optimize.sh
- name: Commit artifacts
run: |
git config --global user.name 'DA0-DA0'
git config --global user.email '[email protected]'
git add artifacts --force
git commit -m "Update artifacts [skip ci]"
git push
files: artifacts/*
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4 changes: 2 additions & 2 deletions devtools/optimize.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ if [[ $(uname -m) =~ "arm64" ]]; then \
--mount type=volume,source="$(basename "$(pwd)")_cache",target=/code/target \
--mount type=volume,source=registry_cache,target=/usr/local/cargo/registry \
--platform linux/arm64 \
cosmwasm/workspace-optimizer-arm64:0.12.13
cosmwasm/workspace-optimizer-arm64:0.15.1

else
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 \
--platform linux/amd64 \
cosmwasm/workspace-optimizer:0.12.13
cosmwasm/workspace-optimizer:0.15.1
fi

0 comments on commit 9501651

Please sign in to comment.