Skip to content

Commit 39fa3e2

Browse files
authored
Merge pull request #89 from multiversx/rc/barnard
`rc/barnard`
2 parents 96572bb + 517e7bc commit 39fa3e2

97 files changed

Lines changed: 385 additions & 2199 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/deploy-docker.yml

Lines changed: 33 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
- name: Set up Go 1.x
2323
uses: actions/setup-go@v5
2424
with:
25-
go-version: 1.20.7
25+
go-version: 1.23.6
2626
id: go
2727

2828
- name: Get dependencies
@@ -52,20 +52,44 @@ jobs:
5252
username: ${{ secrets.DOCKERHUB_USERNAME }}
5353
password: ${{ secrets.DOCKERHUB_TOKEN }}
5454

55-
- name: Extract metadata (tags, labels) for Docker
56-
id: meta
55+
- name: Extract metadata (tags, labels) for released releases
56+
if: ${{ github.event.release.prerelease == false }}
57+
id: meta_released
5758
uses: docker/metadata-action@v5
5859
with:
5960
images: multiversx/chainsimulator
6061

61-
- name: Build and push Docker image
62-
id: push
62+
- name: Extract metadata (tags, labels) for prereleased releases
63+
if: ${{ github.event.release.prerelease == true }}
64+
id: meta_prereleased
65+
uses: docker/metadata-action@v5
66+
with:
67+
images: multiversx/chainsimulator
68+
tags: |
69+
type=raw,value=${{ github.event.release.tag_name }}
70+
labels: |
71+
type=raw,value=${{ github.event.release.name }}
72+
73+
- name: Build and push Docker image for released
74+
if: ${{ github.event.release.prerelease == false }}
75+
id: push_released
6376
uses: docker/build-push-action@v6
6477
with:
6578
context: .
6679
file: ./Dockerfile
67-
platforms: linux/amd64,linux/arm64
68-
push: ${{ github.event_name != 'pull_request' }}
69-
tags: ${{ steps.meta.outputs.tags }}
70-
labels: ${{ steps.meta.outputs.labels }}
80+
platforms: ${{ matrix.platform }}
81+
push: ${{ github.event_name == 'release' && github.event.action == 'published' }}
82+
tags: ${{ steps.meta_released.outputs.tags }}
83+
labels: ${{ steps.meta_released.outputs.labels }}
7184

85+
- name: Build and push Docker image for prereleased
86+
if: ${{ github.event.release.prerelease == true }}
87+
id: push_prereleased
88+
uses: docker/build-push-action@v6
89+
with:
90+
context: .
91+
file: ./Dockerfile
92+
platforms: linux/amd64,linux/arm64
93+
push: ${{ github.event_name == 'release' && github.event.action == 'published' }}
94+
tags: ${{ steps.meta_prereleased.outputs.tags }}
95+
labels: ${{ steps.meta_prereleased.outputs.labels }}

.github/workflows/golangci-lint.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,16 @@ jobs:
1313
name: golangci linter
1414
runs-on: ubuntu-latest
1515
steps:
16-
- uses: actions/setup-go@v3
16+
- uses: actions/setup-go@v5
1717
with:
18-
go-version: 1.20.7
18+
go-version: 1.23.6
1919
cache: false
2020
- uses: actions/checkout@v3
2121
- name: golangci-lint
2222
uses: golangci/golangci-lint-action@v3
2323
with:
2424
# Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version.
25-
version: v1.57.2
25+
version: v1.64.5
2626

2727
# Optional: working directory, useful for monorepos
2828
# working-directory: somedir

.github/workflows/pr-build.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@ jobs:
1313
runs-on: ubuntu-latest
1414
steps:
1515
- name: Set up Go 1.x
16-
uses: actions/setup-go@v2
16+
uses: actions/setup-go@v5
1717
with:
18-
go-version: 1.20.7
18+
go-version: 1.23.6
1919
id: go
2020

2121
- name: Check out code into the Go module directory
22-
uses: actions/checkout@v2
22+
uses: actions/checkout@v4
2323

2424
- name: Get dependencies
2525
run: |

.github/workflows/pr-tests.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@ jobs:
1313
runs-on: ubuntu-latest
1414
steps:
1515
- name: Set up Go 1.x
16-
uses: actions/setup-go@v2
16+
uses: actions/setup-go@v5
1717
with:
18-
go-version: 1.20.7
18+
go-version: 1.23.6
1919
id: go
2020

2121
- name: Check out code
22-
uses: actions/checkout@v2
22+
uses: actions/checkout@v4
2323
- name: Unit tests
2424
run: |
2525
go test ./...

.github/workflows/run-examples.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
runs-on: ubuntu-latest
1414
steps:
1515
- name: Check out code
16-
uses: actions/checkout@v2
16+
uses: actions/checkout@v4
1717
- name: Install dependencies
1818
run: |
1919
python3 -m pip install --upgrade pip

.github/workflows/run-multiple-instances.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
- name: Set up Go 1.x
1515
uses: actions/setup-go@v2
1616
with:
17-
go-version: 1.20.7
17+
go-version: 1.23.6
1818
id: go
1919

2020
- name: Check out code into the Go module directory

.github/workflows/run-vm-query-after-start.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
- name: Set up Go 1.x
1414
uses: actions/setup-go@v2
1515
with:
16-
go-version: 1.20.7
16+
go-version: 1.23.6
1717
id: go
1818

1919
- name: Check out code into the Go module directory

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM golang:1.20.7 AS builder
1+
FROM golang:1.23.6 AS builder
22

33

44
WORKDIR /multiversx

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,7 @@ Using the `cmd/chainsimulator` package as root, execute the following commands:
431431
- install go dependencies: `go install`
432432
- build executable: `go build -o chainsimulator`
433433

434-
Note: go version 1.20.* should be used to build the executable. Using version 1.21.* leads to build failures currently.
434+
Note: go version 1.23.* should be used to build the executable.
435435

436436

437437
## Launching the chainsimulator

cmd/chainsimulator/main.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ import (
3232

3333
const timeToAllowProxyToStart = time.Millisecond * 10
3434
const overrideConfigFilesSeparator = ","
35+
const tempDirPattern = "mx-chainsimulator-*"
3536

3637
var (
3738
log = logger.GetOrCreate("chainsimulator")
@@ -164,7 +165,7 @@ func startChainSimulator(ctx *cli.Context) error {
164165
apiConfigurator := api.NewFreePortAPIConfigurator(localRestApiInterface)
165166
startTimeUnix := ctx.GlobalInt64(startTime.Name)
166167

167-
tempDir, err := os.MkdirTemp(os.TempDir(), "")
168+
tempDir, err := os.MkdirTemp(os.TempDir(), tempDirPattern)
168169
if err != nil {
169170
return err
170171
}

0 commit comments

Comments
 (0)