forked from cosmos/cosmos-sdk
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: improve github actions (cosmos#13358)
* ci: improve github actions * updates * revert title change * updates * implement feedback * Update go.mod Co-authored-by: Marko <[email protected]>
- Loading branch information
1 parent
7eb259f
commit c297caa
Showing
15 changed files
with
143 additions
and
188 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: Build SimApp | ||
# This workflow is run on pushes to main & every Pull Requests where a .go, .mod, .sum have been changed | ||
on: | ||
pull_request: | ||
paths: | ||
- "**/*.go" | ||
- "go.mod" | ||
- "go.sum" | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- "**/*.go" | ||
- "go.mod" | ||
- "go.sum" | ||
permissions: | ||
contents: read | ||
|
||
concurrency: ci-${{ github.ref }} | ||
|
||
jobs: | ||
build: | ||
runs-on: buildjet-4vcpu-ubuntu-2004 | ||
strategy: | ||
matrix: | ||
go-arch: ["amd64", "arm", "arm64"] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-go@v3 | ||
with: | ||
go-version: 1.18 | ||
- name: Build | ||
run: GOARCH=${{ matrix.go-arch }} LEDGER_ENABLED=false make build | ||
- name: Build Legacy | ||
run: GOARCH=${{ matrix.go-arch }} LEDGER_ENABLED=false COSMOS_BUILD_OPTIONS=legacy make build | ||
|
||
- name: Build Cosmovisor | ||
run: GOARCH=${{ matrix.go-arch }} LEDGER_ENABLED=false make cosmovisor |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
name: Remove GitHub Action Old Artifacts | ||
|
||
on: | ||
schedule: | ||
# Every day at 1am | ||
- cron: "0 1 * * *" | ||
|
||
jobs: | ||
remove-old-artifacts: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 30 | ||
|
||
steps: | ||
- name: Remove old artifacts | ||
uses: c-hive/gha-remove-artifacts@v1 | ||
with: | ||
age: "7 days" |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: Tests E2E | ||
# This workflow is run on pushes to main & every Pull Requests where a .go, .mod, .sum have been changed | ||
on: | ||
pull_request: | ||
paths: | ||
- "**/*.go" | ||
- "go.mod" | ||
- "go.sum" | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- "**/*.go" | ||
- "go.mod" | ||
- "go.sum" | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
test-e2e: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-go@v3 | ||
with: | ||
go-version: 1.18 | ||
- name: e2e tests | ||
run: | | ||
make test-e2e |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: Tests Integration | ||
# This workflow is run on pushes to main & every Pull Requests where a .go, .mod, .sum have been changed | ||
on: | ||
pull_request: | ||
paths: | ||
- "**/*.go" | ||
- "go.mod" | ||
- "go.sum" | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- "**/*.go" | ||
- "go.mod" | ||
- "go.sum" | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
test-integration: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-go@v3 | ||
with: | ||
go-version: 1.18 | ||
- name: integration tests | ||
run: | | ||
make test-integration |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,37 +5,9 @@ on: | |
release: | ||
types: [published] | ||
|
||
jobs: | ||
cleanup-runs: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: rokroskar/workflow-run-cleanup-action@master | ||
env: | ||
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | ||
if: "!startsWith(github.ref, 'refs/tags/') && github.ref != 'refs/heads/main'" | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
go-arch: ["amd64", "arm", "arm64"] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-go@v3 | ||
with: | ||
go-version: 1.18 | ||
- name: Build | ||
run: GOARCH=${{ matrix.go-arch }} LEDGER_ENABLED=false make build | ||
|
||
- name: Build cosmovisor | ||
run: GOARCH=${{ matrix.go-arch }} LEDGER_ENABLED=false make cosmovisor | ||
|
||
- name: Install runsim | ||
run: go install github.com/cosmos/tools/cmd/[email protected] | ||
- uses: actions/cache@v3 | ||
with: | ||
path: ~/go/bin | ||
key: ${{ runner.os }}-go-runsim-binary | ||
concurrency: ci-${{ github.ref }} | ||
|
||
jobs: | ||
test-submodules: | ||
runs-on: ubuntu-latest | ||
container: tendermintdev/docker-tm-db-testing | ||
|
@@ -104,7 +76,7 @@ jobs: | |
path: ./${{ matrix.part }}profile.out | ||
|
||
sims-notify-success: | ||
needs: [tests] | ||
needs: tests | ||
runs-on: ubuntu-latest | ||
if: ${{ success() }} | ||
steps: | ||
|
@@ -130,7 +102,7 @@ jobs: | |
SLACK_FOOTER: "" | ||
|
||
sims-notify-failure: | ||
needs: [tests] | ||
needs: tests | ||
runs-on: ubuntu-latest | ||
if: ${{ failure() }} | ||
steps: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,56 +10,9 @@ on: | |
permissions: | ||
contents: read | ||
|
||
jobs: | ||
cleanup-runs: | ||
runs-on: buildjet-4vcpu-ubuntu-2004 | ||
steps: | ||
- uses: rokroskar/workflow-run-cleanup-action@master | ||
env: | ||
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | ||
if: "!startsWith(github.ref, 'refs/tags/') && github.ref != 'refs/heads/main'" | ||
build: | ||
runs-on: buildjet-4vcpu-ubuntu-2004 | ||
strategy: | ||
matrix: | ||
go-arch: ["amd64", "arm", "arm64"] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-go@v3 | ||
with: | ||
go-version: 1.18 | ||
- uses: technote-space/[email protected] | ||
id: git_diff | ||
with: | ||
PATTERNS: | | ||
**/**.go | ||
**/go.mod | ||
**/go.sum | ||
- name: Get data from Go build cache | ||
# if: env.GIT_DIFF | ||
if: ${{ false }} | ||
uses: actions/cache@v3 | ||
with: | ||
path: | | ||
~/go/pkg/mod | ||
~/.cache/golangci-lint | ||
~/.cache/go-build | ||
key: ${{ runner.os }}-go-build-${{ hashFiles('**/go.sum') }} | ||
- name: Build | ||
run: GOARCH=${{ matrix.go-arch }} LEDGER_ENABLED=false make build | ||
- name: Build Legacy | ||
run: GOARCH=${{ matrix.go-arch }} LEDGER_ENABLED=false COSMOS_BUILD_OPTIONS=legacy make build | ||
|
||
- name: Build cosmovisor | ||
run: GOARCH=${{ matrix.go-arch }} LEDGER_ENABLED=false make cosmovisor | ||
|
||
- name: Install runsim | ||
run: go install github.com/cosmos/tools/cmd/[email protected] | ||
- uses: actions/cache@v3 | ||
with: | ||
path: ~/go/bin | ||
key: ${{ runner.os }}-go-runsim-binary | ||
concurrency: ci-${{ github.ref }} | ||
|
||
jobs: | ||
test-submodules: | ||
runs-on: buildjet-4vcpu-ubuntu-2004 | ||
container: tendermintdev/docker-tm-db-testing | ||
|
@@ -279,7 +232,6 @@ jobs: | |
|
||
test-sim-nondeterminism: | ||
runs-on: buildjet-4vcpu-ubuntu-2004 | ||
needs: [build] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-go@v3 | ||
|
Oops, something went wrong.