diff --git a/.github/workflows/go.yml b/.github/workflows/basic-check.yml similarity index 100% rename from .github/workflows/go.yml rename to .github/workflows/basic-check.yml diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml new file mode 100644 index 00000000..0587c2a6 --- /dev/null +++ b/.github/workflows/create-release.yml @@ -0,0 +1,52 @@ +name: Create release +on: + workflow_dispatch: + inputs: + note: + description: 'Note' + required: false + default: '' + +jobs: + build: + strategy: + matrix: + go: [1.16] + os: [ubuntu-latest, macos-latest, windows-latest] + runs-on: ${{ matrix.os }} + steps: + - name: Set up Go + uses: actions/setup-go@v2 + with: + go-version: ${{ matrix.go }} + - name: Checkout source + uses: actions/checkout@v2 + - name: Build executables + env: + GO111MODULE: "on" + run: go build -trimpath -o artifacts/ --tags use_icu_normalization . + - name: Install coreutils for macOS + if: matrix.os == 'macos-latest' + run: brew install coreutils icu4c + - name: SHA256 sum + run: sha256sum -b artifacts/* > artifacts/chain.sha256 + - name: Upload artifacts + uses: actions/upload-artifact@v2 + with: + name: chain-${{ matrix.os }} + path: artifacts/* + + +# for releases see https://trstringer.com/github-actions-create-release-upload-artifacts/ + +# AWS S3 support: +# - name: Upload to Amazon S3 +# uses: ItsKarma/aws-cli@v1.70.0 +# with: +# args: s3 sync .release s3://my-bucket-name +# env: +# # Make sure to add the secrets in the repo settings page +# # AWS_REGION is set to us-east-1 by default +# AWS_ACCESS_KEY_ID: $ +# AWS_SECRET_ACCESS_KEY: $ +# AWS_REGION: us-east-1 \ No newline at end of file diff --git a/.github/workflows/full-sync-part-1.yml b/.github/workflows/full-sync-part-1.yml new file mode 100644 index 00000000..304c59dd --- /dev/null +++ b/.github/workflows/full-sync-part-1.yml @@ -0,0 +1,34 @@ +name: Full Sync From 0 + +on: + workflow_dispatch: + inputs: + note: + description: 'Note' + required: false + default: '' + +jobs: + build: + name: Go CI + runs-on: self-hosted + strategy: + matrix: + go: [1.16] + steps: + - run: | + echo "Note ${{ github.event.inputs.note }}!" + - name: Setup Go + uses: actions/setup-go@v2 + with: + go-version: ${{ matrix.go }} + - name: Checkout source + uses: actions/checkout@v2 + - name: Build chain + run: go build --tags use_icu_normalization . + - name: Create datadir + run: echo "TEMP_DATA_DIR=$(mktemp -d)" >> $GITHUB_ENV + - name: Run chain + run: ./chain --datadir=${{env.TEMP_DATA_DIR}}/data --logdir=${{env.TEMP_DATA_DIR}}/logs --connect=127.0.0.1 --norpc + - name: Remove datadir + run: rm -rf ${{env.TEMP_DATA_DIR}} diff --git a/.github/workflows/full-sync.yml b/.github/workflows/full-sync-part-2.yml similarity index 50% rename from .github/workflows/full-sync.yml rename to .github/workflows/full-sync-part-2.yml index 76c25c3c..0c9a3551 100644 --- a/.github/workflows/full-sync.yml +++ b/.github/workflows/full-sync-part-2.yml @@ -1,4 +1,4 @@ -name: Full Sync +name: Full Sync From 814k on: workflow_dispatch: @@ -22,15 +22,15 @@ jobs: uses: actions/setup-go@v2 with: go-version: ${{ matrix.go }} - - name: Check out source + - name: Checkout source uses: actions/checkout@v2 - - name: Install Linters - run: "curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(go env GOPATH)/bin v1.26.0" - - name: Build + - name: Build chain run: go build --tags use_icu_normalization . - - name: Create Datadir - run: echo "TEMP_DIR=$(mktemp -d)" >> $GITHUB_ENV - - name: Full-Sync - run: ./chain --datadir ${{env.TEMP_DIR}} --connect 127.0.0.1 --norpc - - name: Remove Datadir - run: rm -rf --datadir ${{env.TEMP_DIR}} + - name: Create datadir + run: echo "TEMP_DATA_DIR=$(mktemp -d)" >> $GITHUB_ENV + - name: Copy initial data + run: cp -r /home/lbry/chain_814k/* ${{env.TEMP_DATA_DIR}} + - name: Run chain + run: ./chain --datadir=${{env.TEMP_DATA_DIR}}/data --logdir=${{env.TEMP_DATA_DIR}}/logs --connect=127.0.0.1 --norpc + - name: Remove datadir + run: rm -rf ${{env.TEMP_DATA_DIR}} diff --git a/claimtrie/claimtrie_test.go b/claimtrie/claimtrie_test.go index cb5d7d60..42e409c8 100644 --- a/claimtrie/claimtrie_test.go +++ b/claimtrie/claimtrie_test.go @@ -265,8 +265,8 @@ func BenchmarkClaimTrie_AppendBlock(b *testing.B) { } param.SetNetwork(wire.TestNet) - param.OriginalClaimExpirationTime = 1000000 - param.ExtendedClaimExpirationTime = 1000000 + param.ActiveParams.OriginalClaimExpirationTime = 1000000 + param.ActiveParams.ExtendedClaimExpirationTime = 1000000 cfg.DataDir = b.TempDir() r := require.New(b)