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

[goreleaser] disable cache build #2898

Merged
merged 5 commits into from
Jul 19, 2024
Merged
Show file tree
Hide file tree
Changes from 4 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
15 changes: 13 additions & 2 deletions .github/workflows/goreleaser-actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ jobs:

# TODO: we may want to dry run this on prs
run-goreleaser:
runs-on: namespace-profile-default
runs-on: namespace-profile-fast-goreleaser
needs: [build-goreleaser,changes]
if: ${{ needs.changes.outputs.package_count > 0 }}
permissions:
Expand All @@ -128,7 +128,11 @@ jobs:
package: ${{ fromJSON(needs.changes.outputs.packages) }}
container:
image: ${{ needs.build-goreleaser.outputs.goreleaser-image }}
volumes: [ /repo ]
volumes:
- /repo
- /cache:/cache
options: --cap-add=SYS_ADMIN # Required to by nscloud-cache-action to call `mount`.

steps:
- name: Git Checkout
uses: actions/checkout@v4
Expand All @@ -137,6 +141,7 @@ jobs:
submodules: 'recursive'

- name: Set up cache
if: ${{ !contains(runner.name, 'nsc') }}
uses: actions/cache@v4
with:
path: |
Expand All @@ -146,6 +151,12 @@ jobs:
restore-keys: |
${{ runner.os }}-go-${{matrix.package}}

- name: Setup Go cache
uses: namespacelabs/nscloud-cache-action@v1
if: ${{ contains(runner.name, 'nsc') }}
with:
cache: go

- name: Get branch name
id: branch-name
uses: tj-actions/branch-names@v6
Expand Down
2 changes: 1 addition & 1 deletion ethergo/backends/anvil/anvil.go
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ func (f *Backend) FundAccount(ctx context.Context, address common.Address, amoun
defer unlocker.Unlock()

prevBalance, err := f.Backend.BalanceAt(ctx, address, nil)
require.Nil(f.T(), err)
require.NoError(f.T(), err)

newBal := new(big.Int).Add(prevBalance, &amount)

Expand Down
9 changes: 4 additions & 5 deletions services/rfq/e2e/setup_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -147,26 +147,25 @@ func (i *IntegrationSuite) setupBE(backend backends.SimulatedTestBackend) {
backend.FundAccount(i.GetTestContext(), i.guardWallet.Address(), ethAmount)
backend.FundAccount(i.GetTestContext(), i.userWallet.Address(), ethAmount)

go func() {
i.manager.BulkDeploy(i.GetTestContext(), core.ToSlice(backend), predeploys...)
}()
var wg sync.WaitGroup

// TODO: in the case of relayer this not finishing before the test starts can lead to race conditions since
// nonce may be shared between submitter and relayer. Think about how to deal w/ this.
for _, user := range []wallet.Wallet{i.relayerWallet, i.guardWallet, i.userWallet} {
wg.Add(1)
go func(userWallet wallet.Wallet) {
defer wg.Done()
for _, token := range predeployTokens {
i.Approve(backend, i.manager.Get(i.GetTestContext(), backend, token), userWallet)
}
}(user)
}

wg.Wait()
}

func (i *IntegrationSuite) setupCCTP() {
// deploy the contract to all backends
testBackends := core.ToSlice(i.originBackend, i.destBackend)
i.cctpDeployManager.BulkDeploy(i.GetTestContext(), testBackends, cctpTest.SynapseCCTPType, cctpTest.MockMintBurnTokenType)

// register remote deployments and tokens
for _, backend := range testBackends {
Expand Down
Loading