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

ci: uci/copy-templates #283

Merged
merged 16 commits into from
Jul 12, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
131 changes: 0 additions & 131 deletions .circleci/config.yml

This file was deleted.

36 changes: 36 additions & 0 deletions .github/workflows/go-check-gen.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Make gen and check diff

on:
pull_request:
push:
branches: ["master"]
workflow_dispatch:

laurentsenta marked this conversation as resolved.
Show resolved Hide resolved
permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event_name == 'push' && github.sha || github.ref }}
cancel-in-progress: true
jobs:
check-diff:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.21'

- name: Install dependencies
run: go mod download

- name: Run make gen
run: make gen

- name: Check for changes
run: |
git diff --exit-code
18 changes: 18 additions & 0 deletions .github/workflows/go-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Go Checks

on:
pull_request:
push:
branches: ["master"]
workflow_dispatch:

permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event_name == 'push' && github.sha || github.ref }}
cancel-in-progress: true

jobs:
go-check:
uses: ipdxco/unified-github-workflows/.github/workflows/[email protected]
4 changes: 4 additions & 0 deletions .github/workflows/go-test-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"skipRace": true,
"skipOSes": ["windows"]
}
20 changes: 20 additions & 0 deletions .github/workflows/go-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Go Test

on:
pull_request:
push:
branches: ["master"]
workflow_dispatch:

permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event_name == 'push' && github.sha || github.ref }}
cancel-in-progress: true

jobs:
go-test:
uses: ipdxco/unified-github-workflows/.github/workflows/[email protected]
secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
19 changes: 19 additions & 0 deletions .github/workflows/release-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Release Checker

on:
pull_request_target:
paths: [ 'version.json' ]
types: [ opened, synchronize, reopened, labeled, unlabeled ]
workflow_dispatch:

permissions:
contents: write
pull-requests: write

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
release-check:
uses: ipdxco/unified-github-workflows/.github/workflows/[email protected]
19 changes: 19 additions & 0 deletions .github/workflows/releaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Releaser

on:
push:
paths: [ 'version.json' ]
workflow_dispatch:

permissions:
contents: write

concurrency:
group: ${{ github.workflow }}-${{ github.sha }}
cancel-in-progress: true

jobs:
releaser:
uses: ipdxco/unified-github-workflows/.github/workflows/[email protected]
with:
UCI_GITHUB_TOKEN: ${{ secrets.UCI_GITHUB_TOKEN }}
18 changes: 18 additions & 0 deletions .github/workflows/tagpush.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Tag Push Checker

on:
push:
tags:
- v*

permissions:
contents: read
issues: write

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
releaser:
uses: ipdxco/unified-github-workflows/.github/workflows/[email protected]
5 changes: 0 additions & 5 deletions .golangci.yaml

This file was deleted.

1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ tidy:

gen:
$(GO_BIN) run ./gen/gen.go
$(GO_BIN) run ./manifest/gen/gen.go
$(GO_BIN) run ./builtin/v8/gen/gen.go
$(GO_BIN) run ./builtin/v9/gen/gen.go
$(GO_BIN) run ./builtin/v10/gen/gen.go
Expand Down
40 changes: 15 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,31 +29,21 @@ As an example of application of this policy for Go-State-Types to a v14 builtin-

## Release Process

<details>
<summary>Cutting a development or release candidate release:</summary>

1. Go to [Go-State-Types Releases](https://github.com/filecoin-project/go-state-types/releases).
2. Click the "Draft a new release" button in the right corner.
3. In the "Choose a tag" dropdown, enter the desired version and click "Create new tag: vX.XX.X on publish".
4. Target the master branch.
5. Set the previous tag to compare against, the last stable release, and click the "Generate release notes" button.
6. Check the "Set as a pre-release" checkbox.
7. Click "Publish release" to create the development or release candidate release.

</details>

<details>
<summary>Cutting a definitive release:</summary>

1. Go to [Go-State-Types Releases](https://github.com/filecoin-project/go-state-types/releases).
2. Click the "Draft a new release" button in the right corner.
3. In the "Choose a tag" dropdown, enter the desired version and click "Create new tag: vX.XX.X on publish".
4. Target the master branch.
5. Set the previous tag to compare against, the last stable release, and click the "Generate release notes" button.
6. Ensure the "Set as a pre-release" checkbox is **not** checked.
7. Click "Publish release" to create the definitive release.

</details>
The repository contains a version.json file in the root directory:

```json
{
"version": "v0.4.2"
}
```

This version file defines the currently released version.

To cut a new release, open a Pull Request that bumps the version number and have it reviewed by your teammates.

The release check workflow will create a draft GitHub Release (if it was not initiated by a PR from a fork) and post a link to it along with other useful information (the output of gorelease, gocompat, and a diff of the go.mod files(s)).

The releaser workflow runs when the PR is merged into the default branch. This workflow either publishes the draft GitHub Release created by the release check workflow or creates a published GitHub Release if it doesn't exist yet. This, in turn, creates a new Git tag and pushes it to the repository.

## License
This repository is dual-licensed under Apache 2.0 and MIT terms.
Expand Down
1 change: 0 additions & 1 deletion abi/chain.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,3 @@ type Randomness []byte

// RandomnessLength is the length of the randomness slice.
const RandomnessLength = 32

1 change: 0 additions & 1 deletion abi/empty.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,3 @@ func (v *EmptyValue) UnmarshalCBOR(_ io.Reader) error {
// Read zero bytes.
return nil
}

6 changes: 3 additions & 3 deletions abi/key.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ type intKey struct {
int64
}

//noinspection GoExportedFuncWithUnexportedType
// noinspection GoExportedFuncWithUnexportedType
func IntKey(k int64) intKey {
return intKey{k}
}
Expand All @@ -68,7 +68,7 @@ func (k intKey) Key() string {
return string(buf[:n])
}

//noinspection GoUnusedExportedFunction
// noinspection GoUnusedExportedFunction
func ParseIntKey(k string) (int64, error) {
i, n := binary.Varint([]byte(k))
if n != len(k) {
Expand All @@ -82,7 +82,7 @@ type uintKey struct {
uint64
}

//noinspection GoExportedFuncWithUnexportedType
// noinspection GoExportedFuncWithUnexportedType
func UIntKey(k uint64) uintKey {
return uintKey{k}
}
Expand Down
2 changes: 1 addition & 1 deletion big/int.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ func Sub(a, b Int) Int {
return Int{big.NewInt(0).Sub(a.Int, b.Int)}
}

// Returns a**e unless e <= 0 (in which case returns 1).
// Returns a**e unless e <= 0 (in which case returns 1).
func Exp(a Int, e Int) Int {
return Int{big.NewInt(0).Exp(a.Int, e.Int, nil)}
}
Expand Down
7 changes: 7 additions & 0 deletions builtin/method_meta.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,10 @@ type MethodMeta struct {
Name string
Method interface{}
}

func NewMethodMeta(name string, method interface{}) MethodMeta {
return MethodMeta{
Name: name,
Method: method,
}
}
Loading
Loading