Skip to content
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

chore: improve cache build #1461

Merged
merged 9 commits into from
Oct 2, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,20 @@ jobs:
name: umee ${{ matrix.arch }} for ${{ matrix.targetos }}
steps:
- uses: actions/checkout@v3
- name: Cache binaries
id: cache-binaries
uses: actions/cache@v3
with:
path: ./cmd/umeed/umeed
key: umeed-${{ matrix.targetos }}-${{ matrix.arch }}
- uses: technote-space/get-diff-action@v6.1.0
with:
PATTERNS: |
**/**.go
go.mod
go.sum
- name: Setup go
if: env.GIT_DIFF
if: steps.cache-binaries.outputs.cache-hit != 'true' && env.GIT_DIFF
uses: actions/setup-go@v3
with:
go-version: 1.19
Expand All @@ -34,14 +40,8 @@ jobs:
GOOS: ${{ matrix.targetos }}
GOARCH: ${{ matrix.arch }}
- name: Compile
if: env.GIT_DIFF
if: steps.cache-binaries.outputs.cache-hit != 'true' && env.GIT_DIFF
run: |
go mod download
cd cmd/umeed
go build .
- uses: actions/upload-artifact@v3
if: env.GIT_DIFF
with:
name: umeed-${{ matrix.targetos }}-${{ matrix.arch }}
path: cmd/umeed/umeed
retention-days: 1
42 changes: 27 additions & 15 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -124,20 +124,26 @@ jobs:
go.mod
go.sum

- name: gets umeed bin
if: env.GIT_DIFF
uses: actions/download-artifact@v3
- name: Cache updated version binary
id: cache-binaries
uses: actions/cache@v3
with:
name: umeed-linux-amd64
path: ./build
path: ./cmd/umeed/umeed
key: umeed-linux-amd64

- name: Start single node chain
if: env.GIT_DIFF
- name: Move new version binary to build folder
if: steps.cache-binaries.outputs.cache-hit == 'true'
run: |
mkdir -p build
cp ./cmd/umeed/umeed ./build/umeed
chmod +x ./build/umeed

- name: Start single node chain
if: env.GIT_DIFF && steps.cache-binaries.outputs.cache-hit == 'true'
run: |
./contrib/scripts/single-node.sh
- name: Test Local Network Liveness
if: env.GIT_DIFF
if: env.GIT_DIFF && steps.cache-binaries.outputs.cache-hit == 'true'
run: |
sleep 1m
./contrib/scripts/test_localnet_liveness.sh 50 5 50 localhost:26657
Expand All @@ -155,12 +161,19 @@ jobs:
go.mod
go.sum

- name: gets umeed bin
if: env.GIT_DIFF
uses: actions/download-artifact@v3
- name: Cache updated version binary
id: cache-binaries
uses: actions/cache@v3
with:
name: umeed-linux-amd64
path: ./build
path: ./cmd/umeed/umeed
key: umeed-linux-amd64

- name: Move new version binary to build folder
if: steps.cache-binaries.outputs.cache-hit == 'true'
run: |
mkdir -p build
cp ./cmd/umeed/umeed ./build/umeed
chmod +x ./build/umeed

- name: cache umeed mainnet
uses: actions/cache@v3
Expand All @@ -183,7 +196,6 @@ jobs:
run: |
./contrib/scripts/tinker-mainnet-genesis.sh
- name: Fork mainnet and upgrade from v1.1.2 to v.3.x.x
if: env.GIT_DIFF
if: env.GIT_DIFF && steps.cache-binaries.outputs.cache-hit == 'true'
run: |
chmod +x ./build/umeed
./contrib/scripts/umeemainnet_fork.sh
1 change: 1 addition & 0 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -810,6 +810,7 @@ func (app *UmeeApp) SimulationManager() *module.SimulationManager {
}

// RegisterAPIRoutes registers all application module routes with the provided
//
// API server.
func (app *UmeeApp) RegisterAPIRoutes(apiSvr *api.Server, apiConfig config.APIConfig) {
clientCtx := apiSvr.ClientCtx
Expand Down