Skip to content

Commit

Permalink
ci: use of makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
crnbarr93 committed Nov 19, 2024
1 parent a1aac8e commit b288be8
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 14 deletions.
22 changes: 15 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,14 @@ jobs:
- uses: actions/checkout@v4

- name: Optimize contracts
run: 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/workspace-optimizer:0.16.1
run: make build

- name: Create version map
run: make version-map

- name: Generate schemas
run: |
sudo ./build_schema.sh
make schemas
tar -czf schemas.tar.gz schemas/
- name: Create artifacts archive
Expand All @@ -37,18 +40,23 @@ jobs:
```sh
git clone https://github.com/andromedaprotocol/andromeda-core.git
cd andromeda-core
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/workspace-optimizer:0.16.1
make build
```
## Building the Contracts from Source (arm-64)
To build the contracts from source, you can use the following commands:
```sh
git clone https://github.com/andromedaprotocol/andromeda-core.git
cd andromeda-core
make build-arm
```
## Generating Schemas
To generate the schemas, you can use the following command:
```sh
git clone https://github.com/andromedaprotocol/andromeda-core.git
cd andromeda-core
./build_schema.sh
make schemas
```
draft: false
prerelease: false
Expand Down
15 changes: 8 additions & 7 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,17 +69,18 @@ jobs:
"${GITHUB_WORKSPACE}/scripts/install_binaryen.sh"
- name: Build
run: |
chmod +x "${GITHUB_WORKSPACE}/scripts/build.sh"
"${GITHUB_WORKSPACE}/scripts/build.sh" all
chmod +x "${GITHUB_WORKSPACE}/scripts/build_all.sh"
make build
sudo make version-map
- name: Check contract sizes
run: |
chmod +x "${GITHUB_WORKSPACE}/.github/file-size.sh"
"${GITHUB_WORKSPACE}/.github/file-size.sh"
- name: Upload Artifacts
if: >
github.base_ref == 'development' ||
(github.base_ref == 'development' ||
github.base_ref == 'main' ||
contains(github.event.pull_request.labels.*.name, 'ci: build')
contains(github.event.pull_request.labels.*.name, 'ci: build')) && !contains(github.event.pull_request.labels.*.name, 'ci: skip-build')
uses: actions/upload-artifact@v3
with:
name: contracts
Expand All @@ -96,12 +97,12 @@ jobs:
- name: Build Schema
run: |
chmod +x "${GITHUB_WORKSPACE}/scripts/build_schema.sh"
"${GITHUB_WORKSPACE}/scripts/build_schema.sh"
make schemas
- name: Upload Artifacts
if: >
github.base_ref == 'development' ||
(github.base_ref == 'development' ||
github.base_ref == 'main' ||
contains(github.event.pull_request.labels.*.name, 'ci: build')
contains(github.event.pull_request.labels.*.name, 'ci: build')) && !contains(github.event.pull_request.labels.*.name, 'ci: skip-build')
uses: actions/upload-artifact@v4
with:
name: schema
Expand Down

0 comments on commit b288be8

Please sign in to comment.