-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #134 from arda-org/add-ci-fullsimulnet
Add CI for fullsimulnet + fixes for lightsimulnet
- Loading branch information
Showing
69 changed files
with
10,176 additions
and
11 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
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,86 @@ | ||
name: Release xsuite-fullsimulnet | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
strategy: | ||
matrix: | ||
os: [macos-12, ubuntu-20.04] | ||
|
||
runs-on: ${{ matrix.os }} | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Use Node.js & pnpm | ||
uses: ./.github/actions/node-pnpm | ||
|
||
- name: Use Golang | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: 1.19 | ||
cache-dependency-path: xsuite-fullsimulnet/build-binary.mjs | ||
|
||
- name: Build xsuite-fullsimulnet | ||
run: pnpm build-xsuite-fullsimulnet | ||
|
||
- name: Upload package | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: package-${{ matrix.os }} | ||
path: | | ||
xsuite-fullsimulnet-darwin-amd64/bin/fsproxy | ||
xsuite-fullsimulnet-linux-amd64/bin/fsproxy | ||
test: | ||
needs: build | ||
|
||
strategy: | ||
matrix: | ||
os: [macos-12, ubuntu-20.04] | ||
|
||
runs-on: ${{ matrix.os }} | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Download package | ||
uses: actions/download-artifact@v4 | ||
with: | ||
pattern: package-* | ||
merge-multiple: true | ||
|
||
- name: Use Node.js & pnpm | ||
uses: ./.github/actions/node-pnpm | ||
|
||
- name: Test xsuite-fullsimulnet | ||
run: pnpm test-xsuite-fullsimulnet | ||
|
||
publish: | ||
needs: test | ||
|
||
runs-on: ubuntu-20.04 | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Download package | ||
uses: actions/download-artifact@v4 | ||
with: | ||
pattern: package-* | ||
merge-multiple: true | ||
|
||
- name: Use Node.js & pnpm | ||
uses: ./.github/actions/node-pnpm | ||
with: | ||
node-registry-url: "https://registry.npmjs.org" | ||
|
||
- name: Publish xsuite-fullsimulnet packages to NPM | ||
run: git config core.fileMode false && pnpm --filter "@xsuite/full-simulnet*" publish --publish-branch dev --access public | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
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 |
---|---|---|
@@ -1,5 +1,3 @@ | ||
#!/usr/bin/env node | ||
|
||
import fs from "node:fs"; | ||
import path from "node:path"; | ||
import { $, question } from "zx"; | ||
|
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 @@ | ||
/bin/fsproxy |
Binary file not shown.
Binary file not shown.
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,11 @@ | ||
{ | ||
"name": "@xsuite/full-simulnet-darwin-amd64", | ||
"version": "0.0.0", | ||
"license": "MIT", | ||
"scripts": { | ||
"postinstall": "chmod -f +x ./bin/fsproxy || true" | ||
}, | ||
"files": [ | ||
"bin" | ||
] | ||
} |
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 @@ | ||
/bin/fsproxy |
Binary file not shown.
Binary file not shown.
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,11 @@ | ||
{ | ||
"name": "@xsuite/full-simulnet-linux-amd64", | ||
"version": "0.0.0", | ||
"license": "MIT", | ||
"scripts": { | ||
"postinstall": "chmod -f +x ./bin/fsproxy || true" | ||
}, | ||
"files": [ | ||
"bin" | ||
] | ||
} |
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 @@ | ||
/node_modules/ |
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,6 @@ | ||
import { $, minimist } from "zx"; | ||
|
||
const argv = minimist(process.argv.slice(2)); | ||
|
||
await $`GOBIN="$(pwd)" GOOS=${argv.os} GOARCH=${argv.arch} go install -ldflags ${argv.ldflags} github.com/multiversx/mx-chain-simulator-go/cmd/chainsimulator@v1.7.7`; | ||
await $`mv ./chainsimulator ../xsuite-fullsimulnet-${argv.os}-${argv.arch}/bin/fsproxy`; |
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 @@ | ||
[config] | ||
[config.simulator] | ||
# server-port paramter specifies the port of the http server | ||
server-port = 8085 | ||
# num-of-shards parameter specifies the number of shard that chain simulator will simulate | ||
num-of-shards = 3 | ||
# round-duration-in-milliseconds parameter specifies the duration of a simulated round. The timestamp between two headers will correspond to the round duration but will not reflect real-time | ||
round-duration-in-milliseconds = 6000 | ||
# rounds-per-epoch specifies the number of rounds per epoch | ||
rounds-per-epoch = 20 | ||
# initial-round specifies with what round the chain simulator will start | ||
initial-round = 0 | ||
# initial-nonce specifies with what nonce the chain simulator will start | ||
initial-nonce = 0 | ||
# initial-epoch specifies with what epoch the chain simulator will start | ||
initial-epoch = 0 | ||
# mx-chain-go-repo will be used to fetch the node configs folder | ||
mx-chain-go-repo = "https://github.com/multiversx/mx-chain-go" | ||
# mx-chain-proxy-go-repo will be used to fetch the proxy configs folder | ||
mx-chain-proxy-go-repo = "https://github.com/multiversx/mx-chain-proxy-go" | ||
[config.logs] | ||
log-file-life-span-in-mb = 256 # 256MB | ||
log-file-life-span-in-sec = 432000 # 5 days | ||
log-file-prefix = "chain-simulator" | ||
logs-path = "logs" | ||
[config.blocks-generator] | ||
# auto-generate-blocks specifies if the chain simulator should auto generate blocks | ||
auto-generate-blocks = false | ||
# block-time-in-milliseconds specifies the time between blocks generation in case auto-generate-blocks is enabled | ||
block-time-in-milliseconds = 6000 |
Oops, something went wrong.